Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Having trouble with SQL statement
table= loans field_name=pay_date I want to say WHERE loans.pay_date < TODAY I tried today(), sysdate, CurrentDate nothing seems to work. Any help is appreciated. Joe |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What database?
In Firebird and Interbase for example you can do: WHERE loans.pay_date < 'TODAY' RBS "JoeF" wrote in message ... Having trouble with SQL statement table= loans field_name=pay_date I want to say WHERE loans.pay_date < TODAY I tried today(), sysdate, CurrentDate nothing seems to work. Any help is appreciated. Joe |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Superbase. In Superbase I can use TODAY and it works fine. Problem is when I
insert SQL statement in MS Query I get various errors. I tried yours and got the following error msg "Ivalid operand for operator: <" Other messages include - "Expected Lexical element not found..", "Column not found..." etc... Thanks. "RB Smissaert" wrote: What database? In Firebird and Interbase for example you can do: WHERE loans.pay_date < 'TODAY' RBS "JoeF" wrote in message ... Having trouble with SQL statement table= loans field_name=pay_date I want to say WHERE loans.pay_date < TODAY I tried today(), sysdate, CurrentDate nothing seems to work. Any help is appreciated. Joe |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't know Superbase, but maybe you can do this:
WHERE loans.pay_date < (select TODAY from loans) The other option is to use a variable and put the current date in that in the right format, so you will get something like this: "SELECT * FROM loans WHERE loans.pay_date < " & strCurrentDate RBS "JoeF" wrote in message ... Superbase. In Superbase I can use TODAY and it works fine. Problem is when I insert SQL statement in MS Query I get various errors. I tried yours and got the following error msg "Ivalid operand for operator: <" Other messages include - "Expected Lexical element not found..", "Column not found..." etc... Thanks. "RB Smissaert" wrote: What database? In Firebird and Interbase for example you can do: WHERE loans.pay_date < 'TODAY' RBS "JoeF" wrote in message ... Having trouble with SQL statement table= loans field_name=pay_date I want to say WHERE loans.pay_date < TODAY I tried today(), sysdate, CurrentDate nothing seems to work. Any help is appreciated. Joe |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try:
WHERE loans.pay_date < GETDATE() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ODBC Query | Excel Worksheet Functions | |||
ODBC query problem | Excel Discussion (Misc queries) | |||
ODBC database query | Excel Discussion (Misc queries) | |||
Problem with .Background Query option of ODBC Query | Excel Programming | |||
SQL query to ODBC | Excel Programming |