February 7, 2012 at 5:06 am
Here my assumption in the result set is
Resultset1+(DT_STR,12,1252)RecordNumber + Amount1 + Amount2 +
Resultset2+Resultset3 .....
in the above sequence order of the columns might changed in future when there is a requirement.
February 7, 2012 at 5:09 am
simhadriraju (2/7/2012)
Here my assumption in the result set isResultset1+(DT_STR,12,1252)RecordNumber + Amount1 + Amount2 +
Resultset2+Resultset3 .....
in the above sequence order of the columns might changed in future when there is a requirement.
Then you'll need to adapt the package.
This still doesn't explain why you can't concatenate the columns.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 7, 2012 at 5:15 am
As i said intially in my requirement i have hundreds of select queries which produces hundreds of result sets i want to store them in a variables so that if i need them sub taks i can make use of them.
Here i am not interested to use hundereds of execute SQL task and read the variables . I require a solution in one task and multiple variables can store the multiple results.
February 7, 2012 at 5:18 am
if there are members from united states please give their phone number so that i can call and explain you clearly.
February 7, 2012 at 5:23 am
simhadriraju (2/7/2012)
As i said intially in my requirement i have hundreds of select queries which produces hundreds of result sets i want to store them in a variables so that if i need them sub taks i can make use of them.Here i am not interested to use hundereds of execute SQL task and read the variables . I require a solution in one task and multiple variables can store the multiple results.
Using SSIS there isn't one task that can do that for you.
In TSQL neither.
You cannot store all those resultsets in seperate variables without declaring them first.
If you use .NET, you could store them in an array or matrix.
But then again, you'll need hours of coding dynamic SQL to retrieve them, as every SELECT statement changes for every table.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 7, 2012 at 5:34 am
What is missing are concrete examples of what you are trying to accomplish. Please provide us with the ddl (CREATE TABLE statements) for the tables, sample data (as a series of INSERT INTO statements) for oeach table that is representative of your problem domain, and most importantly the expected results based on the sample data.
February 7, 2012 at 5:42 am
So finally i request what could be the ideal solution for this..
February 7, 2012 at 5:45 am
simhadriraju (2/7/2012)
So finally i request what could be the ideal solution for this..
Allright, two people now (Lynn and I) asked for DDL, sample data and desired output.
As long as you do not provide them, I'm not wasting any more effort on this thread.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 7, 2012 at 5:58 am
simhadriraju (2/7/2012)
So finally i request what could be the ideal solution for this..
We can't help you if you don't help uis by providing us with the information we have requested. It is all up to you. Remember, we are volunteers giving of our own time to help. Also, we can't see what you see. Without the information we have requested all we can do is shoot in the dark and hope the answers we give help.
Bottom line, help us help you.
February 7, 2012 at 6:17 am
I have a table with below set of columns
Table Code_desc
description
code_type
code
i have the data like below
Code_desc
Description -- Code_type -- Code
Order Types description ORDTYP ORDT
Product Types description PRDTYP PRDT
Customer Types description CustTYP CUDT
........................... ........................................
Like above there are hundreds of codes
in SSIS i have to read them as per below query
select @orderdesc = description from code_desc where code_type='ORDTYP' and code='ORDT'
select @Productdesc = description from code_desc where code_type='PRDTYP' and code='PRDT'
...........................................................
I have another table XYZ (No relation with above table) with below columns
ID
Policy_number
Expirydate
IN SSIS i have to build abn expression like below.
expression = @orderdesc + ID + Expirydate + @Productdesc
and finally export to a flat file.
February 7, 2012 at 6:27 am
So the table Code_Desc and XYZ have no relation at all, but you still want to join them together? That seems a little odd.
And first you said you had hundreds of tables, but now it is hundreds of codes inside a table?
It still seems to me that you're stuck with hundreds of different SQL SELECT statements, especially if you do not know upfront which codes you need.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 7, 2012 at 6:34 am
So Please suggest me how can i acheive this complex task with a minimal
workaround
February 7, 2012 at 6:37 am
simhadriraju (2/7/2012)
So Please suggest me how can i acheive this complex task with a minimalworkaround
Did you notice the question marks in my previous reply? It means that I have asked a question...
Did you also notice that the last sentence said that, according to the information you've given me, I see no minimal work around.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 7, 2012 at 6:40 am
ok finally solutions could be
using hundreds .. of sql taks cannot we achieve this
.NET script component
Any alternates .................. ????????
February 7, 2012 at 7:07 am
simhadriraju (2/7/2012)
ok finally solutions could beusing hundreds .. of sql taks cannot we achieve this
.NET script component
Any alternates .................. ????????
What did you expect? You ask for a solution that will extract hundreds of variables, each needing it's own SQL statement to retrieve it, and a concatenation of those variables in an apparently random order.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 15 posts - 16 through 30 (of 35 total)
You must be logged in to reply to this topic. Login to reply