Forum Replies Created

Viewing 15 posts - 16 through 30 (of 39 total)

  • RE: rtrim based on character

    My table column datatype is

    [nvarchar](max) NULL,

    The data is imported from xml, so it is coming in new line with carriage return

  • RE: rtrim based on character

    I am unable to get result since,

    My Table column is having data as stored as below in the nvarchar(max) datatype

    ---------------------------------------------------------------------------------

    '(Type is HO) and

    (Location is Europe)...

  • RE: rtrim based on character

    declare @t table

    (

    s varchar(8000)

    )

    insert @t

    values('(Location is Asia)'),

    ('(Location is Asia and Location is Africa)and Branch in AR and Branch in SE'),

    ('(Location is Europe)and Branch in AR and Branch in SE'),

    ('(Type is...

  • RE: Find char in function variable

    CREATE TABLE #SampleData(

    SomeTextvarchar(1000))

    INSERT #SampleData SELECT

    '( Branch is not CA and Branch is not MX)' UNION ALL SELECT

    '( Branch is not CA and Branch...

  • RE: Find char in function variable

    Thanks Luis for the code.

    How to send them to different column ?

    Like,

    select dbo.GetRelevantCity(ColumnA , 'BI') as BranchIn , dbo.GetRelevantCity(ColumnA, 'BN') as BranchNotIn ,

    dbo.GetRelevantCity(ColumnA, 'BN') as OtherInfo from...

  • RE: Show only Parent and 1st Child

    Thanks for the link and scripts.

  • RE: Proivde Hierechy wise sum and display all

    dwain.c (1/9/2014)


    Something like this perhaps?

    WITH rCTE AS

    (

    SELECT b.Mode_ID, b.Mode_info, Mode_Detail=Mode_info, QA, QC, QY, Mode_Sno, b.Has_Nodes

    FROM Travel_Quantity a

    JOIN Travel_Master...

  • RE: Proivde Hierechy wise sum and display all

    Since my Values are NULL, I was not getting the complete result for QY Column.

    Instead of

    ROADAUDI0084

    ROADBMW0036

    I need result as.. calculation against the immediate parent only.

    ROADAUDI0018

    ROADBMW0042

    Kindly suggest

  • RE: Proivde Hierechy wise sum and display all

    Hi,

    Thanks for your SQLQuery !

    But, In The QY Column, I am NOT getting values for all chils.

    Data is showing only for

    CAR BMW ...

  • RE: Proivde Hierechy wise sum and display all

    Sean Lange (1/9/2014)


    Shanmuga Raj (1/9/2014)


    Sean Lange (1/9/2014)


    Excellent job posting ddl and sample data. I can't understand what you want for output. I can't seem to figure out the relationship between...

  • RE: Proivde Hierechy wise sum and display all

    Luis Cazares (1/9/2014)


    You might want to review your sample data as it won't give the expected results. Root for ship and boat is air and some multiplications won't give the...

  • RE: Proivde Hierechy wise sum and display all

    Sean Lange (1/9/2014)


    Excellent job posting ddl and sample data. I can't understand what you want for output. I can't seem to figure out the relationship between these tables.

    I think that...

  • RE: Get Groupby hierchy Records

    Error In My query, I need to have ROAD instead of car.

    Expexted

    AIR 0

    SEA SHIP ...

  • RE: Get Groupby hierchy Records

    below is the solution

    thanks

    with cte

    as (select load_id

    ,mode_sno

    ...

  • RE: sum of columns based on new group

    dwain.c (12/19/2013)


    Note that if you want Quantity on the line with the SubProduct to be zero, just change this line:

    VALUES(a.[Product Id], SubProduct, NULL), (a.[Product Id], NULL,...

Viewing 15 posts - 16 through 30 (of 39 total)