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.

 All Forums
 Development Tools
 ASP.NET
 Reading the text file (Part 3)

Author  Topic 

knockyo
Yak Posting Veteran

83 Posts

Posted - 2007-02-12 : 11:14:29
here the text file i need to grab


here is the database i need to follow the sequence


here is my Insert into SQL command code


StrSQL = "INSERT INTO NXP_AM1_ACU_DETAIL " _
& "(FromId,StationId,SerialNo, " _
& "SWBin,HWBin,SystemBinCode, " _
& "TestResult,P001,P002,P003,P004,P005) " _
& "VALUES ('" & UniqueId & "', " _
& "'" & Station & "', '" & aSQL.Count + 1 & "', " _
& "'" & aColumns(1) & "', '" & aColumns(2) & "', " _
& "1, '" & aColumns(3) & "', " _
& "'" & aColumns(4) & "', '" & aColumns(6) & "', " _
& "'" & aColumns(8) & "', '" & aColumns(10) & "', " _
& "'" & aColumns(12) & "')"
aSQL.Add(StrSQL)


For eg:
HINTS:
Pxxx (database field column name)
1,2,3....7 (sequence for text file i need to follow)

1 = 8.6182e-01 2 = 1.6626e+00, 3=-4.8683e+01, 4.................................
1 store in DB column P001
2 store in DB column P002
3 store in DB column P003
.
.
.
.
.

Like SQL code show above, any idea to modify my SQL?

   

- Advertisement -