|
-
Feb 17th, 2000, 02:43 AM
#1
Thread Starter
Lively Member
Hi, everybody!
I'm trying to use Functions like MAX, IIF and DateADD in my SQL statment. is it possible?
Set MyDb = OpenDatabase("MyFile.mdb")
MySqlString = "SELECT Calibrations.RealDate, Max(iif([Unit]=1;DateAdd(""d"";[Value];[Date]);iif([Unit]=2;DateAdd(""m"";[Value];[Date]);iif([Unit]=3;DateAdd(""m"";[Value]*12;[Date]);0)))) AS Próx, and so on..
Set mystet = MyDb.OpenRecordset(MySqlString)
I'm receiving an error message:
3075 Syntax error in query expression.
Have any of you used a query which such functions before? Is there anything you can see that's wrong just by taking a look at my SQL?
Thanks in advance for any help,
Roselene
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|