Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

SSIS and Raw files Expand / Collapse
Author
Message
Posted Thursday, February 18, 2010 8:53 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 5:24 AM
Points: 94, Visits: 439
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.
Post #868111
Posted Friday, February 19, 2010 12:36 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:00 AM
Points: 13,520, Visits: 11,313
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 LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #868792
Posted Tuesday, February 23, 2010 1:25 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 5:24 AM
Points: 94, Visits: 439
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!!
Post #870970
Posted Tuesday, February 23, 2010 2:20 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, August 28, 2014 2:39 AM
Points: 1,880, Visits: 2,846
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.
Post #870988
Posted Tuesday, February 23, 2010 5:31 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 5:24 AM
Points: 94, Visits: 439
This might be a simple question but how do I upload it
Post #871063
Posted Tuesday, February 23, 2010 5:43 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, August 28, 2014 2:39 AM
Points: 1,880, Visits: 2,846
open attachment

----------------------------------------------
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.


  Post Attachments 
How to upload on SSC.JPG (27 views, 85.80 KB)
Post #871065
Posted Tuesday, February 23, 2010 7:47 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 5:24 AM
Points: 94, Visits: 439
This a sample of my package, I have changed extension to txt from dtsx.
Hope this is enough.
Cheers


  Post Attachments 
Package.txt (42 views, 40.47 KB)
Post #871142
Posted Tuesday, February 23, 2010 9:11 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, July 17, 2014 4:13 AM
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.
Post #871218
Posted Wednesday, February 24, 2010 12:44 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 5:24 AM
Points: 94, Visits: 439
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
Post #871758
Posted Wednesday, February 24, 2010 5:12 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, May 30, 2014 6:27 PM
Points: 2,808, Visits: 7,175
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
Post #871838
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse