Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-09-13 : 10:04:52
|
Nathan writes "Hello,I am in a bit of a tricky quadmire with a task I have to implement with SQL Server 7, and VB. I am trying to create a Stored Procedure that the VB app will call to import the data from a CSV text file that the VB app creates.The text file contains 3 of the 6 values required by the Table I am importing data into.Example of Text File1,1,231,2,541,3,241,4,762,1,122,2,65The remaining columns are:Date - SMALLDATETIME - this will be generated by the VB app and hopefully passed as an argument to the stored procedure. The SAME datetime value will be input with all records imported each time this procedure is executed.The remaining two fields are generated by queries to other tables in the database, using the first two values of each line of the text file. They are both int values.Main TableDateTime SBus# Line# CountValue ProdCode RevCentre----------------------------------------------------------------Argument fromFile fromFile fromFile dbQuery dbQuerySame fromFile fromFile fromFile dbQuery dbQuerySame fromFile fromFile fromFile dbQuery dbQuerySame fromFile fromFile fromFile dbQuery dbQuerySame fromFile fromFile fromFile dbQuery dbQuery The Key of the above Main Table is the first three columns.So, I need to work out how to get all of the data I need, collated, and ready to insert into my Main table. I am having no luck as yet, using numerous tables, and SQL calls. I would really appreciate any direction that you may provide. If this is too complicated for the website, an email response is quite fine with me. Thanks.Regards and fingers crossed,Nathan Gossnathang@crownltd.com.au" |
|
|
|
|
|
|
|