|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
query problem
Hi friends
Here I have one query, It was giving problem Problem is---------------------------------------- INVALID KEYWORD "FETCH"; VALID SYMBOLS ARE: ) UNION EXCEPT -------------------------------------------------- This is the query--------------------------------- SELECT COUNT(*) INTO v_cnt FROM XYZ A6, ABCDF B6 WHERE A6.TrnsId = B6.TRNS_ID AND NOT EXISTS (SELECT C6.* FROM ORDER C6 WHERE A6.OrdNbr = C6.ORD_NUM AND A6.LocCode = C6.ORTG_LOC_CODE FETCH FIRST 1 ROWS ONLY); --------------------------------------------------------- Can any one please help me.. Thanks |
|
#2
|
|||
|
|||
|
Why do ou even need the fetch first... in that subquery?
simply do your where not exists... without that! fv
__________________
...because that is the way we have always done it. We've been doing it like that for 80 Years! (How do we change that mindset?) |
![]() |
| Viewing: Dev Shed Forums > Databases > DB2 Development > query problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|