Forum Replies Created

Viewing 15 posts - 151 through 165 (of 4,080 total)

  • RE: choosing multiple options

    What would the expected results your sample data look like from your example above? Please don't describe it. Just draw us a picture. 🙂

    You cannot choose columns...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: The Bones of SQL - The Holiday Table

    To be clear, part of the purpose of the Holiday table is to serve as a join when creating the calendar table. In the previous calendar...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Help with excluding certain records

    Understood. Thanks for the reply.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: trigger on a view

    Why can't you create triggers on the tables?

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Help with excluding certain records

    Why on earth are you duplicating rows in that table instead of just adding a separate column for LBS??

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: PLEASE HELP ****** Stripping #s from one column to update 2 columns *******

    I just sent you an update query. It's not going to solve your problem of duplicate data in the table.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: use dynamic table whiile dynamic pivot

    Agreed. You have to substitute the table name into your string and then execute it.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: PLEASE HELP ****** Stripping #s from one column to update 2 columns *******

    Without seeing the layout of your numbers_table table (which is redundundant by the way) and some sample data, we have no way of telling why you're seeing duplicates in...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: PLEASE HELP ****** Stripping #s from one column to update 2 columns *******

    declare @mytable table (FC int, OrigNum varchar(50))

    insert into @mytable (OrigNum)

    values

    ('7 1601081408920063')

    ,('7 1601081408920063')

    ,('7 1507210892006300')

    ,('7 1507210892006300')

    update @mytable

    set FC = left(OrigNum,1)

    ,Orignum = right(OrigNum, len(OrigNum)-2)

    select * from @mytable

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Select continual date ranges from a list that overlaps

    To close to bedtime to code and test, but you should just be able to use the LAG and LEAD operations in a cte to look at the previous [price]...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: while and if condition within a case statement t-sql

    you should specify the window frame (generally ROWS UNBOUNDED PRECEDING), because the default is RANGE UNBOUNDED PRECEDING, and which is much slower than specifying the range using the ROWS...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Delete large volume of records by divide in to small chunks

    You will find some good example code as well as some other considerations in the discussion HERE.

    Do NOT follow my example of a loop with DELETE TOP(5000)....

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Bones of SQL – Grouping By User-Defined Calendar Periods

    I'll bet you do. Sounds like a dream job.

    Thanks for answering, promptly. I was having trouble ceasing to imagine a tiny little couch for bytes.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Bones of SQL – Grouping By User-Defined Calendar Periods

    How can I argue with that? 😀

    Some people have yet to implement a calendar table though. Even those who have might get asked for a period which...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Using "Update" or "Merge" on 2014 SQL table

    For what it's worth, we haven't gone back and rewritten everything as merges, either 😉

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 151 through 165 (of 4,080 total)