This Query Below works fine, but returns me a bunch of records that need pruned out.
START_RUN_DATE, JOB_CODE FROM PF_SCHEDULE WHERE FORM_CODE='".$row["FORM_CODE"]."' AND CC_CODE='$cc_code'
So what I need to do is compare record TO the table PF_JOBS
If no record in PF_JOBS exists where the fields JOB_CODE match, THEN I DO NOT WAT THAT RECORD IN MY QUERY.
Im not good with SQL but attempted this below and of course its not correct, I need help with the query syntax.. PLEASE J
Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near the keyword 'WHERE'. (severity 15) in \ATEST-b.php on line 42
( DONT LAUGH, IM A BEGINNER )
JOB_CODE FROM PF_SCHEDULE WHERE
FORM_CODE='".$row["FORM_CODE"]."' AND CC_CODE='$cc_code'
AND WHERE JOB_CODE IN PF_JOBS EXISTS";
Any ideas on how that query should be? Would be much appreciated. THANKS!