Forum Replies Created

Viewing 15 posts - 9,241 through 9,255 (of 10,144 total)

  • RE: getting next and previous id

    Select A.pic_id, A.Album_Type_Id, (Select MAX(B.pic_id) From Album B Where B.pic_id < A.pic_id) as Next_Id

    From ALbum A

    Where A.pic_id = @pic_id

    And A.Album_Type_Id = @Album_Type_Id

  • RE: Moving Average Over a Data Table Requiring Group

    Here's a slightly different take on it:

    [font="Courier New"]SET DATEFORMAT MDY

    DECLARE @Tbl TABLE (

            Symbol INT,

            MarketDate DATETIME,

            Price DECIMAL(10,2),

            Volume INT

            )

    INSERT INTO @Tbl

    VALUES (1, '1/1/2008', 1.00, 1)

    INSERT INTO @Tbl

    VALUES (1, '1/2/2008', .98, 10)

    INSERT INTO...

  • RE: Convert VB Simple Moving Average Function to T-SQL

    waykna (12/8/2008)


    Yes, they are independent. TrdDay is a date (business day) for which there is trading data (high, low, close, etc...), and period is the size of the simple moving...

  • RE: Convert VB Simple Moving Average Function to T-SQL

    Hi Wayne

    Are TrdDay and period completely independent?

  • RE: Change a Views data types

    A Little Help Please (12/8/2008)


    Chris, THANK YOU so much for your time and patients.

    You have helped my understand stand the process much better!!

    I have commented out the RAISEERROR line and...

  • RE: Change a Views data types

    A Little Help Please (12/8/2008)


    Yes

    I think iv resolved the issue, at the bottom of the SP someone had put in some error constraints:

    END

    --Otherwise the files should not be updated

    ELSE

    BEGIN

    Execute...

  • RE: Change a Views data types

    Step 3 - the step which fails - is this the step which transfers data from the bargains table to tblClients?

  • RE: Change a Views data types

    You're importing from a flat file to the table bargains? Is this the only step performed by SSIS?

  • RE: Change a Views data types

    A Little Help Please (12/8/2008)


    Chris,

    I have just recently taken over looking after this DB. It was well before my time so Im not sure why this issue with the ClientID...

  • RE: Change a Views data types

    A Little Help Please (12/5/2008)


    One thing that I dont understand, these same tables/views/SP all are the same as in my mirror istance in SQL2000, once i moved it to SQL2005...

  • RE: Change a Views data types

    Why do you have different clients with the same clientID?

    Why call your column ClientID if itdoesn't uniquely identify clients?

  • RE: Improve SQL Query Performance

    debjani.bedajana (12/7/2008)


    The main idea is the database stores , how many users are getting which variation GRoupA, GroupB, GroupC, GroupD. And each group has four elements. So how many users...

  • RE: Sp_Execute with cursors

    Hi Mitchy

    While there's a chance that this code could be tweaked to work, the first question is "what are you trying to do?"

    Can you explain this in words e.g....

  • RE: Improve SQL Query Performance

    In addition to providing the material Gail has requested and following the advice of Gsquared, can you please post the whole batch of statements? Looking at the two queries you've...

  • RE: Replacing multiple occurrences of a string in a text column

    You could use PATINDEX in a WHERE clause to identify rows which require editing. SUBSTRING also works with text datatype: passing the return value of PATINDEX to the start value...

Viewing 15 posts - 9,241 through 9,255 (of 10,144 total)