A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SQL problem on DELETE



 
 
Thread Tools Display Modes
  #1  
Old August 19th, 2004, 06:54 PM
ChrisP
external usenet poster
 
Posts: n/a
Default SQL problem on DELETE

I have a table which has 5 primary keys. I am having a
problem when I try to run a DELETE statement.
3 of the Primary keys are a Date/Time type.

The error message is a Data Type Mismatch error.
I know it has to do with the 3 keys that are Date/Time
types.

Here is my SQL:

DELETE FROM Case_Issue_Tech_t WHERE [Case#] = '123' AND
[Issue#] = '123' AND TechID = '123' AND [Date] = 'a date'
AND [Time_Start] = 'a start time' AND [Time_End] = 'an
end time'

Thanks for your help head of time,
Chris



  #2  
Old August 19th, 2004, 07:53 PM
Gerald Stanley
external usenet poster
 
Posts: n/a
Default

Are you enclosing your date/time parameters in ## marks?
The example below has them enclosed in '' marks which would
certainly give a type mismatch error.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
I have a table which has 5 primary keys. I am having a
problem when I try to run a DELETE statement.
3 of the Primary keys are a Date/Time type.

The error message is a Data Type Mismatch error.
I know it has to do with the 3 keys that are Date/Time
types.

Here is my SQL:

DELETE FROM Case_Issue_Tech_t WHERE [Case#] = '123' AND
[Issue#] = '123' AND TechID = '123' AND [Date] = 'a date'
AND [Time_Start] = 'a start time' AND [Time_End] = 'an
end time'

Thanks for your help head of time,
Chris



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Statement in VBA - Problem with "Like" General Discussion 6 August 5th, 2004 01:30 AM
Function isn't available in expressions in query expression Reiner Harmgardt General Discussion 4 July 21st, 2004 09:30 AM
Runtime Error 2046, when I try to delete a record in an SQL Server table (through an Access 2000 Interface) Nuno Almeida General Discussion 0 July 14th, 2004 11:54 AM
SQL problem - need advice wthebnartheujkelsbnt Running & Setting Up Queries 1 June 22nd, 2004 03:37 AM
Difficult SQL problem David Running & Setting Up Queries 1 June 4th, 2004 10:46 PM


All times are GMT +1. The time now is 05:51 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.