IxiRancid Posted August 10, 2005 Posted August 10, 2005 I have a table (db2), records have a Status column. This is my problem: there are double records with status LMC and ACT (among other... not important) and some just with LMC. I need those "LMC only" records. How could I do this THE FASTEST WAY. I thought about Access like Join query "All from tbl1 and only those from tbl2..." But this should really be done fast (records exceed millions) so I'm sceptic about DataSets, the best way would be the SQL Select itself, but I don't have any clue how to do that :o this is the select that gets all of them (with LMC and ACT, remember I just need the ones that have only LMC and not ACT) --> SELECT CSCDNR, CSCHDNAME, b00ca1, b00ca2 FROM LBZVD02.CDCS00, LBEOD03.BMF00P, LBEOD03.BMF40P, LBEOD03.CAFIXP WHERE CSACCOPU = B40OPU AND CSIBSACC = B40ACC AND B40CLT = B00CLT AND CSCDTYPE = 'ATMC' AND CSCDSTAT = '*LMC' AND B40STS NOT IN ('C') AND csibsacc = FIXTAC AND CSPRTDATE = " & sqlDate Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.