November 5, 2004 at 8:32 am
I am receiving an error, "Server: Msg 1509, Level 20, State 4, Line 39 Row compare failure.", from running a SELECT DISTINCT query. If I run the same query as a SELECT query without the DISTINCT keyword, I do not get the error. Has anyone seen this before. any help on this will be greatly appreciated.
TIA
November 5, 2004 at 8:40 am
Hi Ishaan,
A little more information is necessary I think.
The Select statement would be good.
Steve
We need men who can dream of things that never were.
November 5, 2004 at 8:52 am
Heres the SQL Script
SELECT DISTINCT
PROD_KEY,
CAST(1 AS BIT) AS DISPLAY_FLAG,
RIGHT(PROD_KEY, 7) AS PROD_ID,
PROD_NM,
LEFT('XXXXXXX-CCCC', 18) AS XX_MKT_NM,
USC_CD,
ATC_CD,
CASE WHEN CORP_NM = 'UNKNOWN' THEN MFR_NM ELSE CORP_NM END as corp_nm,
NULL AS PROD_FORM_CD,
NULL AS STRNT_DESC,
MFR_ABRV,
RX_Stat,
XX_Mkt_Cd,
CASE WHEN CORP_NM = 'UNKNOWN' THEN LEFT(PROD_NM + ':' + MFR_NM, 30)
ELSE LEFT(PROD_NM + ':' + CORP_NM, 30) END AS RED_PROD_NM,
LEFT('XXX-CCC', 18) AS RED_CLIENT_MKT_NM,
USC_CD AS RED_USC_CD,
MFR_NM AS RED_MFR_NM,
NULL AS RED_PROD_FORM_CD,
NULL AS RED_STRNT_DESC,
0 AS FLAG,
'OOO-UUU' AS GROUP_1_NAME,
COUNTRY_NM AS GROUP_2_NAME,
CAST(NULL AS VARCHAR(50)) AS GROUP_3_NAME,
CAST(NULL AS VARCHAR(50)) AS GROUP_4_NAME,
CAST(0 AS INT) AS GROUP_1_ID,
CAST(0 AS INT) AS GROUP_2_ID,
CAST(0 AS INT) AS GROUP_3_ID,
CAST(0 AS INT) AS GROUP_4_ID,
CAST(NULL AS NUMERIC(18, 3) ) AS MARKET_SORT,
CAST(NULL AS NUMERIC(18, 3) ) AS GROUP_1_SORT,
CAST(NULL AS NUMERIC(18, 3) ) AS GROUP_2_SORT,
CAST(NULL AS NUMERIC(18, 3) ) AS GROUP_3_SORT,
CAST(NULL AS NUMERIC(18, 3) ) AS GROUP_4_SORT,
CAST(NULL AS NUMERIC(18, 3) ) AS RED_PROD_SORT
FROM
[XYZ].dbo.[ABCDEF]
WHERE
ATC_CD LIKE 'M01A%'
I also got repeated errors as Process 0:0 (8e8) UMS Context 0x11CA8588 appears to be non-yielding on Scheduler 0. in my sql logs when i try to kill the process.any thoughts on this
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply