Viewing 3 posts - 1 through 4 (of 4 total)
It possible to 2012 server...,
SELECT TRY_CONVERT(datetime2, '12/31/2010') AS Result;
select @@version
Result...
2010-12-31 00:00:00.0000000
Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
Feb 10 2012 19:39:15
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT...
June 16, 2016 at 8:10 am
You have without duplicate data use union...,If you want with duplicate use union all......
select * from (select * from log_table where from_user_id in (select userid from employee_table)
union
select * from...
June 16, 2016 at 8:04 am
Try this query...,before set configures of xp_cmdshell
declare @aaa varchar(40)
set @aaa=(select @@servername)
declare @bbb nvarchar(500)
set @bbb='select name from sys.databases'
exec(@bbb)
declare @BCP nVarchar(500)
set @BCP ='bcp "'+@bbb+'" queryout "D:\output.txt" -c -t, -T -S '+@aaa+''
EXEC master..xp_cmdshell...
June 16, 2016 at 7:05 am
Viewing 3 posts - 1 through 4 (of 4 total)