我無法使用BCP將製表符分隔的* .txt文件中的數據導入到我的SQL表中。BCP導入幫助
我不斷收到兩個「無效的字符值鑄造規範」錯誤。
作爲測試,我手動插入了幾行。然後我BCP將這些行查詢到一個* .txt文件。然後我嘗試BCP導入相同的數據。
隨着該測試中,我得到了錯誤和一個「流延規範無效字符值」
有沒有辦法告訴哪些行/列觸發錯誤「意外的EOF BCP數據文件中遇到」?
調試BCP的任何提示/建議?
#@ Row 1, Column 2: Invalid character value for cast specification @#
1003 1/2/2011 23:59:00 Neeta Garg <NULL> 8888 <NULL> <NULL> WESTBURY NY 11594 US ambulance Yes Agency 92240099 000026 Neeta Garg <NULL> 8888 <NULL> <NULL> WESTBURY NY 11594 US 2222222222 [email protected] <NULL> UPS GRD 42.650 AXB479T;67.5900;2|842000YEL;4.2900;22|B956N;51.8900;1|XSPSPCL;67.0000;1890300;2999.9900;1|B956N;51.8900;1|XSPSPCL;210.0000;1|59047BKLG;9.9900;1 AXB479T;|842000YEL;|B956N;Badge Custom Details : Style = B956, Dimensions = 2 9/16\" x 2 9/16\", Enamel Type = regular, Font = block-black, Panel 2 = , Panel 3 = , Panel 5 = , Panel 6 = , Seal Style = , Attachment = NONE, Text Separator = NONE, Badge Comments = , badgeURL = http://www.blackinton.com/design-a-badge/data/pdf/vhbdab1291672350948.png, RESTXML = http://www.blackinton.com/design-a-badge/generate-xml.php?u=vhbdab1291672350948, Base Price = 59.00, Enamel = 0.00, Struck Solid = 0.00, Seal = 0.0 3271.8700 0.0000 0.0000 0.0000 3271.8700 1 Visa <NULL> 0
1004 1/3/2011 23:59:00 Neeta Garg <NULL> 8888 WESTBURY NY 11594 US ambulance Yes Agency 92240099 000026 Neeta Garg 8888 WESTBURY NY 11594 US 2222222222 [email protected] UPS GRD 0.000 AXB479T;67.5900;2|842000YEL;4.2900;22|B956N;51.8900;1|XSPSPCL;67.0000;1890300;2999.9900;1|B956N;51.8900;1|XSPSPCL;210.0000;1|59047BKLG;9.9900;1A161BK;115.9900;1 AXB479T;|842000YEL;|B956N;Badge Custom Details : Style = B956, Dimensions = 2 9/16\" x 2 9/16\", Enamel Type = regular, Font = block-black, Panel 2 = , Panel 3 = , Panel 5 = , Panel 6 = , Sea
#@ Row 2, Column 2: Invalid character value for cast specification @#
1005 1/4/2011 23:59:00 Neeta Garg <NULL> 8888 <NULL> <NULL> WESTBURY NY 11594 US ambulance Yes Agency 92240099 000026 Neeta Garg <NULL> 8888 <NULL> <NULL> WESTBURY NY 11594 US 2222222222 [email protected] <NULL> UPS GRD 0.000 AXB479T;67.5900;2|842000YEL;4.2900;22|B956N;51.8900;1|XSPSPCL;67.0000;1890300;2999.9900;1|B956N;51.8900;1|XSPSPCL;210.0000;1|59047BKLG;9.9900;1A161BK;115.9900;1A161BK;115.9900;1 AXB479T;|842000YEL;|B956N;Badge Custom Details : Style = B956, Dimensions = 2 9/16\" x 2 9/16\", Enamel Type = regular, Font = block-black, Panel 2 = , Panel 3 = , Panel 5 = , Panel 6 = , Seal Style = , Attachment = NONE, Text Separator = NONE, Badge Comments = , badgeURL = http://www.blackinton.com/design-a-badge/data/pdf/vhbdab1291672350948.png, RESTXML = http://www.blackinton.com/design-a-badge/generate-xml.php?u=vhbdab1291672350948, Base Price = 59.00, Enamel = 0.00, Struck Solid = 0.00, Seal = 0.0 115.9900 8.0000 0.0000 0.0000 123.9900 1 Visa <NULL> 0
1006 2011-01-05 11:27:50.617 Neeta Garg <NULL> 8888 WESTBURY NY 11594 US ambulance Yes Agency 92240099 000026 Neeta Garg 8888 WESTBURY NY 11594 US 2222222222 [email protected] UPS GRD 0.000 AXB479T;67.5900;2|842000YEL;4.2900;22|B956N;51.8900;1|XSPSPCL;67.0000;1890300;2999.9900;1|B956N;51.8900;1|XSPSPCL;210.0000;1|59047BKLG;9.9900;1A161BK;115.9900;1A161BK;115.9900;1A161BK;115.9900;1 AXB479T;|842000YEL;|B956N;Badge Custom Details : Style = B956, Dimensions = 2 9/16\" x 2 9/16\", Enamel Type = regular, Font = block-black, Panel 2 = , Panel
我想通了,你不能將BCP導入日期作爲日期時間類型。所以,我將它導入臨時表,其中類型是varchar,然後我將SELECT INTO到我想要的表中。但是,即使使用目標表的列類型varchar,我也會得到無效的字符錯誤。
#@ Row 1, Column 2: Invalid character value for cast specification @#
1003 2011-01-21 12:30:10.917 Neeta Garg <NULL> 8888 <NULL> <NULL> WESTBURY NY 11594 US ambulance Yes Agency 92240099 000026 Neeta Garg <NULL> 8888 <NULL> <NULL> WESTBURY NY 11594 US 2222222222 [email protected] <NULL> UPS GRD 42.650 AXB479T;67.5900;2|842000YEL;4.2900;22|B956N;51.8900;1|XSPSPCL;67.0000;1890300;2999.9900;1|B956N;51.8900;1|XSPSPCL;210.0000;1|59047BKLG;9.9900;1 AXB479T;|842000YEL;|B956N;Badge Custom Details : Style = B956, Dimensions = 2 9/16\" x 2 9/16\", Enamel Type = regular, Font = block-black, Panel 2 = , Panel 3 = , Panel 5 = , Panel 6 = , Seal Style = , Attachment = NONE, Text Separator = NONE, Badge Comments = , badgeURL = http://www.blackinton.com/design-a-badge/data/pdf/vhbdab1291672350948.png, RESTXML = http://www.blackinton.com/design-a-badge/generate-xml.php?u=vhbdab1291672350948, Base Price = 59.00, Enamel = 0.00, Struck Solid = 0.00, Seal = 0.0 3271.8700 0.0000 0.0000 0.0000 3271.8700 1 Visa <NULL> 0
1004 2011-01-21 12:30:10.917 Neeta Garg <NULL> 8888 WESTBURY NY 11594 US ambulance Yes Agency 92240099 000026 Neeta Garg 8888 WESTBURY NY 11594 US 2222222222 [email protected] UPS GRD 0.000 AXB479T;67.5900;2|842000YEL;4.2900;22|B956N;51.8900;1|XSPSPCL;67.0000;1890300;2999.9900;1|B956N;51.8900;1|XSPSPCL;210.0000;1|59047BKLG;9.9900;1A161BK;115.9900;1 AXB479T;|842000YEL;|B956N;Badge Custom Details : Style = B956, Dimensions = 2 9/16\" x 2 9/16\", Enamel Type = regular, Font = block-black, Panel 2 = , Panel 3 = , Panel 5 = , Panel 6 = , Sea
#@ Row 2, Column 2: Invalid character value for cast specification @#
1005 2011-01-21 12:30:10.917 Neeta Garg <NULL> 8888 <NULL> <NULL> WESTBURY NY 11594 US ambulance Yes Agency 92240099 000026 Neeta Garg <NULL> 8888 <NULL> <NULL> WESTBURY NY 11594 US 2222222222 [email protected] <NULL> UPS GRD 0.000 AXB479T;67.5900;2|842000YEL;4.2900;22|B956N;51.8900;1|XSPSPCL;67.0000;1890300;2999.9900;1|B956N;51.8900;1|XSPSPCL;210.0000;1|59047BKLG;9.9900;1A161BK;115.9900;1A161BK;115.9900;1 AXB479T;|842000YEL;|B956N;Badge Custom Details : Style = B956, Dimensions = 2 9/16\" x 2 9/16\", Enamel Type = regular, Font = block-black, Panel 2 = , Panel 3 = , Panel 5 = , Panel 6 = , Seal Style = , Attachment = NONE, Text Separator = NONE, Badge Comments = , badgeURL = http://www.blackinton.com/design-a-badge/data/pdf/vhbdab1291672350948.png, RESTXML = http://www.blackinton.com/design-a-badge/generate-xml.php?u=vhbdab1291672350948, Base Price = 59.00, Enamel = 0.00, Struck Solid = 0.00, Seal = 0.0 115.9900 8.0000 0.0000 0.0000 123.9900 1 Visa <NULL> 0
1006 2011-01-21 12:30:10.917 Neeta Garg <NULL> 8888 WESTBURY NY 11594 US ambulance Yes Agency 92240099 000026 Neeta Garg 8888 WESTBURY NY 11594 US 2222222222 [email protected] UPS GRD 0.000 AXB479T;67.5900;2|842000YEL;4.2900;22|B956N;51.8900;1|XSPSPCL;67.0000;1890300;2999.9900;1|B956N;51.8900;1|XSPSPCL;210.0000;1|59047BKLG;9.9900;1A161BK;115.9900;1A161BK;115.9900;1A161BK;115.9900;1 AXB479T;|842000YEL;|B956N;Badge Custom Details : Style = B956, Dimensions = 2 9/16\" x 2 9/16\", Enamel Type = regular, Font = block-black, Panel 2 = , Panel
順便問一下......我沒有任何標識字段,或關鍵領域的限制。 – s15199d 2011-01-21 14:38:59
我剛剛通過並刪除了2列或3列的數據,並嘗試導入。我這樣做直到我排除了所有的列。我仍然不斷收到「鑄造規格無效字符值」錯誤。 – s15199d 2011-01-21 15:49:31