Forum Replies Created

Viewing 15 posts - 2,506 through 2,520 (of 6,486 total)

  • RE: Help With SQL Update Query

    Except that you're not including the ORDERS table in your FROM clause. If you do include it there, you need to join it to your shipping table AND the...

  • RE: Ranking on Group by....

    steveb (9/30/2008)


    you can do this using the row_number() function;

    SELECT Location, ProductID, Qty,

    ROW_NUMBER() OVER (PARTITION BY Location ORDER BY Location, ProductID) AS NewOrder

    FROM YOURTABLE

    I'm thinking the ranking is...

  • RE: Autogrowth - Best Pratice

    ruyfigueiredo (9/30/2008)


    The problem is that the log files increase a lot.

    I have an database with 250MB and a Log File with 24GB.

    After i reconfigure the Autogrowth i have to made...

  • RE: Using CHARINDEX to find EITHER/OR pattern

    You should be able to use PATINDEX for that. At least you can in 2005 (I don't recall there being any major change to patindex between 2000 and 2005).

    select...

  • RE: Use a database if exist

    There's always TRY/CATCH, too.

    begin try

    exec ('use john')

    end try

    begin catch

    print 'no luck - try again!'

    end catch

  • RE: Issue with stored procedure...

    Jeff Moden (9/27/2008)


    Heh... thanks for posting your solution. Sometimes the problem just boils down to "must look eye." 🙂

    Any more references like these and you're going to have...

  • RE: rounding of decimals

    Assuming the data type is appropriate - you might have some luck forcing the Bulk insert or BCP to treat that column as a float through a format file (even...

  • RE: Re: Stopping script execution on error

    jlp3630 (9/26/2008)


    As an aside - aren't you telling it NOT to stop with the table's missing?

    What do you mean?

    To give a little background on my situation, I'm copying data...

  • RE: Re: Stopping script execution on error

    I just remembered something. There are some special issue with trying to use try/catch over a linked server.

    Per BOL:

    Calling RAISERROR with severity less than 20 from inside a remote stored...

  • RE: Re: Stopping script execution on error

    Your script looks a little strange. The Variables you're using in the CATCH aren't declared anywhere. If you want to raise the error you got, then you need...

  • RE: Re: Recreating a database on a daily basis

    If you size the objects (data and log files) big, then no, you likely wouldn't needd to run a defragmenter.

    If on the other hand you don't size the data files...

  • RE: That's just not right...

    Jeff Moden (9/26/2008)


    Heh... yep... I understand all of that. But the obvious intention of generating the dynamic SQL is to make it possible to protect the user from accidental...

  • RE: Re: Recreating a database on a daily basis

    jlp3630 (9/26/2008)


    Are there any disadvantages to recreating a database from scratch on a daily basis? In other words, I perform the following steps:

    1. drop all tables

    2. recreate all tables

    3. populate...

  • RE: Generate a calculation between records same table...

    Unless every destination is in the same direction from a common point, your calculation isn't going to return the right result (if AAA is north of "here" and BBB is...

  • RE: Convert to SET based trigger

    what does this do?

    dmsUpdateTriggerPhoneNumberChanged

Viewing 15 posts - 2,506 through 2,520 (of 6,486 total)