本文介紹了SQl:從文本文件更新表的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
這是我必須做的:
我有一個(gè)包含 3 列的文本文件:PID、X、Y
.
I have a text file which has 3 columns: PID, X, Y
.
現(xiàn)在我的數(shù)據(jù)庫中有兩個(gè)表:
Now I have two tables in my database:
表1
包含4列:UID, PID, X, Y
Table 2
包含多列,需要的是UID, X, Y
Table 1
contains 4 columns:UID, PID, X, Y
Table 2
contains multiple columns, required ones beingUID, X, Y
我需要用相應(yīng)的 X 和 Y 值更新表 2
.
I need to update Table 2
with corresponding X and Y values.
我認(rèn)為我們可以使用 BULK INSERT
來更新 table 1
,然后使用一些 WHILE
循環(huán)或其他東西.
I think we can use BULK INSERT
for updating table 1
, then some WHILE
loop or something.
但我無法弄清楚確切的事情.
But I can't figure out exact thing.
推薦答案
您可以使用上述方法來解決您的問題.希望這可以幫助.:)
You can use this above approach to solve your problem. Hope this helps. :)
這篇關(guān)于SQl:從文本文件更新表的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!