Hello, I have bee struggling with this statement. If take out the reference to "patternDirect" & "blockVariantBDDetail", it will run fine. The error is raising on the line with from. Any suggestions?
set pagesize 0;
set heading off;
set trimspool on;
set feedback off;
alter session set nls_date_format='YYYYMMDD';
spool G:\Backups\CIN\DailyPiece_RTO.log
select
distinct(b."badge")||','||
a."opDate"||','||
ltrim(rtrim(a."blockRoute"))||','||
a."actDrivBegTime"||','||
a."actDrivEndTime"||','||
c."lastName"||','||
c."firstName"||','||
ltrim(rtrim(a."vehicleID"))||','||
ltrim(rtrim(a."blockID"))||','||
ltrim(rtrim(a."runNumber"))||','||
a."division"
d."patternDirection"
from "dailyPiece" a,"employeeStatus" b,"employee" c,"blockVariantBDDetail" d
where a."opDate" between sysdate-2 and sysdate-1
and a."vehicleID" is not null
and a."emp_SID"=b."emp_SID"
and b."emp_SID"=c."emp_SID";
spool off;
ERROR at line 14:
ORA-00923: FROM keyword not found where expected
set pagesize 0;
set heading off;
set trimspool on;
set feedback off;
alter session set nls_date_format='YYYYMMDD';
spool G:\Backups\CIN\DailyPiece_RTO.log
select
distinct(b."badge")||','||
a."opDate"||','||
ltrim(rtrim(a."blockRoute"))||','||
a."actDrivBegTime"||','||
a."actDrivEndTime"||','||
c."lastName"||','||
c."firstName"||','||
ltrim(rtrim(a."vehicleID"))||','||
ltrim(rtrim(a."blockID"))||','||
ltrim(rtrim(a."runNumber"))||','||
a."division"
d."patternDirection"
from "dailyPiece" a,"employeeStatus" b,"employee" c,"blockVariantBDDetail" d
where a."opDate" between sysdate-2 and sysdate-1
and a."vehicleID" is not null
and a."emp_SID"=b."emp_SID"
and b."emp_SID"=c."emp_SID";
spool off;
ERROR at line 14:
ORA-00923: FROM keyword not found where expected