Date problem in a SELECT sql statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,

I have a problem that I cannot figure out , please help me.
I have a colum J that contain the date such as 25/9/2005 0:00:00 (those date
come from a select in my Access database). Then, I want to use those date in
another select as follow:
SQL.REQUEST(Conx,,4,"Select mesure from piezo where no_site like '" & $M$14
& "' and date_piezo = DATEVALUE(" & J23 & ")")
As I know, this SELECT must return the mesure value, However it does not
return any value.

Any help will be appreciated
Regards,
 
Christina,
Check the actual string that you are sending. It looks as if it is something
like:
Select mesure from piezo where no_site like 'Some Value' and date_piezo =
DATEVALUE(39073)

whereas I guess you need something like:
"Select mesure from piezo where no_site like '" & $M$14 & "' and date_piezo
= " & DATEVALUE( J23 )

Also are the field names spelt correctly ?

NickHK
 
Hi Nick,

Thank for your help. I follow your way and it works correctly. Thanks
again....

Regards,
Christina
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top