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
 Add text and current date to field

Author  Topic 

sqlobsessed
Starting Member

8 Posts

Posted - 2012-06-03 : 12:15:13
how do I insert getdate () with the word help? Ive tried many ways that produce errors.

set column= 'help'

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-06-03 : 14:42:29
set column= 'help ' + convert(varchar(10),getdate(),101)



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-06-03 : 14:43:50
see here for more information about converting: http://msdn.microsoft.com/en-us/library/ms187928.aspx


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

sqlobsessed
Starting Member

8 Posts

Posted - 2012-06-03 : 15:03:54
thanks so much!
Go to Top of Page
   

- Advertisement -