Forum Replies Created

Viewing 15 posts - 871 through 885 (of 2,171 total)

  • RE: Numeric vss Bigint

    grevesz (6/9/2008)


    If you start a load testing batch process in 10 parallel threads and let it run for an hour and a half, you exhaust your number range...

    You have an...

  • RE: Numeric vss Bigint

    Having 4 billion ID's to choose from (-2147483648 to 2147483647), you can insert 10 records per second, every second around the clock, for the next 13.6 years.

  • RE: Numeric vss Bigint

    Will INT not do?

    IDENTITY(-2147483648, 1)

    will give you 4 billion numbers to choose from.

  • RE: Return minimum of two values

    SELECTCASE

    WHEN Pos = '19000101' AND Neg = '19000101' THEN 0

    WHEN Pos = '19000101' THEN Neg

    WHEN Neg = '19000101' THEN Pos

    WHEN Pos < Neg THEN Pos

    ELSE Neg

    END

    FROM(

    SELECTMAX(CASE WHEN Qty > 0...

  • RE: Nested Query-Sequential Dates Of Business Processes

    I just clicked OP's "all post" to see if I didn't invent the wheel again.

    If I hadn't, both you and me would present a working solution. What a waste of...

  • RE: Nested Query-Sequential Dates Of Business Processes

    ALTER PROCEDURE dbo.uspMyProcedure

    (

    @Today DATETIME = NULL

    )

    AS

    SET NOCOUNT ON

    IF @Today IS NULL

    SET@Today = DATEDIFF(DAY, '19000101', GETDATE())

    ELSE

    SET@Today = DATEDIFF(DAY, '19000101', @Today)

    ;WITH Yak (ProcessID, theDate, thePath, dc)

    AS (

    SELECTProcessID,

    DATEADD(DAY, DayCount, @Today),

    '/' + CAST(ProcessID AS...

  • RE: Nested Query-Sequential Dates Of Business Processes

    I see that now.

    I responded to a PM and saw that OP posted same question on the forums.

    Didn't notice the version.

  • RE: Nested Query-Sequential Dates Of Business Processes

    DECLARE@ProcessTest TABLE

    (

    ProcessID CHAR(3),

    ProcessName VARCHAR(50),

    FabricType CHAR(1),

    ProductType INT,

    ProductStyle CHAR(1),

    StockType INT,

    ProductLine CHAR(1),

    DayCount INT,

    OverlappedTo CHAR(3),

    OverlapDayCount INT,

    ProcessAfter CHAR(3)

    )

    INSERT@ProcessTest

    SELECT'001', 'Process1', 'D', 1, 'T', 2, 'W', 12, NULL, NULL, NULL UNION ALL

    SELECT'002', 'Process2', 'D', 1,...

  • RE: Tally Table - Splitted values

    Did you try my latest suggestion then?

  • RE: Tally Table - Splitted values

    I understand that, BUT WHICH MATCHING preference do you want?

    ID = @ID AND pF = @pF AND ClassID = @ClassID

    or this

    ID = @ID OR pF = @pF OR ClassID =...

  • RE: Tally Table - Splitted values

    Which is it?

    You can't have both.

  • RE: Tally Table - Splitted values

    karthikeyan (5/29/2008)


    Peso,

    You also have used 'OR'.

    Yes, because I don't know your business rules.

    Please read my previous response carefully and to the very end.

  • RE: Tally Table - Splitted values

    Your DELETE #temp1 statements are dangerous.

    If a record does not equal to #ID it still might equal #ClassID or sP column.

    So you have two diffferents sets of business rules here.

    1)...

  • RE: Tally Table - Splitted values

    karthikeyan (5/29/2008)


    My questions are,

    1) Whether my way of approach to split the comma seperated value is correct or not.

    2) is there any other way to check the splitted values in...

  • RE: Select query ignoring certain columns

    You can with dynamic SQL. but the real question is WHY?

Viewing 15 posts - 871 through 885 (of 2,171 total)