Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)

  • RE: Cursor Performance Problem

    I dont know the exact prob but why don't u use SSIS for import. call that SSIS package from your cursor.

    Pls check the details as I think its possible with...

  • RE: Find Temp Tables From SPID

    Yes, I know that.

    But I have some requirement for the same.

    Pls..

  • RE: HOW TO CONVERT CSV STRING INTO SQL SERVER 2008 TABLE USING XML

    /*

    AUTHOR:SHANTARAM

    DATE:21/05/2009

    PURPOSE:CONVERTING ARRAY VALUE INTO TABLE EXPRESSION

    SAMPLE:

    1.

    EXECUTE dbo.usp_ArrayToTable '1.2.3.7.4.8.10', '.'

    2.

    CREATE TABLE #ParsedArrays

    (

    SrNo VARCHAR(MAX),

    Value VARCHAR(MAX)

    )

    INSERT INTO #ParsedArrays EXECUTE dbo.usp_ArrayToTable 'Abhay|Balloo|Chetan|Dhiren|RAJIV|GAIKWAD', '|'

    SELECT * FROM #ParsedArrays

    */

    ALTER PROC dbo.usp_ArrayToTable

    (

    @ArrayString varchar(MAX), -- the CSV we are...

  • RE: HOW TO CONVERT CSV STRING INTO SQL SERVER 2008 TABLE USING XML

    Its Done now with following query:

    SELECT seqno AS SrNo, item as Value

    FROM OPENXML (@idoc, '/stringarray/element', 2)

    WITH (seqno VARCHAR(MAX),

    ...

  • RE: HOW TO CONVERT CSV STRING INTO SQL SERVER 2008 TABLE USING XML

    Thanks Hitendra for ur quick response

    But I need something in the way like below, since my csv may include Characters/words.

    declare @idoc int -- the handle for the XML document

    declare...

  • RE: CURSOR UPDATE FOR NEW RECORD INSERTED IN BASE TABLE

    ORIGINAL RECORDS

    ------------------

    lSrNo,tCltCd,tBSInd,lQty,lHedgeQty,lHedgeSrNo

    1,A007,B,50,0,0

    2,A007,B,155,0,0

    3,A007,B,120,0,0

    4,A007,S,100,0,0

    5,A007,S,120,0,0

    6,A007,B,50,0,0

    7,A007,S,100,0,0

    EXPECTED RESULT

    -----------------

    lSrNo,tCltCd,tBSInd,lQty,lHedgeQty,lHedgeSrNo

    1,A007,B,50,50,4

    4,A007,S,50,50,1

    2,A007,B,120,120,5

    3,A007,B,100,100,7

    6,A007,B,50,50,8

    5,A007,S,120,120,2

    7,A007,S,100,100,3

    8,A007,S,50,50,6

    9,A007,B,35,0,0

    10,A007,B,20,0,0

    As u see in the result SrNo 1 Buy Qty is adjusted against SrNo 4 Sell Qty and updated lHedgeSrNo=1 of original buy srno, and for remaining sell...

  • RE: SQL servers alternative to Oracles "select .. for update" statement

    IN MY APPLICATION, ONE PROCESS WILL SELECT THE RECORD FROM THE DATABASE. AFTER SELECTION, THOSE RECORDS WOULD BE UPDATED ON SOME CONDITIONS.

    IN THIS SCENARIO I WANT TO SELECT THOSE RECORDS...

  • RE: SQL servers alternative to Oracles "select .. for update" statement

    Thanx a lot Michael for your quick reply.

    Basically I am aware of the consequences. The requirement is not for any entry module. It is required for a Share trade reading...

Viewing 8 posts - 1 through 8 (of 8 total)