Compatibility problem bet. Access and MSSQL

2004-04-24 Thread Claude Schneegans
Hi, I have this query which works well under Access, but generates a "Incorrect syntax near '>'." error under MSSQL. I'm not too familiar with MSSQL, can someone tell me what would be the equivalent for the line "page2.dateMaj > page1.dateMaj AS modif" and possibly an alternative that would work

RE: Compatibility problem bet. Access and MSSQL

2004-04-24 Thread Philip Arnold
> From: Claude Schneegans > I'm not too familiar with MSSQL, can someone tell me what > would be the equivalent for the line "page2.dateMaj > > page1.dateMaj AS modif" and possibly an alternative that > would work in both cases? What's it meant to return? I presume you want to have it so that

Re: Compatibility problem bet. Access and MSSQL

2004-04-24 Thread Claude Schneegans
Forget it, I managed to find how to use the DATEDIFF function. -- ___ See some cool custom tags here: http://www.contentbox.com/claude/customtags/tagstore.cfm Please send any spam to this address: [EMAIL PROTECTED] Thanks. [Todays Threads] [This Message] [S

Re: Compatibility problem bet. Access and MSSQL

2004-04-25 Thread Claude Schneegans
>>I presume you want to have it so that it returns 1 or true when page2.dateMaj is greater than page1.dateMaj Sure, this is standard SQL: in a SELECT ,... a value _expression_ can be a column name, a function or any combination in an _expression_. If the _expression_ is boolean, the column should

RE: Compatibility problem bet. Access and MSSQL

2004-04-25 Thread Philip Arnold
> From: Claude Schneegans > > Sure, this is standard SQL: in a SELECT > _expression_>,... a value _expression_ can be a column name, a > function or any combination in an _expression_. If the > _expression_ is boolean, the column should contain true, false > or null. This works in Access, not

RE: Compatibility problem bet. Access and MSSQL

2004-04-25 Thread Jochem van Dieten
Philip Arnold said: >> From: Claude Schneegans >> >> Sure, this is standard SQL: in a SELECT >> _expression_>,... a value _expression_ can be a column name, a >> function or any combination in an _expression_. If the >> _expression_ is boolean, the column should contain true, false >> or null. Thi

RE: Compatibility problem bet. Access and MSSQL

2004-04-25 Thread Jochem van Dieten
Jochem van Dieten said: > Philip Arnold said: >> >> And in the opposite, because NULL is a different "state", you >> can't treat it like 1 or 0, so you have to do: >> WHERE prov is NULL or prov = 0 > > WHERE NOT prov IS NULL OR prov = FALSE Obviously the NOT is not needed here. Jochem [Todays Th

RE: Compatibility problem bet. Access and MSSQL

2004-04-25 Thread Philip Arnold
> From: Jochem van Dieten > > WHERE prov = TRUE. > > WHERE NOT prov IS NULL OR prov = FALSE SQL Server 2000 doesn't understand TRUE or FALSE - it thinks they are a column reference - booleans are 1 or 0 > This specific case is not a matter of being too used to > Access' tricks, this is a matte

RE: Compatibility problem bet. Access and MSSQL

2004-04-25 Thread Jochem van Dieten
Philip Arnold said: >> From: Jochem van Dieten >> >> WHERE prov = TRUE. >> WHERE NOT prov IS NULL OR prov = FALSE > > SQL Server 2000 doesn't understand TRUE or FALSE - it thinks they > are a column reference - booleans are 1 or 0 http://register.microsoft.com/mswish/suggestion.asp >> This specif