Forum Replies Created

Viewing 3 posts - 1 through 4 (of 4 total)

  • RE: TRY_CONVERT not recognized

    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...

  • RE: help with the query

    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...

  • RE: copy using xp_cmdshell

    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...

Viewing 3 posts - 1 through 4 (of 4 total)