Microsoft
Software
Hardware
Network
Question : SQL Rewrite this dateadd line
How can I name this with the date?
SELECT
@Day2 As DATEADD(DAY, -1, GetDate()),
The resulting field name I need - '01/21/2010'
with the data @Day2
Answer : SQL Rewrite this dateadd line
thats not possible without using a dynamic sql
DECLARE @Day2 DATETIME = Getdate()
DECLARE @sql VARCHAR(1000)
SET @sql = 'SELECT '+ CONVERT(VARCHAR, @Day2, 112) + 'As "'+ cast( DATEADD(DAY, -1, GetDate()) AS varchar) +'" '
EXEC (@sql)
Random Solutions
Sending Object Via MessageQueue
How to Publish a web service in remote server
Use Acces 2007 to create a saleable package
Can you delete OCS Address Book groups?
Using a geometry type check constrint in sql sever 2008
Save and display listbox / comboBox items in Data Structure
Were can I find a Infopath 2007 trial?
Exclude if Is Not Null
Access 2007 Adp Terminal Server Memory Bloat
bypass key in msaccess