SELECT '573' CITY_ID, in CASE the WHEN SF. THEN FDBH=2 '11943000' s SF. FDBH=7 THEN '11943001' s SF. THEN FDBH=12 '11943002' s SF. FDBH=9 THEN '11943003' s SF. FDBH=11 THEN '11943004' ELSE 'END JDFDBH, JD. JDSKU, SF. LSDJ AS LSDJ,' SCJ
The FROM SPXX_JB S, SPXX_JD JD, SPXX_FD SF, SPKCZT SK
WHERE SF. SP_ID=S.S P_ID AND
SF. SP_ID=SK. SP_ID AND
SF. FDBH=SK. FDBH AND
JD. SPCODE=S.S PCODE AND JD. JDSKU IS NOT NULL AND trim (translate (JD) JDSKU, '0123456789', ')) IS NULL AND SF. The FDBH=: FDBH
The ORDER BY SF. CXLSDJ
Above is the original query to query between 1000-2000 records, and does not display the rownum