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
 Adding Text field to a Date field in a query

Author  Topic 

edusqluser
Starting Member

15 Posts

Posted - 2010-07-09 : 16:41:58
How to modify the query below to include a query from a text field and/or text('xxxx').

REPLACE (CONVERT (VARCHAR(10), '@@END_DATE@',101 ), '/', ''),

THX, EDUSQLUSER

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-07-09 : 18:14:43
I have never seen something like @@END_DATE@ in T-SQL.


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

edusqluser
Starting Member

15 Posts

Posted - 2010-07-09 : 18:35:34
Sorry thats a declared value earlier in the query

THX, EDUSQLUSER
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-07-10 : 10:11:32
declare @@END_DATE@ datetime
set @@END_DATE@=getdate()

select
REPLACE (CONVERT (VARCHAR(10), @@END_DATE@,101 ), '/', '')+'xxx'



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

edusqluser
Starting Member

15 Posts

Posted - 2010-07-11 : 19:35:36
Thank you. Duh! Silly me!

THX, EDUSQLUSER
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-07-12 : 02:37:15
welcome


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

- Advertisement -