SQL2000遠程調用SQL6.5資料庫Table間不能聯結的解決方案

來源:互聯網
上載者:User

       今天也夠暈的了,寫出來一堆垃圾,一個預存程序居然跑了40秒,檢查一下原因是程式遠程返回的資料太多了,網路傳輸慢。終於要面對聯結的問題了,問了一圈同事不是搖頭就是很忙。我先說說邏輯吧:

遠程有兩個表:A(ID,filed1)

                           B(ID,filed2)

我要把這兩個表通過ID聯結,然後再加一個ID的條件,取出我要得資料,這是何其簡單的一件事啊!可憐的是NND,SQL6.5老是報錯,其實我只需要返回幾個資料而已,最後無奈用了個Table,把它解決了。

 

create table table1(ID,filed1,filed2)

insert (ID,filed1)select ID,filed1 from A where ID in(條件)

update table1 set filed2=B.filed2 from B where table1.ID =B.ID

 

SQL6.5真讓我很痛苦,誰能給個好辦法啊?

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.