Forum Replies Created

Viewing 8 posts - 106 through 113 (of 113 total)

  • RE: Last day of Month

    declare @year int

    declare @uptomonth int

    declare @Date datetime

    set @year=2011

    ...

  • RE: Last day of Month

    declare @year int

    declare @uptomonth int

    declare @Date datetime

    set @year=2011

    ...

  • RE: ISNULL DATE_TIME

    ISNULL(load_date) ? 01/01/1111 : load_date

    when user load_date is datetime at that time 01/01/1111 is not supported sql server.

    sql server support date starting from 01/01/1753.

  • RE: sqlquery

    BACKUP DATABASE [AdventureWorks] TO

    DISK = N'\as\Backup\L40\SQL2005\AdventureWorks_backup_200702120215.bak'

    WITH NOFORMAT, NOINIT, NAME = N'AdventureWorks-Full Database Backup',

    SKIP, NOREWIND, NOUNLOAD, STATS = 10

  • RE: Logic for Stored Proc for selecting multiple comma separated values in parameter?

    create function split(@par varchar(max)

    returns table

    declare @t table(id varchar(max))

    declare @val varchar(100)

    begin

    while charindex(',',@par)>1

    begin

    set @val=substring(@val,1,(charindex(',',@par)-1))

    insert into @t1 values(@val)

    set @par=substring(@par,(charindex(',',@par)+1),len(@par))

    end

    insert into @t1 values(@par)

    return @t1

    end

    -----------

    example

    select split('a,b,c')

    o/p

    ----------

    a

    b

    c

  • RE: who to write query.

    Thanks.

  • RE: who to write query.

    when i am using above query in below in put but i am not getting excute out put

    pls help me.

    -------input---------

    todateidSMBM

    2011-05-25 00:00:00.000R10321Gaurav MehtaMihir Vaidh

    2011-06-20 00:00:00.000R10321Chintan RavalArjun M Moorjani

    2011-06-20 00:00:00.000R10321Gaurav MehtaRajesh Parmar

    2011-08-17...

  • RE: who to write query.

    Thanks

    It is wotking fine.

Viewing 8 posts - 106 through 113 (of 113 total)