2012年3月29日星期四
Flow Control in stored procedures
If within a stored procedure there are a list of Stored Procedure calls.
Create Procedure spTest AS
EXEC spMyActionQuery1
EXEC spMyActionQuery2
EXEC spMyActionQuery3
EXEC spMyActionQuery4
GO
Assuming each sub stored procedure executes an action query, does SQL Server ALWAYS wait for the current procedure to finish execution before proceding with the next stored procedure? I believe the answer is yes.The answer IS yes :D
2012年3月26日星期一
Flat File to Relational Schema
I am a complete newbie with SSIS. I started working with Flat Files today and have made some progress.
I have a task that requires me to pull out data from a | delimeted list with 160+ columns in a row. I am working with Movie and Entertainment data. So each movie has a number of actors associated with it.
For example:
MOVIEID|Zoolander|...|...|...|...|..................|Owen Wilson|Ben Stiller|Will Ferrel|...|...|...............|
I would like to take all the actors out of the middle of this long line of columns and place them in an Actors table with the movieID. However, when I look at Flat File Source, all I see is my X number of columns in the one row for all the actors (actor1-20).
Is there a way to make a new flat file that references the other flat file and can split up a certain amount of columns by rows inside of the middle of an existing row?
I hope that makes sence. Basically I would like to make a relational database schema out of ONE Flat File.
Thanks for your consideration,
ScottA good way to handle a problem like this would be to create a Flat File Reader. Input the records into a Multicast. Select the columns that you want and insert them into a Flat File destination. Alternatively, you can insert them directly into a table depending on your desired methodology.
Let me know if you need more help. I'll be happy to set up a sample job for you explaining this functionality.
Wes D|||
Check out the Unpivot Transformation. http://msdn2.microsoft.com/en-us/library/ms141723.aspx
Donald
|||Donald,Thanks for the tip! That's what I am looking for. Although I need it to go to a different table, rather than normalizing it inside the same DataSet.
Is there anyway to branch off into a different DataSet?
And if so, is there anyway to give the primary key of the original DataRow to it as a join condition?|||
Have a look at the Multicast component.
Donald
2012年3月22日星期四
Flat File Insert
Hi! I'm a newbie to SSIS and I'm trying to insert a flat file into a table.
The flat file contains some bad data so I want to insert the data into a text column.
I'm getting the following error below... It seems like SSIS cannot find the row delimiter, but I just want to load the file into a text column as a single row. I am able to insert the data to a text column in SQL 2000 DTS. Is there a way to do this in SQL 2005?
Please help... and Thanks in advance!!
[DTS.Pipeline] Error: The PrimeOutput method on component "Flat File Source" (1) returned error code 0xC0202092.
The component returned a failure code when the pipeline engine called PrimeOutput().
The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.
[Flat File Source [1]] Error: An error occurred while processing file \\sss.sss on data row 1.
[DTS.Pipeline] Error: The PrimeOutput method on component "Flat File Source" (1) returned error code 0xC0202092.
How do you know it is a problem with the delimiter?
Could you provide more information about the structure of the file and how you are configuring the flat file source component?
|||PLog
It sounds like you probably need to set up the flat file parsing to expect a single column and use a delimiter for that column that is not in your data (so it doesn't match anything in the data). You set the flat file parsing in the flat file source adapter UI. Let us know if that answers your question.
thanks,
denise
2012年2月26日星期日
First Installation--doesn't see any tab at all
installation of SRS 2000 and open the it thru IE, it just shows the home
page without any tab on it. Any reason? I even point SRS to get data from
AdventureWorks 2000 but still the same situation.
Thank you for your help.Make sure u have set the proper credentials for the folder in IIS to view the
tab.
"Joe" wrote:
> I am a newbie learning SRS 2000 by reading books, after I finish the
> installation of SRS 2000 and open the it thru IE, it just shows the home
> page without any tab on it. Any reason? I even point SRS to get data from
> AdventureWorks 2000 but still the same situation.
> Thank you for your help.
>
>|||I actually create a user account under "My Computer" and then right click
and select "Manage" and then "Local Users and Group"
Is it what you were referring to?
That's the book I am reading on how to set up SRS 2000.
http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=GB8Q40yBjn&isbn=0735621063&itm=1
Thanks.
"Suresh" <Suresh@.discussions.microsoft.com> wrote in message
news:5B1677B5-FACE-4D56-A73F-3A7A56FDDA0D@.microsoft.com...
> Make sure u have set the proper credentials for the folder in IIS to view
> the
> tab.
> "Joe" wrote:
>> I am a newbie learning SRS 2000 by reading books, after I finish the
>> installation of SRS 2000 and open the it thru IE, it just shows the home
>> page without any tab on it. Any reason? I even point SRS to get data from
>> AdventureWorks 2000 but still the same situation.
>> Thank you for your help.
>>