Forum Replies Created

Viewing 15 posts - 58,651 through 58,665 (of 59,039 total)

  • RE: Incrementing a value with a set based solution

    Oh CRUD!  No, you don't even want to think of building a sequence table for this...  here's why...

    You said that the 3rd party stuff

  • RE: Incrementing a value with a set based solution

    Kenneth is absolutely correct... if you're not going to use IDENTITY, then you really must have a counter/sequence table and a stored proc to get the nextid.  Repost if you...

  • RE: Select next 100 rows

    Senthil,

    I'll probably get a real blast of hooey  for using Dynamic SQL but don't much give a rat's patooti  because it runs in...

  • RE: Date Range

    Subhash,

    For the first problem, use the UNION query you made as if it were a table and do the GROUP BY on that... like this...

     SELECT d.EmpNo, SUM(d.Sal) AS...

  • RE: Variables with Use statements.

    declare @dbname varchar(100)

        set @dbname = 'Some Database'

    DECLARE @sql VARCHAR(8000)

        SET @sql = 'use ' + @dbname

                 + ' dbcc shrinkfile (''File'', Size)'

       EXEC (@SQL)

    ...should work for what...

  • RE: Incrementing a value with a set based solution

    I don't beleive that moving the SELECT into a transaction will prevent others from writing to the target table and, therefore, will not prevent you from inserting a duplicate ID...

  • RE: Incrementing a value with a set based solution

    First, I agree with Remi 100% but those darned 3rd party dummies just keep writing junk and selling it.  Worse yet, we keep buying it

    I'll probably get a...

  • RE: Accurate datediff by years

    The problem isn't that DATEDIFF subtracts years... it's that it counts the number of times the date changes from 12/31 to 01/01.  Subtle difference but very important using other date...

  • RE: Splitting and aggregating a field with commas

    Wasn't that lucky... it's 24/7.  We get to bounce the server once a week for "impacting changes" for about 30 minutes... then, QA get's to verify what we've done.  Of...

  • RE: Splitting and aggregating a field with commas

    Yeah, I wish I didn't need it!  Wonderful 3rd party solution at work.  Bunch o' DB rookies... these are the same wonderful folks that built an Oracle-Like sequence table (NextID)...

  • RE: Splitting and aggregating a field with commas

    Hang on there, Paully21, I'll get to you in a minute...

    I absolutely agree with everyone that having CSV columns in a table is a basic form of "death by SQL". ...

  • RE: db creation

    LMBO!  Both at the design and your great sense of humor which allows you to calmly handle the mess they've heaped upon you!  I don't know about anyone else, but your...

  • RE: Finding weekdays of a given month

    Dang!  I must be old!  None of the newer online slang dictionaries has SOFH or BSOFH!  Remi, where did you find that definition?

  • RE: Finding weekdays of a given month

    Ok, ok... you got me... I've got dirt in my garden that's younger than I am... As you can tell, though, I've had...

  • RE: LIKE condition

    Remi is correct... it takes the original description and wraps it in single spaces.  Basically, it allows this single search ('% myword %') to work on the following descriptions...

    something myword...

Viewing 15 posts - 58,651 through 58,665 (of 59,039 total)