Viewing 8 posts - 1 through 8 (of 8 total)
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...
September 1, 2009 at 4:31 am
Yes, I know that.
But I have some requirement for the same.
Pls..
September 1, 2009 at 4:06 am
/*
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...
May 22, 2009 at 7:41 am
Its Done now with following query:
SELECT seqno AS SrNo, item as Value
FROM OPENXML (@idoc, '/stringarray/element', 2)
WITH (seqno VARCHAR(MAX),
...
May 22, 2009 at 6:45 am
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...
May 22, 2009 at 5:48 am
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...
March 24, 2009 at 11:45 pm
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...
September 24, 2008 at 4:57 am
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...
September 22, 2008 at 6:09 am
Viewing 8 posts - 1 through 8 (of 8 total)