Forum Replies Created

Viewing 15 posts - 4,546 through 4,560 (of 5,504 total)

  • RE: parse comma-delimited list into seperate columns

    WayneS (1/11/2010)


    Well, the concept comes from Jeff. 'nuf said. 😉

    Well, the CrossTab solution I used is based on one of Jeff's articles as well...

    Let's see, which one is going to...

  • RE: parse comma-delimited list into seperate columns

    Is there any predefined order the data have to show up in the columns?

    Based on your sample data it looks like the following would help (as a second step to...

  • RE: How to return rows with same value in one column and not same value in another column

    Untested, since there are no data provided to test against:

    ;with cte as

    (

    select UserID

    from table

    group by UserID

    having count(*) >1

    )

    select table.* from table inner join cte on cte.UserID = table.UserID

  • RE: Need advice to design table

    You might think about using a calendar table.

    Search this site for details.

    An example can be found for instance here .

    You could also have a look at the link in...

  • RE: Please Reply. I need a stored procedure based on some conditions.

    Just for the record of it:

    the solution shahid posted has been provided by ramireddy at social.msdn .

  • RE: Import Multiple flat files with different structure into a single table

    Would you mind sharing some more details regarding the file structure and if those files are located in the same folder or have a "patterned" file name?

    Also, would you share...

  • RE: SQL Query Help

    Something along those lines?

    Note: The CASE statement is used to set a "flag" depending on the mode and then simply adding the "Flags"...

    SELECT T1.ItemName, COUNT(T1.ItemName) AS TOTAL,

    sum(case WHEN Mode='AAA' THEN...

  • RE: Pivot Result

    Does "a column" means ONE column including the comma separated list?

    If you need the data in a table with each value in its own column then please have a look...

  • RE: Pivot Result

    Do you need the output o be one column each or a list of comma separated values?

  • RE: sp needed

    This will take several steps:

    Step 1: convert the string into a table

    Step 2: separate the value of the first item

    Step 3: Build a cross tab (see the related link in...

  • RE: OpenXML : If a node exists

    To get the columns and the corresponding values you could use the following code (using XQuery and your sample data):

    DECLARE @in_values xml

    SET @in_values = '<root><column_name><node_a>value1</node_a><node_b>value2</node_b></column_name></root>'

    SELECT DISTINCT

    T.n.value('localname[1]', 'varchar(100)')...

  • RE: Convert DateTime to MMDDYY

    To even confuse a little more, 010409 might be as well interpreted as April 9th 2001...

    I probably would even include the format in the string and truncate it where needed...

  • RE: OpenXML : If a node exists

    TcW_1978 (1/7/2010)


    but I can't know if the field node_c needs to be updated to null or if the node_c doesn't exist in my xml string...

    Is there a way I...

  • RE: OpenXML : If a node exists

    What xml element/attribute describes the column name?

    Your examle is only using data from a column. There is nothing indicating any relationship between node_a and localname, meaning: How do you know...

  • RE: IsNumeric not working

    It's hard to tell without sample data.

    Please provide table def, sample data to play with and expected results as described in the first link in my signature.

Viewing 15 posts - 4,546 through 4,560 (of 5,504 total)