Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: sql statements concerning date


Message #1 by hengkit.cheong@n... on Tue, 20 Mar 2001 09:59:37
Hi,



I'm using Access 2000 with ASP 3.0 on PWS.

I'm trying to run a sql statement that matches a date/time field in the 

database. 



the sql statement is:



SELECT issue_id, issue_name

FROM issue

WHERE issue_date = 3/20/2001;



I know for sure that there is a record in the database that matches the 

date 3/20/2001 but when I run the sql command, I don't get any results.



Is there any reserved word or special sql statement that I need to use to 

make this sql statement work?



thanks.



Regards,

kit.
Message #2 by "Dallas Martin" <dmartin@z...> on Tue, 20 Mar 2001 08:15:15 -0500
You need to enclose the date within either quotes or pound signs

("3/12/200",#3/12/2000#)



----- Original Message -----

From: <hengkit.cheong@n...>

To: "ASP Databases" <asp_databases@p...>

Sent: Tuesday, March 20, 2001 9:59 AM

Subject: [asp_databases] sql statements concerning date





> Hi,

>

> I'm using Access 2000 with ASP 3.0 on PWS.

> I'm trying to run a sql statement that matches a date/time field in the

> database.

>

> the sql statement is:

>

> SELECT issue_id, issue_name

> FROM issue

> WHERE issue_date = 3/20/2001;

>

> I know for sure that there is a record in the database that matches the

> date 3/20/2001 but when I run the sql command, I don't get any results.

>

> Is there any reserved word or special sql statement that I need to use to

> make this sql statement work?

>

> thanks.

>

> Regards,

> kit.

Message #3 by "Tomm Matthis" <matthis@b...> on Tue, 20 Mar 2001 08:13:14 -0500
Surround the date part with #, as in:

WHERE issue_date =3D #3/20/2001#;







Tomm





> -----Original Message-----

> From: hengkit.cheong@n... [mailto:hengkit.cheong@n...]

> Sent: Tuesday, March 20, 2001 10:00 AM

> To: ASP Databases

> Subject: [asp_databases] sql statements concerning date

>

>

> Hi,

>

> I'm using Access 2000 with ASP 3.0 on PWS.

> I'm trying to run a sql statement that matches a date/time field in 

the

> database.

>

> the sql statement is:

>

> SELECT issue_id, issue_name

> FROM issue

> WHERE issue_date =3D 3/20/2001;

>

> I know for sure that there is a record in the database that matches 

the

> date 3/20/2001 but when I run the sql command, I don't get any 

results.

>

> Is there any reserved word or special sql statement that I need to use 

to

> make this sql statement work?

>

> thanks.

>

> Regards,

> kit.

> ---

> SoftArtisans helps developers build robust, scalable Web applications!

> Excel Web reports, charts: 

http://www.softartisans.com/excelwriter.html

> File uploads: http://www.softartisans.com/saf.html

> Transactional file management: http://www.softartisans.com/saf1.html

> Scalability: http://www.softartisans.com/saxsession.html

> ASPstudio value pack: http://www.softartisans.com/aspstudiosuite.html




> $subst('Email.Unsub')

>

>



Message #4 by "Asmadi Ahmad" <chloro@e...> on Tue, 20 Mar 2001 21:31:22 +0800
I think u need to put the date in this format  #3/20/2001#



www.effitech.com



----- Original Message -----

From: <hengkit.cheong@n...>

To: ASP Databases <asp_databases@p...>

Sent: Tuesday, 20 March, 2001 9:59 AM

Subject: [asp_databases] sql statements concerning date





> Hi,

>

> I'm using Access 2000 with ASP 3.0 on PWS.

> I'm trying to run a sql statement that matches a date/time field in the

> database.

>

> the sql statement is:

>

> SELECT issue_id, issue_name

> FROM issue

> WHERE issue_date = 3/20/2001;

>

> I know for sure that there is a record in the database that matches the

> date 3/20/2001 but when I run the sql command, I don't get any results.

>

> Is there any reserved word or special sql statement that I need to use to

> make this sql statement work?

>

> thanks.

>

> Regards,

> kit.


  Return to Index