|
| |
|
|
chadb
Posts: 470 From: Kansas Status: offline
|
Seach by date - 5/6/2008 10:57:29
Can someone tell me what I am doing wrong. I am trying to search by greater than date. fp_sQry="SELECT * FROM Item WHERE (TranDate <= 4/15/2008)" It never returns any records.
|
|
|
|
BeTheBall
Posts: 6271 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Seach by date - 5/6/2008 12:33:39
Access database? If so, try this: SELECT * FROM Item WHERE (TranDate <= #4/15/2008#)
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
chadb
Posts: 470 From: Kansas Status: offline
|
RE: Seach by date - 5/6/2008 12:57:56
quote:
(TranDate <= #4/15/2008#) Yes, that is perfect. One other question, Can I convert a text access field to an int? I need this to be an int. not char. Is that possible? With the current way, it returns all records. fp_sQry="SELECT * FROM Item WHERE (Diff < '-5')"
|
|
|
|
BeTheBall
Posts: 6271 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Seach by date - 5/6/2008 14:04:54
If Diff is a numeric field then you should NOT surround the value with single quotes. In other words, the SQL should be: fp_sQry="SELECT * FROM Item WHERE (Diff < -5)" General rule is as follows: If the database field is text - Surround the value with single quotes If the database field is a date - Surround the value with # Otherwise, use no delimiter
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|