|
-
Aug 12th, 1999, 02:12 PM
#1
Thread Starter
New Member
Hi all
in my coding, I need to retrieve records from Informix database. Belos is my select statement.
Firstly I will get the date to retrieve data from user.
"Select * from temp where ret_dte <=" '"& user_dte"'
I can't retrieve any data from the above statement but using the statement below, I am able to retrieve records.
"Select * from temp where ret_dte <= '12/08/1999'"
Can some1 pls enlighten me.
-
Aug 12th, 1999, 05:36 PM
#2
Member
Try
"Select * from temp where ret_dte <= '" & user_dte & "'"
That's assuming user_dte is a user-input variable and ret_dte is a field name, which seems implied in your second statement.
HTH,
Jonathan
-
Aug 12th, 1999, 07:04 PM
#3
The reason you didnt have results using variable is because you have single quotes in wrong places.
This is your statement:
Select * from temp where ret_dte <=" '"& user_dte"
This is the statement that should be:
Select * from temp where ret_dte ='" & ser_dte & "'"
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
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
|