SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sales orders into sql database
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nevzab
Starting Member

United Kingdom
34 Posts

Posted - 07/31/2013 :  17:07:42  Show Profile  Reply with Quote
Not sure if I should be posting such a general, and maybe rather vague, question but thought it would be worth a go. I have just started a new job and have been asked to liaise with a company that design websites and provide e-commerce solutions with a view to working out a solution for getting sales orders placed through the website into our own SQL database. I would appreciate any advice anyone can offer regarding how to get the data (sales orders) into the database. All I have been told is that we have access to some middleware that can extract the data in XML or CSV format. Would this normally be done using bulk inserts or are there other more sophisticated methods? Thanks

Lamprey
Flowing Fount of Yak Knowledge

4614 Posts

Posted - 07/31/2013 :  17:27:31  Show Profile  Reply with Quote
Depending on the format and how stable the format is you could use a component that will parse/shred the files (which is what I thinkt he "middleware" you mentioned). You could possibly use BCP or SSIS to ingest them too. There are lots of ways to skin that cat.
Go to Top of Page

nevzab
Starting Member

United Kingdom
34 Posts

Posted - 07/31/2013 :  17:45:00  Show Profile  Reply with Quote
Can BCP be built into a stored procedure? I am hoping the middleware will call an the SP which then performs the bulk copy. Does this sound plausible?
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3760 Posts

Posted - 07/31/2013 :  18:19:40  Show Profile  Reply with Quote
You can build BULK INSERT into a stored procedure. If you go that route, you would need to save the data as a csv file to some location and run a stored procedure that has the bulk insert command in it with the appropriate parameters: http://msdn.microsoft.com/en-us/library/ms188365.aspx

Another option would be to send the data as XML to the stored procedure, shred it in the stored procedure and store it. If you do that, you would not need to save the data as a file. However, for large data sets (tens of thousands of rows), shredding XML is likely to be slow.
Go to Top of Page

nevzab
Starting Member

United Kingdom
34 Posts

Posted - 08/02/2013 :  16:13:24  Show Profile  Reply with Quote
Thanks guys. I will consider both options.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000