Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 tsql commands against access database

Author  Topic 

rmellnick
Starting Member

4 Posts

Posted - 2004-07-21 : 16:25:02
I programed some tsql statements against a sql server that work well but was asked to include access as well. Well I used the convert function in the select statement to trip off the time from a date\time field.

Here is the select statement.

Select cba_batchname,cba_committime,110),cba_commit_id from check_batch_audit where cba_filecabinet = 'AXCheckScan'

is there any equivalent function in access?

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-07-21 : 16:38:17
Please use the Access forum for this question:

http://www.sqlteam.com/forums/forum.asp?FORUM_ID=3

Tara
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-21 : 16:51:08
You do know that statement won't run in TSQL right?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

rmellnick
Starting Member

4 Posts

Posted - 2004-07-21 : 17:01:21
MeanOldDba

Yes that will not run but If I actually post the correct querry then it does

"Select cba_batchname,convert(varchar,cba_committime,110),cba_commit_id from check_batch_audit where cba_filecabinet = '" & Trim(cmbFileCabinets.Text) & "'"
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-07-21 : 17:03:24
Derrick's not so old, but he is a mean DBA. But then again I've been told worse by one SQLTeam poster before.

Tara
Go to Top of Page

rmellnick
Starting Member

4 Posts

Posted - 2004-07-21 : 17:07:56
No harm done! glad he caught the mistake.
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-21 : 17:10:19
DateValue([date_field])

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -