Forum Replies Created

Viewing 15 posts - 1,381 through 1,395 (of 4,080 total)

  • RE: trim and round

    123.987 is 123.9

    ????

    Cory, explain please.

    __________________________________________________

    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: trim and round

    That would be truncation.

    Will you ever have numbers like 14.567 or 143.953?

    If so, do you want the answer to be 14?

    __________________________________________________

    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: trim and round

    Congratulations on 20k, Gail. 🙂

    saimddr:

    The question is whether or not you want to round the data or truncate the data.

    Rounding the data can increase or decrease its value.

    Truncating the...

    __________________________________________________

    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: Rows to columns

    Again, there are a lot of articles and forums out there if you just search on the keyword "Concatenate". There is a technique using FOR XML that should...

    __________________________________________________

    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: Rows to columns

    You can also search this site for articles or threads with the keyword "Crosstab" to see the old school way of converting rows to columns using SUM(CASE statements) and GROUP...

    __________________________________________________

    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: LEFT JOIN and Smallest

    You're welcome.

    __________________________________________________

    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: LEFT JOIN and Smallest

    Give this a try:

    UPDATE A1

    SET bookno = COALESCE(ChangeBookNo,BookNo)

    FROM A A1

    OUTER APPLY ( Select Top 1 ChangeBookNo

    From B

    Where BookNO BETWEEN BookNoFrom and BookNoTo

    Order by ChangeBookNo) oa

    __________________________________________________

    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: Are the posted questions getting worse?

    Trey Staker (9/20/2010)


    Steve Jones - Editor (9/20/2010)


    BTW, I got an appeal from Itzik that Window functions might not make SQL 11 and he's appealing people to upvote connect items.

    http://www.sqlmag.com/blogs/puzzled-by-t-sql/tabid/1023/entryid/13085/Window-Functions-OVER-Clause-Help-Make-a-Difference.aspx

    I have...

    __________________________________________________

    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: Importing excel data with preceding '0's into SQL Server

    I like your second solution, Lowell. If these values are all integers, why bother storing them as char/varchar?

    I believe they are called computed columns in BOL.

    __________________________________________________

    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: Automatically generating a value in a column

    Yes.

    Defining an expression to appear as a column called a computed column in Books Online. You can find information about computed columns under the CREATE...

    __________________________________________________

    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: What a nice place to be

    You certainly know how to win friends and influence people, Mike. A lot of us share your sentiments.

    __________________________________________________

    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: simple SELECT query takes ten seconds to return 5000 rows - can I optimize?

    Please do, Paul. I hear your blog is well written and enjoys a HUGE following in Hyderabad. 😉

    I am behind on my reading but the...

    __________________________________________________

    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: Are the posted questions getting worse?

    Kit G (9/17/2010)


    Steve Jones - Editor (9/17/2010)


    The Dixie Flatline (9/17/2010)


    Apostrophes are also good for accenting sounds which are unpronounceable by human mouths.

    Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

    Is that Klingon?

    No, I...

    __________________________________________________

    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: simple SELECT query takes ten seconds to return 5000 rows - can I optimize?

    If you can afford the disk space and maintenance load, specialized covering indexes are always on the path to optimal query performance.

    Thanks for posting your...

    __________________________________________________

    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: To insert a value from a table into a warning statment

    You sure can.

    I'm not sure why we're stuck on using a values clause to do this, but the expressions in a value clause may include sub-queries so long as they...

    __________________________________________________

    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 - 1,381 through 1,395 (of 4,080 total)