Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: Using SQLCMD and redirecting the output not working

    call "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd" -U hrm_usr -P xxxx -S 0000serppcls1b\erp1b -d HRMPROD -i C:\AMSADV3\AMSJobInteractionClient\scripts\HRMPRODJBMGR\SQL\RegGTN\No_Hours.sql

    -o %LOGDIR%\RegGTN\No_Hours.txt

    Would that work for you?

  • RE: Concatenating Rows

    A CTE way of doing it

    -- Create a variable as table

    DECLARE @Fruit TABLE (

    ID INT,

    Name varchar(25)

    )

    -- Populate the table with sample data

    INSERT INTO @Fruit(ID, Name)

    VALUES

    (101,'Apple')

    ,(102,'Banana')

    ,(103,'Orange')

    ,(104,'Melon')

    ,(105,'Grape')

    -- Lets us create two...

Viewing 2 posts - 1 through 2 (of 2 total)