Wednesday, July 19, 2006

SQL NOT IN statement syntax

-- Insert statement with a NOT IN Select statement

Insert Into tblONE (CreditCode, CreditDescription) (SELECT DISTINCT A.CREDITPRODUCTCODE, A.CREDITPRODUCTNAME FROM tblTWO A WHERE A.CREDITPRODUCTCODE NOT IN (SELECT B.CREDITCODE FROM tblONE B))

1 comment:

Anonymous said...

I bring my phone in O2 to fix 4 time within 3 months it still come out with a problem, the first 3 time when I bring the phone in it was still under warranty, after the 2nd time I bring they gave me a new phone but that phone have got a fault too, sO I mbring it in for the 3 & 4th time, still not resolve the problem, then I have contact the customer service they said cause my phone is not under warranty ( which it s was when i first bring in) and now I decide for get it I just not want to cancel my no (which my contract have already expire last month) you will never able to find there address, and you have to wait ages to get through there cancel hot line, I have never experince that kind of service in my life, so please if you do not wish to go through all that hassel, don't even think about to switch or sign up a contract with them, they are useless.