May 23, 2008 at 12:30 pm
jsheldon (5/23/2008)
Hi Jack,Ok I am getting this thanks..one more question my script if I gloss over it states 'journal_line_nbr is not a member of 'ScriptComponent_....'
To answer your question, why not make an identity column on the destination table. That would make life too easy 😉
The data is a telephone activity going into a transaction table of an ERP system. If I add or even modify the table schema then the loads and postings will not function. I don't mess with third-party vendor databases...
The error is probably because journal_line_nbr has not been added as an output column which would be step 4 in my post. Then in the script of you do "Row." intellisense will show all the columns in the input and output for the script component.
Let me ask this, within my excel source data task can I add an identity column? That would be much easier than this script task.
How is the data being loaded into Excel? You could add a column on the end of the Excel sheet that increments.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
May 23, 2008 at 12:32 pm
jsheldon (5/23/2008)
The staging area is the table it is going to...bad ERP desgin what can I say.So my raw source goes to project_jrnl_load_trans and then the process moves it to the project_jrnl_line table
Let me ask this, within my excel source data task can I add an identity column? That would be much easier than this script task.
I'm thinking you're pretty close - it sounds like it doesn't understand the VARIABLES.
That being said - you can get an autonumber pretty easily using the ROW() function (it returns the row it's on).
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
May 23, 2008 at 12:32 pm
To all last question and then I will let you enjoy the weekend.
RowNumber() can this SQL 2005 function be used on a database with 80 compatibility? (2005 SP2 applied)
May 23, 2008 at 12:37 pm
jsheldon (5/23/2008)
To all last question and then I will let you enjoy the weekend.RowNumber() can this SQL 2005 function be used on a database with 80 compatibility? (2005 SP2 applied)
I just tested it, worked fine for me although YMMV...
Ben Sullins
bensullins.com
Beer is my primary key...
May 23, 2008 at 12:42 pm
Have a good weekend...going to digest this...the script has potential because I will have to massage and add more rows later, the down and dirty of adjusting the source file is also overlooked (duh)
using RowNumber() function...
May 23, 2008 at 12:43 pm
Ben Sullins (5/23/2008)
jsheldon (5/23/2008)
To all last question and then I will let you enjoy the weekend.RowNumber() can this SQL 2005 function be used on a database with 80 compatibility? (2005 SP2 applied)
I just tested it, worked fine for me although YMMV...
I tried it too and it worked also. I am a bit suprised, though.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply