|
| |
|
|
walrus
Posts: 561 Joined: 3/13/2003 From: London Status: offline
|
WHERE clause - 1/13/2009 15:30:27
I would like to add a where clause into the following statement for asp access page fp_sQry="SELECT * FROM LettingData ORDER BY LettingID DESC" . . . fp_iMaxRecords=1 to show only the most recent data where the field PHOTO contains data. ie If there is no photo, it will skip. Do I need a routine or can I use something like a LIKE clause?
_____________________________
I hope The Boss isn't reading this, ...she thinks I program everything!
|
|
|
|
BeTheBall
Posts: 6502 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: WHERE clause - 1/13/2009 18:52:47
Try this: fp_sQry="SELECT * FROM LettingData WHERE PHOTO IS NOT NULL AND PHONE <>"" ORDER BY LettingID DESC"
_____________________________
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.
|
|
|
|
William Lee
Posts: 1273 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: WHERE clause - 1/13/2009 19:36:06
quote:
ORIGINAL: BeTheBall Try this: fp_sQry="SELECT * FROM LettingData WHERE PHOTO IS NOT NULL AND PHONE <>"" ORDER BY LettingID DESC" ..whats that with the phone?
_____________________________
William Lee pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ
|
|
|
|
walrus
Posts: 561 Joined: 3/13/2003 From: London Status: offline
|
RE: WHERE clause - 1/14/2009 6:05:22
quote:
fp_sQry="SELECT * FROM LettingData WHERE PHOTO IS NOT NULL AND PHONE <>"" ORDER BY LettingID DESC" That seems OK, except fp_sQry="SELECT * FROM LettingData WHERE PHOTO IS NOT NULL AND PHOTO <>"" ORDER BY LettingID DESC should be single quotes?
_____________________________
I hope The Boss isn't reading this, ...she thinks I program everything!
|
|
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
|
|
|