Forum Replies Created

Viewing 15 posts - 5,416 through 5,430 (of 5,502 total)

  • RE: How could i get following result

    Hi,

    did you try the PATINDEX function?

    The following code will check the start position of each value from your table within the given search string.

    It will return the max. number with...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Transposing rows into columns

    Hi,

    I need to ask the same questions as in my previous post again since you didn't answer one of them yet.

    You're just rephrasing the original question.

    When I asked how the...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Transposing rows into columns

    Hi,

    could you please describe a little more the purpose of your requirement together with some code you've tried so far?

    What kind of project are you woring on?

    How can be determined,...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Convert column into row

    Easiest answer: Try and you'll see the difference...

    Or, to explain it without trying:

    The substring function removes the first two characters, which are a comma and a blank as per the...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: PIVOT function in SQL SERVER 2005

    Hi,

    you're missing an aggregate function over the column DayToreceive.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: OPENROWSET load of XML file showing empty result for *most* files

    Hi Karen,

    I can't really see any difference.

    Attached please find a screen shot of the code I used and the results I got.

    Looks like the code is identical to yours.

    Are you...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: OPENROWSET load of XML file showing empty result for *most* files

    Hi Karen,

    I just tested both of your attached files and both show up using the code you provided.

    There seems nothing to be wrong.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: OPENROWSET load of XML file showing empty result for *most* files

    Please don't cross post.

    For replies please refer to post http://www.sqlservercentral.com/Forums/FindPost703604.aspx



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Insertion Problem

    Hi JacekO,

    the issue regarding the update statement for this specific procedure has been discussed in the following thread:

    http://www.sqlservercentral.com/Forums/FindPost681895.aspx

    Your code snippet in post http://www.sqlservercentral.com/Forums/FindPost703959.aspx is the scripted form of the...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Create SP with Invalid Syntax

    You should not leave the code just "as original as possible".

    Either fix it to be runable code again (returning the same results as original) or drop it. If needed, you...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Shredding XML help

    Glad I could help.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Shredding XML help

    Hi,

    you need to declare the namespace you're using (xmlns:p1).

    The SELECT statement is the same. I Just added the NAMESPACE declaration.

    ;WITH XMLNAMESPACES (

    DEFAULT 'OtherInfo',

    'http://www.w3.org/2001/XMLSchema-instance' AS p1

    )

    SELECT tab.col.value('../../@MerchantNumber','varchar(50)') AS 'MerchantNumber',

    tab.col.value('@TerminalID[1]','varchar(4)') AS 'TerminalID',

    tab.col.value('@GrossSalesSubmitted_1[1]','varchar(50)')...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Transpose Rows in to Coumns

    Hi,

    please see the following article on how to use cross tabs to get the results you ask for.

    http://www.sqlservercentral.com/articles/T-SQL/63681/

    If you need to get specific answers for your issue please read the...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Shredding XML help

    Hi, you need to reference a value to the inner most hierarchy level and go up from there to reference elements from higher hierarchies.

    Example (note: I copied your xml structure...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: insert same colums in couple of tables

    Vijaya Kadiyala (4/14/2009)


    There are so many ways to write a script.

    Couple of points:

    1) What if the table names are not same ex: DEPT,EMP,LOCATION etc.

    2) What if the table names are...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 5,416 through 5,430 (of 5,502 total)