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  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > insert into

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-17-03, 21:55
pencil pencil is offline
Registered User
 
Join Date: Dec 2003
Posts: 3
Unhappy insert into

I have a table with dates which is of type "datetime", but entering in SQL code such as :

INSERT INTO test (code, date)
VALUES (34, '08/08/03')

produces an error allong the lines of: You cannot assign a value of type 'integer' to a column of type 'date'. Explicitly convert the value to the required type

I've tried changing '08/08/03' to 'Aug-08-2003' and '8/8/03' and '08/08/2003' etc etc... does anyone have any ideas why this isn't working??
Reply With Quote
  #2 (permalink)  
Old 12-17-03, 22:11
pencil pencil is offline
Registered User
 
Join Date: Dec 2003
Posts: 3
oh don't worry... i'm such a noob was writing to the wrong table and didn't notice...sorry everyone
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On