|
![](/images/resource/spacer.gif) |
|
ขอ ตย. Stored Procedure นำ Text File เข้า Table ค่ะ (กรณีที่ Text File ไม่ได้เรียงเป็นระเบียบจะทำยังไงค่ะ) |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
CREATE TABLE OrdersBulk
(
CustomerID INT,
CustomerName VARCHAR(32),
OrderID INT,
OrderDate SMALLDATETIME
)
Sample Data
1,foo,5,20031101
3,blat,7,20031101
5,foobar,23,20031104
BULK INSERT OrdersBulk
FROM 'c:\file.csv'
WITH
(
FIELDTERMINATOR = '\t',
ROWTERMINATOR = '\n'
)
จาก ตย. ข้างต้น กรณีที่ Text File ไม่ได้เรียงเป็นระเบียบจะทำยังไงค่ะ
Tag : ASP, Ms SQL Server 2005
![](/images/adv.jpg?v=1001)
|
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2011-03-30 11:27:06 |
By :
ueng |
View :
1989 |
Reply :
1 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
Load balance : Server 04
|