Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2007

Tip: Looking for answers? Try searching our database.

delete duplicates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ra - 14 Nov 2007 23:42 GMT
Hi,

I have a table Ra that shows like that:
CSPC            Pieces

B1574            15,888
B1575            15,888
B3144            10,200
B3145            10,200
B3024            6,500
B3025            5,555
I need to get another table to show like that:

B1574            0
B1575            15,888
B3144            0
B3145            10,200
B3024            6,500
B3025            5,555
Could you please help?
Thank you,

Ra
KARL DEWEY - 15 Nov 2007 00:36 GMT
This appears to work.  Use your table name instead of Ra_x.

SELECT Ra_x.CSPC, Min(IIf(Left([Ra_x].[CSPC],1) &
(Val(Right([Ra_x].[CSPC],4))+1)=[Ra_x_1].[CSPC] And
[Ra_x].[Pieces]=[Ra_x_1].[Pieces],0,[Ra_x].[Pieces])) AS [Number of Pieces]
FROM Ra_x, Ra_x AS Ra_x_1
GROUP BY Ra_x.CSPC;

Signature

KARL DEWEY
Build a little - Test a little

> Hi,
>
[quoted text clipped - 19 lines]
>
> Ra
Ra - 15 Nov 2007 12:25 GMT
Thank you so much...it is working !!!

> This appears to work.  Use your table name instead of Ra_x.
>
[quoted text clipped - 27 lines]
> >
> > Ra
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.