Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Binaries » View Thread |
Messages 1 to 1 of 1 total |
How to do this part 2 |
Tue, Jan 16 2007 9:27 AM | Permanent Link |
"Petter Topp" | Hello Robert,
I have attached the table we have discussed, and a test project with my SQL. It looks like this: SELECT DISTINCT T1.TRANS_ID, T1.LOCATION_ID, IF(T1.CUSTOMER_ID=NULL THEN T2.CUSTOMER_ID ELSE T1.CUSTOMER_ID) FROM Translogg T1 JOIN Translogg T2 ON T1.TRANS_ID=T2.TRANS_ID WHERE T1.LOCATION_ID = '2' GROUP BY T1.TRANS_ID When I add the IF THEN ELSE part to the SQL, the result returns TWO records one from T1 and one from T2. What I would like is just one record, with the value from the other. If you run my SQL you will also see a strange (probably not because i'm not very good at this) thing with two records. Record with TRANS_ID = 00000125 and 00000127 they don't display the CUSTOMER_ID. Thanks for taking the time... Regards Petter Topp Attachments: Translogg.dat Translogg.idx SQL Test.zip |
This web page was last updated on Thursday, March 28, 2024 at 06:05 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |