Forum Replies Created

Viewing 15 posts - 331 through 345 (of 362 total)

  • RE: Scalar Function Performance issue.

    Thanks for the simpathy....

    I use the function upto 100 times / row. 🙁

    Output is fixed length text data.

    The actual TSQL gets generated via SPs, but having the...

  • RE: Scalar Function Performance issue.

    Or a built-in SQL function that does the same kind of "padding".

    +1 = "00001"

    -1 = "-0001"

  • RE: using IN and a list of values

    How about parsing the "List" into

    something like ...

     
    
    Declare @List Varchar(255)
    set @list = '1,2,13,4,5'

    Select Convert(Int, SubString(@List, StartPos, EndPos - StartPos...
  • RE: Local Variables in a Stored Procedure

    How long does it take if you execute it

    as a script instead of SP? Using @Vars,

    and using constants.

    If both are ~ 2 mins, then the SP should...

  • RE: Help with a Select Statement

    Above, (UNION ALL) I meant something like...
    

    Select Distinct ClaimID
    INTO #tbl_temp_claims
    From (SELECT clm.claimID
    FROM claims clm
    INNER JOIN tblpayments p
    ON (p.claimid = clm.claimID)
    WHERE...
  • RE: Help with a Select Statement

    You may want to try with UNION ALL...

    also try....

    (I did not test for absolute correctness)

    
    
    SELECT DISTINCT clm.claimID
    INTO #tbl_temp_claims
    FROM claims clm
    LEFT OUTER...
  • RE: VB Recordset closes even though sp returns Values

    At the start of your SP, add..

    SET NOCOUNT ON

    VB has a hard time dealing with

    "(nnn row(s) affected)" output.

  • RE: Any better Ideas that may speed this procedure up?

    
    
    /*
    Really depends on characteristics of the tblKey table and its indecies.
    The "IN" clauses are similar to "OR", so getting rid of them could help alot.
    */
    SELECT T1.Param_ID,...
  • RE: Nested Cursor

    Can you use a 'JOINed" UPDATE instead:

    
    
    UPDATE Older SET Older.expiration_date = Newer.effective_date
    FROM dbo.gain_on_sale Older
    JOIN dbo.gain_on_sale Newer
    On Older.loan_instrument_name = Newer.loan_instrument_name
    and Older.state_code = Newer.state_code
    and Older.loan_amount_lower_limit =...
  • RE: UPDATETEXT for multiple rows

    The use of TOP 1 in the SELECT(s) should speed things up a bit.

    Also maybe use the @OffSet variable for the WHILE condition...

    SELECT @OffSet = ...

    WHILE @OffSet >= 0 ...

    ...

  • RE: Can this T-SQL forum be searched?

    Since it's been a couple of days, and the

    "Search" on the TSQL forum page has been

    rearranged a little, I tried searching again...

    When I search for "Soory", I get sent...

  • RE: update from a select in a single statement

    I do not understand if you want to update one or both tables at the same time,

    but the general "joined update" looks something like:

    
    
    UPDATE A...
  • RE: String Concat in Group

    -- The "Inner" cursor could be replaced with...

    -- .....

    SET @Concat = '' --empty out the concatenation string
    

    --DECLARE INNER LOOP For Concatenate
    SELECT @Concat = @Concat...
  • RE: Can this T-SQL forum be searched?

    Thanks Steve, but it does not seem to always work correctly for me....

    In http://www.sqlservercentral.com/forum/link.asp?TOPIC_ID=18435

    I misspelled "Sorry" with "Soory"...

    I try to search for "Soory", and nothing is found. Is...

  • RE: @@ERROR problems

    Soory, seems the above post does not want to Cut & Paste Nicely so...

    /*

    Two Things:

    1. Exec ([dynamicSQL]) is not a "script stopping" error if it fails.

    2. Adding "WHERE 1=2" causes...

Viewing 15 posts - 331 through 345 (of 362 total)