Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
CREATE TABLE ORDER3
(
ORDERID INT,
CUSTOMERID INT,
ORDERDATE DATE)

tHIS CODE IS SHOWING ERROR
Operand type clash: int is incompatible with date
PLEASE RESOLVE THIS ERROR AND SEND ME THE CORRECT QUERY
Posted
Updated 20-May-15 1:09am
v2
Comments
Tomas Takac 20-May-15 6:41am    
Then use date datatype, what's the problem?
Member 11704693 20-May-15 7:03am    
WHEN I M USING DATE AS DATATYPE ITS SHOWING ERROR
CHill60 20-May-15 7:46am    
The error is when you are inserting data into this table - show us the code that is doing that.
And please stop shouting - using all capitals is rude and unlikely to get you any friends on the internet

1 solution

Try:
SQL
ALTER TABLE [dbo].MyTable
ADD OrderDate DATETIME
GO

Then just fill the table:
SQL
INSERT INTO MyTable (OrderDate) VALUES ('1996-09-18') ('1996-09-19') ('1996-09-20')
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900