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
 Other Forums
 Other Topics
 missing expression PLEASE HELP

Author  Topic 

fahim1234
Starting Member

7 Posts

Posted - 2011-01-04 : 12:48:33
can u check whats wrong with this code database experts

INSERT INTO TIME_DIM (TIME_ID) VALUES ('3') (SELECT COLUMN5 FROM SPREADSHEET2 WHERE TIME_ID = '1');

the error is missing expression

thanks

PLEASE HELP ASAP

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-01-04 : 14:00:41
You're mixing the two forms of insert.

Insert is either
INSERT INTO ...
VALUES ...

Or

INSERT INTO ...
SELECT ...

Not a mixture of both,

--
Gail Shaw
SQL Server MVP
Go to Top of Page

fahim1234
Starting Member

7 Posts

Posted - 2011-01-05 : 06:37:06
Fanq very much 4 ur help :D

tyutyu
Go to Top of Page
   

- Advertisement -