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
 General SQL Server Forums
 New to SQL Server Programming
 getDate()

Author  Topic 

Wouter Benoit
Starting Member

23 Posts

Posted - 2007-12-27 : 04:02:10
Hello,

I'm new to SQL server and I'm trying to insert the system time into a table.

I'm using following insert statement. But I get an error 'incorrect syntax near the keyword select'

INSERT INTO today(datum) VALUES(SELECT getdate() FROM today)

The datatype of datum is Datetime

Can someone please tell me what I'm doing wrong

Thanks

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2007-12-27 : 04:05:55
insert into today(datum) select getdate()

Vinod
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page
   

- Advertisement -