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
How can I display a .pdf on my access form?
Excel: restrict certain fields for particular person. Make new top of page for each Division.
Setup cannot copy the file: sisraid.sys
Windows Server 2008 R2 log spooler events
Access 2007 report design question
How to run SELECT statement against DataSet object
Internet explorer crashes
DTS vbscript task that check for duplicate records using ADO gets empty recordset during off business hours and runs correctly during business hours.
CF - Syntax error in Update statement
Sum column in datagrid