1
我有2個類似的查詢OPENQUERY給出不同的結果
select *
from openquery(powerschool,
'select *
from TEACHERS
where teachernumber is not null
and schoolid=''1050''
and teacherloginid is not null
order by teachernumber')
和
SELECT *
from openquery(powerschool,
'SELECT NVL(teachernumber,'''')
from TEACHERS
where teachernumber is not null
and schoolid=''1050''
and teacherloginid is not null
order by teachernumber')
第一個是給我182行,而第二個給了我83
這有什麼錯查詢?
是SELECT子句前未評估WHERE子句...又名NVL之後「teachernumber不爲空」 – gbn 2009-08-05 04:18:25