Forum Replies Created

Viewing 15 posts - 4,726 through 4,740 (of 5,502 total)

  • RE: XQuery

    You need to add the namespace definition before your query:

    ;WITH XMLNAMESPACES (

    yournamespace 'your namespacefiles'

    )

    SELECT

    If you have problems getting it to work, please post the few...



    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: Stock Control in SQL Products Table

    We do it pretty much the same with just a little difference:

    Instead of having three tables like Lowells solution has, we're using one table with positive values for received /...



    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: Need help with Grouping and Rollup

    It looks like either your result set does not match your requirement or your requirement is still unclear...

    Example:

    companynamedistrictnamestorenbrbusinessdateMatureMathAudioBooks

    OnlineDotComHuntsville00052009-09-07 00:00:00.00017521752360

    OnlineDotComHuntsville00052009-09-07 00:00:00.00023882388519

    OnlineDotComHuntsville00052009-09-07 00:00:00.00019931993379

    It shows that there is more than one row for...



    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 Issue

    This common requirement usually can be resolved using a calendar table.

    Search this site for "calendar table" and you'll find a variety of solutions and discussions related to it.

    If you have...



    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: Need help with Grouping and Rollup

    If I understand correctly you want to have the rollup result value before the values rolled up as opposed to the SQL standard.

    The closest I could come up with 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]

  • RE: XML into a table

    One possible reason for not having an answer yet might be your rather large xml together with a missing result set to compare to.

    Try to reduce your sample xml to...



    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 searched String to number

    Please can you help me out.

    Is it possible to Group By an Alias column name?

    Simple answer: Yes and no. 😉

    Yes, if you would wrap your query into a subquery or...



    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: Select statment problem in cursor using datetimes

    I thought about providing some sample code for a set based solution, too. But since I couldn't find any place in the code where the OP used the variable @entrydateconv...



    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: Select statment problem in cursor using datetimes

    A few things to notice:

    1) (regarding your question)

    The problem is with @entrydateconv = DATEADD(day,-29,getdate()) .

    Since you "normalized" @entrydateconv, your WHERE condition will only be true exactly at midnight for each...



    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: getting the nth highest value

    Hi Nabha,

    I'll stop guessing and step back until I see some expected results (now that you've done the first part of providing sample data 😉 ).



    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: decoupling systems

    It sounds like a job for Service Broker.

    It's a little bit tough to get it started, but once it's runnning, it's running...



    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: getting the nth highest value

    If the following won't give you the expected result you need to follow Nabha's advice and give us something to test against.

    For details on how to post sample data please...



    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: Rows to columns + count

    You could have a look at the following articles referenced in my signature: CrossTab or Dynamic Cross Tab (if DataSrc contains an unknown list of elements).

    I assume you're using SQL2000...



    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: Exporting Data to CSV file

    Would it be possible for you to wrap the columns using a string character e.g. " ' "?

    Sample data:

    CREATE TABLE csv(id int, data varchar(30))

    INSERT INTO csv

    SELECT 1, 'single value: a'...



    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: Use calculated column name in query again in the same query

    Or you could replace [pprice] with its original calculated fields (please note that I change your query in terms of ISNULL usage):

    select productname, (uprice+sprice) As pprice, IsNull(uprice+sprice,0) As pprice2

    from...



    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 - 4,726 through 4,740 (of 5,502 total)