Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS and Raw files


SSIS and Raw files

Author
Message
clucasi
clucasi
SSC-Enthusiastic
SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)

Group: General Forum Members
Points: 101 Visits: 470
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
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16443 Visits: 13202
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?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
clucasi
clucasi
SSC-Enthusiastic
SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)

Group: General Forum Members
Points: 101 Visits: 470
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
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

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

----------------------------------------------
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
clucasi
clucasi
SSC-Enthusiastic
SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)

Group: General Forum Members
Points: 101 Visits: 470
This might be a simple question but how do I upload it
Henrico Bekker
Henrico Bekker
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2020 Visits: 3223
open attachment

----------------------------------------------
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
Attachments
How to upload on SSC.JPG (28 views, 85.00 KB)
clucasi
clucasi
SSC-Enthusiastic
SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)

Group: General Forum Members
Points: 101 Visits: 470
This a sample of my package, I have changed extension to txt from dtsx.
Hope this is enough.
Cheers
Attachments
Package.txt (43 views, 40.00 KB)
tej3as
tej3as
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 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-Enthusiastic
SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)

Group: General Forum Members
Points: 101 Visits: 470
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.
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2848 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