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
asp.net Why does'nt these required fields work. Only the Phone field works?
Access 2007 Linked to Sharepoint with Drop-downs - type mismatch
Remove first 5 characters from SQL
Combo Box List index
Changing Default Calendar in Outlook 2007
Missing References
DHCP not updating DNS Reverse lookup zones
Cisco ASA 5510 ASDM - Allowing PING AND TRACECERT through
Find bottom level of an SQL Tree
How To Disable CTRL-COMMA Shortcut ?