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
SQL 2008 Transaction log
copying files from one machine to another
vba code to close form (with a subform) after user clicks on the back record navigation selector button
How do I insert an automatic check box for Word 2007
How to close excel file from Macro?
Remote Desktop Connection: win2003 server: local resources tab: Disk drives. Locally, can I see the drives of the computer I connect to remotely?
Access SQL - Year greater than in query
Please increase performance of this extremely slow sql statement
Microsoft SQL Server Migration Assistant for Access Problem -- "There is nothing to process"
ASP.NET Modal popup window