Forum Replies Created

Viewing 15 posts - 331 through 345 (of 5,502 total)

  • RE: T sql for patient arrivals, transfers In and Out and discharges and census on a hospital floor by hour

    Now we have (almost) ready to use sample data.

    "Almost" because I can't load the sample data "as is" due to a different DATEFORMAT setting, so you might consider in 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: Can I compare two max values in sql table?

    Here's one version:

    with cte as

    (

    select customer_name, max(order_date) as m_order_date, max(ship_date) as m_ship_date

    FROM [order table]

    GROUP BY customer_name

    )

    select customer_name

    from cte

    where m_order_date > m_ship_date



    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 retrive data from .QBW file

    The QBW file stores the data in a specific way so that you'll need the original software to open it.

    Using this software you could then export the data into Excel...



    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 can I see the value of parameters in stored procedure?

    Remember that I can't look over your shoulder so I can't tell you what you might have done wrong.

    Based on your very vague statement there's very little I can do....



    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 can I see the value of parameters in stored procedure?

    Did you try to use the Debug mode in SSMS?



    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 handle deleted data of a website

    Apart from this flag process, Is there any other way/approach to achieve this goal?

    See my previous post:

    ...to move the data into separate tables and performa a UNION ALL query für...



    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 report to render only the 1st page

    Change the underlying query to return only the first x result sets (TOP x ORDER BY what_you_need).



    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 handle deleted data of a website

    One option would be to move the data into separate tables and performa a UNION ALL query für your reports.

    You also might want to look into indexed filtered views if...



    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 query needed

    Since this is a dynamic query ("last 5 days" is causing a change in the column names) you'd need a dynamic CrossTab approach as described in the related article in...



    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: Text to XML data type for existing table

    how did you test the two options?

    Using Management Studio and the table design wizard or a query window and the T-SQL command?

    If the former (design wizard) then you should lok...



    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 case statement in Joins

    Here's an approach that would put you in the right direction syntactically.

    LEFT JOIN dbo.test t (NOLOCK)

    ON a.id = t.id

    AND (C.parameter = @parameter OR C.parameter IS NULL)

    AND a.rowid = CASE...



    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 Parsing Issue

    The tricky part is the namespace declaration xmlns="http://www.xyz.com".

    This will force you to use the namespace within your query as well.

    The followingcode shoud work:

    ;

    WITH XMLNAMESPACES ('http://www.xyz.com' as ns)

    SELECT t.c.value('(@triggerEvent)[1]', 'varchar(100)')

    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]

  • RE: T-SQL puzzler - given a cell in an N-dimensional space, return the cells that are inline with the given cell along each axis

    ok, it's getting slightly more complicated:

    WITH sample_cell AS

    (

    SELECT 'X' AS AxisCode, 1 AS Pos UNION ALL

    SELECT 'Y' AS AxisCode, 1 AS Pos UNION ALL

    SELECT 'Z' AS AxisCode, 1 AS Pos

    ),...



    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 am running this store procdure on new query window and it works fine but when it run through sql server agent it gives me error in three steps...

    Did you try to run the excat code on the server in question?

    My guess would be the code will also fai if run from the query window connected to 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: Is this a bad habit i need to clean up after?

    GilaMonster (11/14/2013)


    LutzM (11/14/2013)


    Just a pot shot:

    It might be driven by the developer who want to make sure the key is unique but wasn't able to define a UNIQUE PRIMARY KEY...



    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 - 331 through 345 (of 5,502 total)