Forum Replies Created

Viewing 15 posts - 1 through 15 (of 74 total)

  • RE: xml path comma separated values in sql query

    Hi,

    I would suggest using a Tally-table (numbers-table) for this:

    -- table definition and data

    declare @CallDetailReport table

    (

    CallStartDateTime datetime,

    NodeTraversed nvarchar(MAX)

    )

    insert into @CallDetailReport (CallStartDateTime, NodeTraversed)

    select '2014-09-22 03:44:33', 'Srinivas;vasu;lakshmi;srini;srini'

    union all select '2014-09-20 09:42:00',...

  • RE: Create dummy data from Sub Table

    fjchairul (9/12/2014)


    Hi,

    I need advise on how to create dummy data from sub table.

    1. I have 2 table, 1 is Main Table and another one is Sub Table.

    2. I have Full...

  • RE: Merge count by grouping variables back into source table

    Scott In Sydney (7/15/2014)


    Summary: I need to identify which records are violating a unique index to get the source file fixed.

    Details: Apologies, I know this should be simple,...

  • RE: Split Value and Convert Hex to Decimal

    agbondoc (8/19/2014)


    Hi everyone,

    I have been task to decode a very long Hex string to decimal for further analysis. The output I'm told should be two (2) columns between 2,000...

  • RE: remove line breaks from xml

    raymond.konker.williams (9/4/2014)


    Help how can i remove line breaks from my xml data when i export it to excel it breas

    Not so much information about how you are doing things, it...

  • RE: Find specific values in sql XML-query

    Hi,

    This code will get the c11 that have the same "m"-attribute as the c10 with the value 19:

    -- set up some testdata

    declare @xml xml

    set @xml = '<row id="10000000" xml:space="preserve">

    <c1>Name 1</c1>

    <c2>Name...

  • RE: TSQL no longer working in SQL2012

    Hi,

    It seems as if TEN.[tncy-sys-ref] is numeric or int?

    If you want the result as a char, you probably have to adjust Gilas code by adding another CAST:

    CAST(TEN.[tncy-sys-ref] AS CHAR(7 /*...

  • RE: Error on Subquery

    Thanks Chris,

    I was too quick and missed the inner group by, which is the most likely to give the error...

    /Markus

  • RE: Error on Subquery

    Hi Hoseam,

    it seems as if the table PR_REB_TAX_RATE can have more than one entry for each EFF_DATE. And at least one of the selected rows in PR_FUND_REBATES has a REBATE_PAID_DATE...

  • RE: Parsing XML Data to return a specific node

    Hi,

    I'm not familiar with the XML syntax in SQL Server 2000, but I found this page that contained some information: http://msdn.microsoft.com/en-us/library/aa276847(v=SQL.80).aspx.

    I tried a little and came to this (not finished)...

  • RE: How do they do that?

    Hi Lance,

    It sounds as you want to normalize the data while importing.

    Here is an example on how this can be done:

    -- Reference table

    DECLARE @cities TABLE (

    idintIDENTITY(1,1),

    namevarchar(50)

    )

    INSERT INTO @cities (name) VALUES...

  • RE: Need Help with Capacity growth script

    Hi hydbadros,

    I'm not sure how you would like to calculate the growth from your table, but here is an example of how it can be done, where I have tried...

  • RE: Using TABLE VARIABLES TO perform this task

    Hi,

    you could do something like this:

    DECLARE @Duplicates AS TABLE (idint)

    /* Create a list of duplicate ID:s that are to be removed */

    INSERT INTO @Duplicates

    SELECT ID FROM MESSAGE

    WHERE ID NOT IN...

  • RE: Recursive CTE

    Hi Chris,

    I don't know why, but it seems as if the CTE first follow one branch to the top, before following the next, but then all by a sudden all...

  • RE: An Alternative for DISTINCT AND GROUP BY by using ROW_NUMBER()

    Hi,

    why don't you want to use DISTINCT or GROUP BY?

    /Markus

Viewing 15 posts - 1 through 15 (of 74 total)