Forum Replies Created

Viewing 15 posts - 151 through 165 (of 428 total)

  • RE: Recursion - find last child

    Some DDL and a test set. Alas, I lost some valuable time writing this while you could have easily provided it yourself 🙁 -see the posting etiquette link in...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: ROW_NUMBER and Group By

    Recurs1on (3/6/2012)


    I have no idea why your query doesn't work, but if you re-write it as follows, it seems to work fine.

    WITH SALES

    AS (

    SELECT

    ...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: BETWEEN

    Yeez, it's a game. And the only thing you can win is 'points'...

    Get a life guys.



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: UNIQUE NOT NULL vs PRIMARY KEY

    What differences have you found so far? Try and explain in your own words and you'll either get applause or explanations where you've gone wrong.



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Epoch date and style

    Gianluca Sartori (3/6/2012)


    The important thing is that the datetime column stores the right value.

    To change the way it displays on the report, try changing the report field.

    i.e. assuming the name...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Service Broker Transactions

    As usual when service broker is involved the code is bit lengthy, but it is a good question.

    In my experience errors like these are less likely if you get used...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: MSDB Tables/Views

    And again I learned something. I've never had to use dbmail so far. So I googled and quickly found the right answer 😉

    Thanks



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: BETWEEN

    I too was looking for the catch for a while and then decided there was none. Nice, basic question. Thanks



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: How to do column mapping with data in text file?

    Have a look at openrowset(). This can be used to read from a file on the server's file system (if the admin permits it. If not you'll get a lot...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Insert Trigger Help

    Now that you've explained that this is for study purposes, we'll be able to give you the information on a level that you will be able to understand.

    You'll have to...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Insert Trigger Help

    User ZIYkkE22ol has been reported.



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: errors in table data insert from one database to another

    ladyblue1075 (3/4/2012)


    Ok. This answers one of the errors. I'll note that. Thanks, Grasshopper!

    manukumar (3/4/2012)


    You can not truncate the table if any column is referred by any other table like primary...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: How to do column mapping with data in text file?

    Your bulk insert doesn't need to go into the production database directly. i.e. You can ask your admin to create a separate 'staging' database on the same server as your...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: how to print all the column names with in a table in one row from sys table without pivot

    ColdCoffee (3/2/2012)


    This?

    SELECT OutTab.TABLE_NAME,

    STUFF ( (

    SELECT ', '+InTab.COLUMN_NAME

    ...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: how to sum of two tables value

    Best use a 'calendar table'; A table that has a row for each period that you want to group by on. Such tables are very handy in many queries, so...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

Viewing 15 posts - 151 through 165 (of 428 total)