Forum Replies Created

Viewing 15 posts - 2,971 through 2,985 (of 5,502 total)

  • RE: select Qry

    Why not

    1 1 jane doe

    3 2 joe doe

    What's the rule to select one name out of many? Min(id), Min(name), max(name) or something else?



    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: SUM() of field value for all rows grouped by date range

    Depending on the number of rows and whether the data can be aggregated asynchronously or not I would either use

    ROW_NUMBER() OVER(ORDER BY RowId ) - ROW_NUMBER() OVER(PARTITION BY RowType...



    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: SubString Help

    @derrick: I didn't copy your code! Honestly! ;-):-D



    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: SubString Help

    Based on Ninja's_RGR'us code snippet:

    SELECT LEFT(@str,LEN(@str)-CHARINDEX('\', REVERSE(@str), 1))



    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: SUM() of field value for all rows grouped by date range

    Would you mind providing some sample data that reflect table structure and data structure (e.g. How can the checkpoint rows be identified? Is there an identity column? or the like)



    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: Combine up to several records in single table into one record

    Use ROW_NUMBER() OVER(PARTITION BY Rx_Nbr ORDER BY System_ID) as pos in a CTE (or subquery)

    and select the data using

    SELECT

    Rx_Nbr,

    MAX(CASE WHEN pos=1 THEN NewNDC_Nbr ELSE...



    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: Importing XML into table

    Hi Forum Newbie ( 😉 )

    At a first glance: it's the same issue like the first file:

    There is a line where the default namespace is reset to an empty string:...



    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: Are the posted questions getting worse?

    I think we're all intrigued by the why, but there's one thing I consider being worse.

    And it's not Jack and Jeff being rejected. It's the way the decision has been...



    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: get stored procedure to loop through list of variables

    I didn't know you're trying to add some value to a 3rd party app ... 😉

    Do you know the table structure and how you need to query it to get...



    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: Help on a simply Query

    If you only need to know if a client id exists use EXISTS instead of COUNT(). See Gail's related blog[/url].

    Side note: Is there any index on clientId to support...



    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: get stored procedure to loop through list of variables

    The lock icon basically means you don't have the permission to view or modify it.

    I'd recommend you get someone with the proper permission asking him to give you a function...



    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: get stored procedure to loop through list of variables

    There is simply not enough information to give any advice.

    What do you mean by "is locked"? What is the purpose of the procedure? What is the structure of that "list...



    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: Importing XML into table

    I would use XQuery over OpenXML.

    However, I had to change your sample data:

    Your row < NewDataSet xmlns="" > will result in an XQuery error since you need to use valid...



    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: counting number of dys in a specified month

    You don't have a "source" defined to apply the WHERE clause to. Your source is a table with one row and one column holding the month of getdate():

    IF Exists (

    SELECT...



    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: How to split character from string

    to "quote" Bob Dylan:

    "How many chars can I split with this code

    before it will starting to fail?

    The answer, my friend, is written in the link[/url].

    The answer is...



    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 - 2,971 through 2,985 (of 5,502 total)