Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kprasadreddy
Starting Member
41 Posts |
Posted - 2005-03-23 : 09:15:09
|
| I am trying to get the cstdnt_nb where stdnt completed the courses based on a different condition and where courses are based on CRS_NB and CRS_VRSN_NB and am getting the Error at ExistsAND LD180.CRS_NB AND LD180.CRS_VRSN_NBEXISTS (SELECT DISTINCT LD075.CRS_NB,ld075.crs_vrsn_nb FROM ZLDT075_CRRCLM_CRS LD075 INNER JOIN ZLDT030_CRS LD030 ON LD075.CRS_NB = LD030.CRS_NB AND LD075.CRS_VRSN_NB = LD030.CRS_VRSN_NB WHERE LD030.CRS_STAT_CD = 1 AND LD075.CRRCLM_CD IN (1) AND LD075.CRRCLM_TRACK_CD IN (23) AND LD075.LOC_CD IN('BA','ZZ') AND LD075.CRS_REQIR_CD IN (1,2))SELECT DISTINCT LD180.STDNT_NB, ld010.USER_ID_CD, LD010.FIRST_NM, LD010.LAST_NM, LD180.CRS_NB, LD180.CRS_VRSN_NB, LD030.CRS_NM FROM ZLDT180_SCR LD180 INNER JOIN ZLDT010_STDNT LD010 ON LD010.STDNT_NB = LD180.STDNT_NB INNER JOIN ZLDT030_CRS LD030 ON LD030.CRS_NB = LD180.CRS_NB AND lD030.CRS_VRSN_NB = LD180.CRS_VRSN_NB INNER JOIN ZLDT075_CRRCLM_CRS LD075ON LD075.CRS_NB = LD180.CRS_NB AND LD075.CRS_VRSN_NB = LD180.CRS_VRSN_NB WHERE LD010.USER_ID_CD = 'CLEE89' AND LD180.CRS_NB EXISTS (SELECT DISTINCT LD075.CRS_NB,ld075.crs_vrsn_nb FROM ZLDT075_CRRCLM_CRS LD075 INNER JOIN ZLDT030_CRS LD030 ON LD075.CRS_NB = LD030.CRS_NB AND LD075.CRS_VRSN_NB = LD030.CRS_VRSN_NB WHERE LD030.CRS_STAT_CD = 1 AND LD075.CRRCLM_CD IN (1) AND LD075.CRRCLM_TRACK_CD IN (23) AND LD075.LOC_CD IN('BA','ZZ') AND LD075.CRS_REQIR_CD IN (1,2))AND LD180.QSTN_CATG_CD IN ('EC','MC')AND LD075.CRRCLM_CD IN (1) AND LD075.CRRCLM_TRACK_CD IN (23)AND LD075.LOC_CD IN('BA','ZZ') AND LD075.CRS_REQIR_CD IN (1,2)AND ((LD180.ENTYCHLNGSCRVAL_PC >= 0.85) or (LD180.MSTRCHLNGSCRVAL_PC >= 0.85))ORDER BY LD030.CRS_NM |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-03-23 : 09:53:39
|
| Is this lab work? What school are you in?TRY SELECT *Brett8-) |
 |
|
|
kprasadreddy
Starting Member
41 Posts |
Posted - 2005-03-23 : 10:11:23
|
| This is not not lab work....I am tryinn to get STDNT_NB by giving CRS_NB and CRS_VRSN_NB where CRS_NB AND VRSN_NB EXISTS IN SUBWUERYWHERE LD010.USER_ID_CD = 'CLEE89' AND LD180.CRS_NB EXISTS (SELECT DISTINCT LD075.CRS_NB,ld075.crs_vrsn_nb FROM ZLDT075_CRRCLM_CRS LD075 INNER JOIN ZLDT030_CRS LD030ON LD075.CRS_NB = LD030.CRS_NBAND LD075.CRS_VRSN_NB = LD030.CRS_VRSN_NBWHERE LD030.CRS_STAT_CD = 1 AND LD075.CRRCLM_CD IN (1) AND LD075.CRRCLM_TRACK_CD IN (23)AND LD075.LOC_CD IN('BA','ZZ') AND LD075.CRS_REQIR_CD IN (1,2)) |
 |
|
|
kprasadreddy
Starting Member
41 Posts |
Posted - 2005-03-23 : 10:36:33
|
| Got it Thanks! |
 |
|
|
|
|
|
|
|