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
help with an sql join query?
Can't stop Sharepoint workflow
How Can I Create a Unique Sequential Number for Only Those Records in a Table That Meet a Criteria
Error Calling Stored Proc
Using Stored Procedure
Append csv text to table
Mapping drives via script, setting the drives and subfolders for Offline Availability & clearing current Oflline Files Cache
Change default editor in Outlook 2010 Beta.
dos format.com - Incorrect DIS version
Merging two SQL Statements