|
-
July 21st, 1999, 12:48 AM
#1
How to judge a time-typed field in SQL statement?
I want to use a SQL statement with condition to get records,
the condition is date>DEC. 30,1996. But the database returns
error, either I look on the "date" field as CHAR-typed or
VALUE-typed. In my program, this field named "date" is CTIME-
typed in CRECORDSET,while SQL_C_CHAR-typed in SQLALLOCHANDLE.
Whatever I type like these,they don't work:
sr=SQLExecDirect(stmt,
(SQLCHAR*)"select * from stock where date='19961230'"
,SQL_NTS);
sr=SQLExecDirect(stmt,
(SQLCHAR*)"select * from stock where date>19961230"
,SQL_NTS);
Can anybody help me,please?
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
|