Forum Replies Created

Viewing 15 posts - 871 through 885 (of 1,192 total)

  • RE: CAST function crashing when trying to CAST 0 to NVARCHAR(100)

    What do you mean by "crash"? What's the exact error message you're receiving?

    Cheers!

  • RE: Alter Logical FileName during Restore

    Yes, the same logical file names can be used in multiple databases. I've actually seen instances with hundreds of databases that all have the same logical file names because new...

  • RE: Real to Float

    Naveen PK (8/12/2015)


    Jacob Wilkins (8/12/2015)


    These questions are always fun, since I have to do some playing with binary representations to make sure I fully understand what's going on. Fortunately in...

  • RE: Real to Float

    These questions are always fun, since I have to do some playing with binary representations to make sure I fully understand what's going on. Fortunately in this case it's pretty...

  • RE: max not giving the latest one

    That suggests you have kms_quoteorder values that do not contain a '/'. In that case, charindex would return 0, and after subtracting the 1 would give -1, which is indeed...

  • RE: Best design for OLTP tables

    First, very nice question! I rather like these sorts of questions as opposed to the "Here's a script, what's the result of the last SELECT?" questions. While the latter sort...

  • RE: How to concatenate/convert date and time into a datetime?

    Jacob Wilkins (8/3/2015)

    Indeed. On a couple million rows, that typically shaves some tens of milliseconds from the duration compared doing the math on the date first. Prior to 2012, you...

  • RE: How to concatenate/convert date and time into a datetime?

    djj (8/3/2015)


    I have had luck with

    DECLARE @Date DATE = '1/1/2015', @Time TIME = '15:20'

    SELECT cast(@Date as datetime) + cast(@Time as datetime)

    Indeed. On a couple million rows, that typically shaves...

  • RE: Hide a column from select

    Hmmm...I'm a little confused about the purpose of this code.

    First, the WHERE clause filters results to rows that have a particular ORDERID, and then you SELECT DISTINCT ORDERID, so you...

  • RE: Global temporary table visibility

    Even more interesting! I'll have to do a sanity check when I get home; what's your exact build of 2008 R2?

    EDIT: I did my sanity check. I get the expected...

  • RE: Global temporary table visibility

    Interesting. I've run it on a 2008 R2 instance, and I get the expected behavior.

    Are you definitely taking the actions in this order?

    1)Create/populate ##tmptest in Query1

    2)Run SELECT...

  • RE: SELECT qualified employees based on program rrequirements

    In addition to the good feedback you've already gotten from Gail and Scott, I figured I'd try to explain the probable cause of the issue you're seeing.

    In your code, the...

  • RE: Are the posted questions getting worse?

    Luis Cazares (7/31/2015)


    The Dixie Flatline (7/31/2015)


    Alvin Ramard (7/31/2015)


    Luis Cazares (7/31/2015)


    WayneS (7/31/2015)


    Looks like Luis is answering Oracle questions now.

    That wasn't the only attempt on that day. Here's a completely lost Oracle...

  • RE: Which log do I start with during a restore

    The short answer is that the 10:30-10:35 log would not be used with the 10:00-10:45 full. The easy way to think of it is that the restoring the full backup...

  • RE: Restoring from Commvault

    Yes, it backs up directly from SQL Server, and restores directly to it (it just connects and issues BACKUP and RESTORE commands like you or I would).

    Backing up/restoring that much...

Viewing 15 posts - 871 through 885 (of 1,192 total)