Forum Replies Created

Viewing 15 posts - 2,251 through 2,265 (of 2,443 total)

  • RE: How to update SQL Server table from a Temp table

    Once it's linked, you can just add the server name on the front.

    UPDATE [serverName].dbname.author.table

    SET ....etc.

    Not sure how you do that if you have to look up the names...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: ORDER BY in INSERT INTO, how is it done?

    Peso (11/13/2008)


    Chirag, even if there is a clustered index on the table, it doen't mean that records are stored physically in same order.

    I know Itzik Ben-Gan has demonstrated this lately.

    The...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: How to update SQL Server table from a Temp table

    gregarobinson (11/12/2008)


    "since it appears the databases exist on the same server, you could do this:"

    They do not, they exist on 3 different servers.

    Each row in the temp table...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: remove sql server date time default value

    Look up datetime in BOL for an explanation of why, it's actually returning a value that is compared to 1/1/1900 00:00:00.

    You should either pick a different default date...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Storing Negative Numbers

    Jeff Moden (11/10/2008)


    Heh... if you really want to throw a ball of wax at them before you decide to find a place with reasonable requirements, tell them the column should...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Retrieve variable value from dynamically concatenated variable

    do you really need to name the variables differently depending on the parameters? can't you just call it @param1, @param2, @param3, and let the data figure out what's in what?

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Retrieve variable value from dynamically concatenated variable

    rbarryyoung (11/7/2008)


    This may well be the "Worst use of SQL, in 20 lines or less" that I have seen in quite some time...

    We should post that as a...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Retrieve variable value from dynamically concatenated variable

    I think you're trying to create too many levels between what you're attempting and dynamic generation of queries and variables.

    You also have double quotes around ''@dr_'' just before adding...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Retrieve variable value from dynamically concatenated variable

    toward the end of your code you have this:

    'set @DRname = ''@dr_'' + @target_variable2' + char(10) +

    'PRINT @DRname '

    which is setting @DRname to the string...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: How to findout the length of a string variable in sql server 2000

    technically you would only need len(ltrim(someString)), len ignores trailing whitespace.

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Query with some data repeated

    rbarryyoung (11/4/2008)


    I am not in aposition to test it, but this should be cloes:

    Select V.[Vendor ID], CY.TotalBags as [Bags Last Year], LY.TotalBags as [Bags This Year]

    From Vendors V

    Left Join...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Why can you use"-+-+-+" in tsql?

    Grant Fritchey (11/4/2008)


    I'm well and thoroughly confused by what business problem we're hoping to solve here. Or are we just engaged on an entertaining, though useless, mind excercise?

    http://www.sqlservercentral.com/articles/Editorial/61757/

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Is there a function which determines if a varchar is a number?

    thanks, I couldn't find it either.

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Query with some data repeated

    Any chance you feel like translating for 2000? I have the same issue, although I'm playing with diagnoses instead of specialty, but I can convert that part.

    Like the OP, I...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Why can you use"-+-+-+" in tsql?

    Grant Fritchey (11/3/2008)Sometimes a programming language lets you do something confusing or counter-productive, but that doesn't mean you should.

    dang, there goes my whole philosophy of programming . . .

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

Viewing 15 posts - 2,251 through 2,265 (of 2,443 total)