Forum Replies Created

Viewing 15 posts - 2,836 through 2,850 (of 5,590 total)

  • RE: Need help combining separate date / time fields

    And this is even easier:

    declare @test-2 table (MyDate date, MyTime time);

    insert into @test-2 values (getdate(), getdate());

    select *,

    convert(datetime, MyDate) + convert(datetime, MyTime)

    ...

  • RE: Need help combining separate date / time fields

    Try this out:

    declare @test-2 table (MyDate date, MyTime time);

    insert into @test-2 values (getdate(), getdate());

    select *,

    DateAdd(second, DatePart(second, MyTime), DateAdd(minute, DatePart(minute, MyTime), DateAdd(hour, DatePart(hour,...

  • RE: Color coding

    Hugo Kornelis (10/15/2010)


    Carlo Romagnano (10/15/2010)


    I answered TRUE, but reading and re-reading both question and answer, I do not understand why it's false. Please Hugo, help us to understand.

    :laugh: I seem...

  • RE: Color coding

    cfradenburg (10/15/2010)


    William Vach (10/15/2010)


    ...you must connect through the registered servers tree. If you connect through the File|Connect Objects explorer method, the color of the status bar will be the...

  • RE: Color coding

    William Vach (10/15/2010)


    Assuming that this was not a trick question, I believe that the correct answer is 'it depends'. You can set the status bar for the query window...

  • RE: Create Range form integers (Numbers)

    You're welcome. Come on back if you have any more questions!

  • RE: Silly PRINT question

    steveb. (10/15/2010)


    you can use them in debugging , but surely you would remove them before putting them in to production ?

    Actually, I create all stored procedures like this:

    CREATE...

  • RE: Given @ID select all associated IDs in a history table

    LutzM (10/15/2010)


    @Wayne: It seems like my answer goes into the "just for exercise" box then...

    I put a post-it on my screen: ALWAYS CHECK THE FORUM BEFORE TRYING TO ANSWER!

    Thanx 😉

    I...

  • RE: I need to return multiple rows into one single string

    DECLARE @cus TABLE (col1 int, col2 varchar(50));

    INSERT INTO @cus

    SELECT 1, 'John' UNION ALL

    SELECT 2, 'Bob';

    SELECT stuff((SELECT ',' + convert(varchar(10), col1) + ',' + col2

    ...

  • RE: Cumulative sum for multiple sequences

    jkeys-972541 (10/15/2010)


    Thanks Wayne,

    Works a treat - Although you have explained it, I don't really understand what is going on with your script - I'm sure I could apply this elsewhere....

  • RE: update sql script

    One of the tables that you're performing an INNER JOIN with is a 1->Many relationship; thus you are getting values for each row from the table with the Many relationship.

  • RE: Color coding

    To get this to always work, there are TWO places to set it:

    1. On a registered server, select the "Connection Properties" tab, and set the color.

    2. On the Object Explorer,...

  • RE: Just How Does SQL Server Define A Unique Index

    JC-3113 (10/14/2010)


    Hi Folks

    Can some one tell me the correct syntax for changing the COLLATION to SQL_Latin1_General_Cp1_CS_AS for a column called Name in a table called DTREE

    Thanks

    Jim

    ALTER TABLE DTREE ALTER...

  • RE: Concatenating String Values in Transact-SQL

    You're welcome... but does it do what you need?

  • RE: Process Admin

    This link should help you out.

Viewing 15 posts - 2,836 through 2,850 (of 5,590 total)