IQueryDescription SQL查询返回有限记录

时间:2013-06-28 12:10:28

标签: sql gis arcmap

我创建了一个在SQL Management Studio中运行的SQL查询,但是只要我将查询传输到ArcMap的IQueryDescription中以尝试使用用户表单运行它,我得到的结果就非常有限了对它返回的结果没有明确的模式。 (409条记录与15条记录)

我甚至复制并粘贴了适用于ArcObjects代码的查询,但是我得到了有限数量的记录,并且没有抛出任何错误。

有没有人碰到这个?我应该从哪个方向寻找解决方案?

我在下面包含了查询,尽管查询本身在SQL Management Studio中运行良好。

SELECT CADDATA.CALLINDEX.NCALLHIST2, CADDATA.CALLINDEX.NHISTSEQUENCE, CADDATA.CALLINDEX.SZCALL, CADDATA.CALLINDEX.SZCALLTYPE, CADDATA.CALLINDEX.SZCALLDESC, CADDATA.CALLINDEX.SZGEOGROUP, CADDATA.CALLINDEX.SZPRIORITY, CADDATA.CALLINDEX.SZDISPOSITION, CADDATA.CALLINDEX.LTCREATED, CADDATA.CALLINDEX.LTENTERED, CADDATA.CALLINDEX.LTDISPATCHED, CADDATA.CALLINDEX.LTENROUTE, CADDATA.CALLINDEX.LTONSCENE, CASE WHEN RIGHT(SZLOCATION, CHARINDEX(',', SZLOCATION)) = '' THEN SZLOCATION ELSE LEFT(SZLOCATION, CHARINDEX(',', SZLOCATION) - 1) END AS Location, cast(LTCREATED as date)  as gedatedidid FROM CADDATA.CALLINDEX INNER JOIN CADDATA.CALLINDEX_MXSEQUNCE ON CADDATA.CALLINDEX.NCALLHIST1 = CADDATA.CALLINDEX_MXSEQUNCE.NCALLHIST1 AND CADDATA.CALLINDEX.NCALLHIST2 = CADDATA.CALLINDEX_MXSEQUNCE.NCALLHIST2 AND CADDATA.CALLINDEX.NHISTSEQUENCE = CADDATA.CALLINDEX_MXSEQUNCE.NHISTSEQUENCE WHERE (CADDATA.CALLINDEX.SZCALLTYPE IN ('1818', '1825', 'AH', 'BC', 'BS', 'BUS', 'CH', 'F', 'FP', 'PAT', 'PC', 'PW', 'SUB', 'TL', 'TS', 'TST', 'VHC', 'VP')) AND (CADDATA.CALLINDEX.SZGEOGROUP IN ('D1', 'D2', 'D3')) AND (cast(LTCREATED as date) >= '2013-6-4') AND (cast(LTCREATED as date) <= '2013-6-4')

0 个答案:

没有答案