Hi, I am using Crystal SQL Query Disgner to Combine two working queries into one.
/////Query 1
SELECT
applic.`idnumber`,
applic.`appl_stat`,
applic.`casemangr`,
refer.`idnumber`,
refer.`proj_from`,
refer.`answer`,
refer.proj_from + refer.answer
FROM
`applic` applic LEFT OUTER JOIN `refer` refer ON applic.`idnumber` = refer.`idnumber`
WHERE
(applic.`appl_stat` = 'EN'
and
refer.`idnumber` NOT IN (SELECT refer.`idnumber` FROM `refer` refer WHERE refer.`proj_from` = '018601' AND refer.`answer` = 'T'))
ORDER BY
applic.`idnumber` ASC
//////Query 2
SELECT
applic.`idnumber`,
applic.`appl_stat`,
applic.`casemangr`
FROM
`applic` applic
WHERE
(applic.`appl_stat` = 'SU0' AND applic.`casemangr` <> '000')
ORDER BY
applic.`idnumber` ASC
/////Query 3 (1+2 combined)
SELECT
applic.`idnumber`,
applic.`appl_stat`,
applic.`casemangr`,
refer.`idnumber`,
refer.`proj_from`,
refer.`answer`,
refer.proj_from + refer.answer
FROM
`applic` applic LEFT OUTER JOIN `refer` refer ON applic.`idnumber` = refer.`idnumber`
WHERE
(applic.`appl_stat` = 'EN'
and
refer.`idnumber` NOT IN (SELECT refer.`idnumber` FROM `refer` refer WHERE refer.`proj_from` = '018601' AND refer.`answer` = 'T'))
or
(applic.`appl_stat` = 'SU0' AND applic.`casemangr` <> '000')
ORDER BY
applic.`idnumber` ASC
This is the error I get when I try to run it.
ODBC error: [Microsoft][ODBC Visual FoxPro Driver] Invalid key length.
My 3rd query may be wrong but I doubt it. Does anyone have any idea what so ever what it could be?
Thanks
/////Query 1
SELECT
applic.`idnumber`,
applic.`appl_stat`,
applic.`casemangr`,
refer.`idnumber`,
refer.`proj_from`,
refer.`answer`,
refer.proj_from + refer.answer
FROM
`applic` applic LEFT OUTER JOIN `refer` refer ON applic.`idnumber` = refer.`idnumber`
WHERE
(applic.`appl_stat` = 'EN'
and
refer.`idnumber` NOT IN (SELECT refer.`idnumber` FROM `refer` refer WHERE refer.`proj_from` = '018601' AND refer.`answer` = 'T'))
ORDER BY
applic.`idnumber` ASC
//////Query 2
SELECT
applic.`idnumber`,
applic.`appl_stat`,
applic.`casemangr`
FROM
`applic` applic
WHERE
(applic.`appl_stat` = 'SU0' AND applic.`casemangr` <> '000')
ORDER BY
applic.`idnumber` ASC
/////Query 3 (1+2 combined)
SELECT
applic.`idnumber`,
applic.`appl_stat`,
applic.`casemangr`,
refer.`idnumber`,
refer.`proj_from`,
refer.`answer`,
refer.proj_from + refer.answer
FROM
`applic` applic LEFT OUTER JOIN `refer` refer ON applic.`idnumber` = refer.`idnumber`
WHERE
(applic.`appl_stat` = 'EN'
and
refer.`idnumber` NOT IN (SELECT refer.`idnumber` FROM `refer` refer WHERE refer.`proj_from` = '018601' AND refer.`answer` = 'T'))
or
(applic.`appl_stat` = 'SU0' AND applic.`casemangr` <> '000')
ORDER BY
applic.`idnumber` ASC
This is the error I get when I try to run it.
ODBC error: [Microsoft][ODBC Visual FoxPro Driver] Invalid key length.
My 3rd query may be wrong but I doubt it. Does anyone have any idea what so ever what it could be?
Thanks