Forum Replies Created

Viewing 15 posts - 3,271 through 3,285 (of 5,502 total)

  • RE: How to convert query to dynamic query

    I second Michael.

    And additionally, why don't you use STRG+H in SSMS and replace every single quotation mark with a double in the required section?

    As a side note:

    dbo.fnReadField(description, ' + ''''...



    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: SQL Query help - Delete records based on above and below record values

    Let's try to clarify the business requirement:

    What would be the expected output if you'd add a row with id=10 and value =100? What rows will be ignored? (my assumption: 3,4,7,8,...



    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 data into historystart and historyend

    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: Counting number of ties after Rank() Function

    You could use your current query as a subquery/CTE and use ROW_NUMBER() OVER(PARTITION BY rank_result_column ORDER BY order_criteria).

    If this "hint" doesn't provide the help you need please post table DDL,...



    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: SQL Query help - Delete records based on above and below record values

    I would use the "quirky update" method to set a flag in a separate column (delete flag).

    For details on how to use this method please see Jeffs great article[/url].

    I consider...



    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 data into historystart and historyend

    Is the following code close to what you're looking for?

    I'm using a self referencing join based on ROW_NUMBER.

    ;WITH cte AS

    (

    SELECT *,

    ROW_NUMBER() OVER(PARTITION BY opportunityid,[MONTH] ORDER BY pricebookHistoryID ) AS...



    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: query help

    Would something like the following get the result you require?

    I used a CTE to get the rows with OrderDate within the last three month as well as the total count...



    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: query help

    Please clarify your requirement: Do you need to to show just the total number of counts within the last three months (then it wouldn't make sense to display each month...



    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 data into historystart and historyend

    Would you please clarify the content of dbo.pricehistory as well as your expected result?



    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: Extract only Numeric digits from the String -In SSIS -any transforamtion

    Which one do you consider as a "numeric digit"?

    I see two valid numeric values in each row (e.g. 90001415 and 4.000 are both valid numeric values...). Is there a deterministic...



    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: i need a query tip

    canuzun (6/22/2010)


    ...

    I will do this, i even started the create scripts but very busy day 🙁

    I will post as soon as i can, sorry.

    You know, I consider this forum...



    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: i need a query tip

    I'm not sure what the DDL for the transaction table looks like... Table def, sample data and expected result would help a lot here...

    I'd probably use "ROW_NUMBER() OVER(PARTITION BY CustomerID...



    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?

    Schadenfreude-Mei (6/22/2010)


    I think this one qualifys:

    Seriosly, how do these people get to a point where they are even alowed to look at a live server :crazy:

    I'm sure one 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: Add a proc to a role, then grant execute premissions to it

    Yes, that's all. (You'll see if you try...;-))



    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: Add a proc to a role, then grant execute premissions to it

    How about having a look at BOL, section "GRANT Object Permissions (Transact-SQL)"??



    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 - 3,271 through 3,285 (of 5,502 total)