SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS and Raw files


SSIS and Raw files

Author
Message
clucasi
clucasi
SSC Eights!
SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)

Group: General Forum Members
Points: 859 Visits: 490
Hi all

Does anybody have an idea if you can use raw files to update records in a table using SQL server 2005
I have trawled the internet but with no avail. I tried to using a TSQL update statement.
I have about 5000 records to update and need it to be fast.
Can use a OLE DB Source and OLE DB Command. but it is to slow.
Example code would be much appreciated.
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)

Group: General Forum Members
Points: 145312 Visits: 13350
clucasi (2/18/2010)


Does anybody have an idea if you can use raw files to update records in a table using SQL server 2005
I have trawled the internet but with no avail. I tried to using a TSQL update statement.
I have about 5000 records to update and need it to be fast.
Can use a OLE DB Source and OLE DB Command. but it is to slow.


Can you give some more details regarding your question? Are you trying to read from RAW files as a source or do you want to use them to speed up things?

In SSIS, you can use the Raw File Source and the Raw File Destination.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
clucasi
clucasi
SSC Eights!
SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)

Group: General Forum Members
Points: 859 Visits: 490
Yes I want to use the RAW file as a source and then update records in the database (tried using TSQL update but not sure about how to get the RAW data into it) It needs to be fast!!
Henrico Bekker
Henrico Bekker
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15741 Visits: 5375
Upload your current dtsx package for us to see what you need and assist.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
clucasi
clucasi
SSC Eights!
SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)

Group: General Forum Members
Points: 859 Visits: 490
This might be a simple question but how do I upload it
Henrico Bekker
Henrico Bekker
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15741 Visits: 5375
open attachment

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
Attachments
How to upload on SSC.JPG (45 views, 85.00 KB)
clucasi
clucasi
SSC Eights!
SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)

Group: General Forum Members
Points: 859 Visits: 490
This a sample of my package, I have changed extension to txt from dtsx.
Hope this is enough.
Cheers
Attachments
Package.txt (88 views, 40.00 KB)
tej3as
tej3as
Mr or Mrs. 500
Mr or Mrs. 500 (508 reputation)Mr or Mrs. 500 (508 reputation)Mr or Mrs. 500 (508 reputation)Mr or Mrs. 500 (508 reputation)Mr or Mrs. 500 (508 reputation)Mr or Mrs. 500 (508 reputation)Mr or Mrs. 500 (508 reputation)Mr or Mrs. 500 (508 reputation)

Group: General Forum Members
Points: 508 Visits: 113
" Yes I want to use the RAW file as a source and then update records in the database (tried using TSQL update but not sure about how to get the RAW data into it) It needs to be fast!! "

--Here you have to be more specific in terms of what kind of updates u want to perform in database. Based on that there are several transformations available in SSIS for ex., derived column, conversion etc. and all of them can read data from ur RAW file source.

Also, reading data from ur RAW file source is relatively much faster than flat, oledb sources because it does not require parsing and translation of data.
clucasi
clucasi
SSC Eights!
SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)

Group: General Forum Members
Points: 859 Visits: 490
Here is a sample of the data I am trying to update

"21,""U"",8,100012714788,1,2,2001-04-18,""ZW"",,367903.00,403212.00,1,4250,2001-04-18,,2008-04-07,2001-04-18,"""",""00BWGG"","""",,,"""""

The U stands for an update, there are other codes for Insert (I) and Delete (D) but I have split these off using a conational split

The only field that wont change will be the "100012714788" all the rest could potentially change
steveb.
steveb.
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: General Forum Members
Points: 25404 Visits: 7195
One of the quickest way to do updates in bulk manner is to delete the rows from the destination table first then add the updates in the same way as you would the the inserts
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search