1

我创建了一个在 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')
4

0 回答 0