Forum Replies Created

Viewing 15 posts - 3,571 through 3,585 (of 8,416 total)

  • RE: Compare ranges of values of multiple rows in a single column

    One other way to write Lutz's solution:

    DECLARE @tbl TABLE (Room_ID INT, Check_in_Date DATETIME, Check_Out_Date DATETIME)

    INSERT INTO @tbl

    SELECT 1 ,'20100530','20100604' UNION ALL

    SELECT 1 ,'20100610','20100612' UNION ALL

    SELECT 1 ,'20100613','20100617' UNION ALL

    SELECT 2...

  • RE: Join if Exists

    Using EXISTS with pass-through conditions may be more efficient:

    USE tempdb;

    GO

    CREATE TABLE A (CusNo_A INTEGER NOT NULL PRIMARY KEY);

    CREATE TABLE B (CustNo_B INTEGER NOT NULL UNIQUE, Second_CustNo INTEGER UNIQUE);

    CREATE TABLE C...

  • RE: Best data type to store hindi fonts

    gaurav-404321 (4/30/2010)


    I am using Hindi fonts in windows application.

    I have setted down the font of text box as hindi font. I am saving the text in sql server database

    What is...

  • RE: Update records with similar values

    You can never have too many solutions. This one is very short:

    UPDATE INLINE SET OldMsg = Msg

    FROM (SELECT OldMsg = Msg, Msg = CASE...

  • RE: Count on different columns

    DECLARE @data

    TABLE (

    id INTEGER PRIMARY KEY,

    item ...

  • RE: Insert Column Default Values

    Garadin (5/1/2010)


    That said, it wouldn't need to execute if you actually did supply values, so it might be ok to catch that occasional row that fell through the cracks.

    That is...

  • RE: alter index online to add included columsn

    Jeffrey Williams-493691 (5/1/2010)


    Is that new in 2008 - or can you do it in 2005 also? I knew about drop existing, but did not think you could do it...

  • RE: alter index online to add included columsn

    Jeffrey Williams-493691 (4/30/2010)


    No, you cannot modify the index that way. You have to drop and recreate it to add additional included columns.

    In Enterprise Edition (and equivalents) an index can...

  • RE: Insert Column Default Values

    Garadin (4/30/2010)


    I'll admit that I scanned this, but I didn't see anyone mention a UDF as the default constraint on the column that does a lookup for the value in...

  • RE: Cast Float to Char with Natural Rounding

    Jeff Moden (4/30/2010)


    Using the great start that Paul provided, the following will also drop the decimal point if a whole number is realized...

    Great stuff! Thanks so much for taking...

  • RE: Cast Float to Char with Natural Rounding

    Jeff Moden (4/30/2010)


    Paul, try this...

    Ah. Yes, that is a bit of an issue isn't it? :rolleyes: 😀

  • RE: Backups

    Bradley Deem (4/30/2010)


    Great question. I did not find it ambiguous, in fact this line removed the ambiguity.

    Restore all transaction log backups taken since the latest differential backup restored with...

  • RE: Backups

    jswedlund (4/30/2010)


    What is a tail log?

    See Tail-Log Backups for all the details.

  • RE: Insert Column Default Values

    Peter Brinkhaus (4/30/2010)


    Some other thing, why are you explicitly testing if the inserted row set is empty. If it is, the insert statement is a no-op (even the two insert...

  • RE: Backups

    anilkullam (4/30/2010)


    As for as my knowledge is concerned, a differential backup shud have a base to start with, which is necessarily the recent full backup available (here for wednesdays diff...

Viewing 15 posts - 3,571 through 3,585 (of 8,416 total)