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
GetUserProfileByName Issue after form is submitted
2008 server & 2000 Professional client
Converting text to date
Normal.dot NOT set to read-only, but i cannot delete or rename it
MS Access table with variable number of fields - adding field values
How to convert this VB.NET code to VC# code?
Access Calendar Control Help
VBA - Combo Box ID
Does waiting for a web service's reponse use "clock cycles"?
Web Service to upload images