Forum Replies Created

Viewing 15 posts - 3,391 through 3,405 (of 5,502 total)

  • RE: Want to insert Blank inside the main table instead of Null

    Now, all that's still missing are some sample data (in an INSERT INTO SELECT format) to play with that would match your expected result so we have something to test...

  • RE: SSPI handshake

    No problem.

    The reason why some of us tend to add the "duplicate post" information ist to make sure the answers are all within one thread. That makes it easier for...

  • RE: Want to insert Blank inside the main table instead of Null

    If you would provide table definition, sample data and expected result in a ready to use format as decribed in the first link in my signature I'm sure there will...

  • RE: SSPI handshake

    duplicate post.

    Discussion already started here.

  • RE: Script to continuously insert data

    Lowell (6/1/2010)


    CREATE TABLE [Test] (col1 bit)

    DECLARE @endDate datetime

    SET @endDate = DATEADD(hh,8,GETDATE()) -- 8 hours from now

    WHILE GETDATE() < @endDate

    BEGIN

    INSERT INTO [Test]...

  • RE: Collapsing a Table

    Ok, here's what I came up with: It's a "double self referencing" table.

    The first one (sub) is used to eliminate consecutive rows and the second one (final select) gets the...

  • RE: Collapsing a Table

    I've been trying to come up with a self referencing solution, but I'll give up now since I won't be able to come even close to your solution. :crying:

  • RE: Collapsing a Table

    Jeff Moden (5/31/2010)


    lmu92 (5/31/2010)


    I'm not sure if this is the fastest way, but at least it's an option... 😉

    That seems to loose the bubble when the ranges on the same...

  • RE: Collapsing a Table

    I'm not sure if this is the fastest way, but at least it's an option... 😉

    ;

    -- unpivot and group the values

    WITH upvt AS

    (

    SELECT Val

    FROM

    (SELECT START,[END]

    FROM @rangeTable)...

  • RE: Script to continuously insert data

    Please be a little more specific regarding the table/data structure you want to insert.

    Otherwise, you might see a script like the following to enter a few thousand rows into a...

  • RE: INSERT BULK execute with @variables

    You're very welcome 🙂

  • RE: ADD column storeID while bulk inserting

    daniarchitect (5/30/2010)


    Unfortunatley our company uses DB2 as main database ,

    but they have sql server on side which is version 2000.

    I ask apology for posting it here,but that was the only...

  • RE: INSERT BULK execute with @variables

    You need to use the real file names instead of @txtFile and @xmlFile.

    The following should work:

    SET @SQLString = 'INSERT INTO competition (Competition_ID,Competition,Title,Parent_ID) '

    + 'SELECT Competition_ID,Competition,Title,Parent_ID '

    + 'FROM OPENROWSET(BULK '...

  • RE: For XML to decimal datatype

    You need to add precision and scale when converting to DECIMAL. Otherwise it will use the default values (DECIMAL(18,0)) leading to integer values.

    Try

    SELECT

    ISNULL(CONVERT(DECIMAL(20,2),@val),2) AS [column1]

    FOR XML RAW('row'), elements, root('XMLData'),...

  • RE: Getting the Message

    I agree with rwatson and, partially, with futura.

    However, we managed to use ServiceBroker to replace a job that repeated every minute to check if new data are available... It took...

Viewing 15 posts - 3,391 through 3,405 (of 5,502 total)