比方說,我有一個具有以下行的文本文件SQL Server Management Studio中 - 查詢使用文本文件
102
333
534
然後,在我的SQL表,我有幾個不同的列:
AutoID | Name | Description
--------------------------------------
102 | Jackson | [Description Here]
241 | Edward | [Description Here]
333 | Timothy | [Description Here]
437 | Nikky | [Description Here]
534 | Jeremy | [Description Here]
有無論如何我可以通過SQL Server Management Studio解析文本文件,以便它將查詢表格並抽出每行行,其中有一列(AutoID
,在這種情況下)與文本文件中的行匹配請注意,我只想要行fr我會指定一個表格)?
這樣我可以編輯它們或更新只匹配文本文件中的ID的行。
管理工作室中顯示的行看起來像這樣。
AutoID | NAME | Description
--------------------------------------
102 | Jackson | [Description Here]
333 | Timothy | [Description Here]
534 | Jeremy | [Description Here]
將數據加載到一個臨時表和使用,爲您的查詢。 –
@GordonLinoff我將如何實現這一目標?你可以發佈一個示例腳本? –
。 。使用SSMS中的導入嚮導。 –