In VB6.0 by use of different SQL version returns the problem
Time:10-07
Suppose you have two tables, respectively is A table and B table, A table with two columns, A1, A2, B table has 2 A2, B1, A four columns, B two columns I query need to have A table Select a. *, isnull (b.b Check, 0) bCheck From A Left the join (select 2, b.A bCheck=1 from B) as on b.A 2 B=A.A 2 Such a query statements, in SQL2000 and 2008 results are consistent, bcheck that a list of all is the result of 0,1,1,0 But I return the result obtained in VB6.0 by use of time, is different, when the database is 2000 is normal, database in return for 2008, bcheck that a list of all is the result of 1,1,1,1, VB with the ADODB connection Consult, why the results, and how to solve
CodePudding user response:
Will try bCheck=1 to 1 As bCheck, The latter is conform to the SQL standard,