Skip to Content
0
May 09, 2013 at 06:50 AM

Causing error in query using 3 tables?

26 Views

With Respect Gurus,

I have a problem in a query using 3 table tables with inner join...

SELECT a~DIVID a~DPTID b~SFTCD c~FRMTM c~TOTTM

INTO (YEMPMST-DIVID, YEMPMST-DPTID, YESHTMST-SFTCD,

YSHIFTM-FRMTM, YSHIFTM-TOTTM)

FROM yempmst as a

INNER JOIN YESHTMST as b

on b~ADRNR = a~ADRNR

AND b~EMPCD = a~EMPCD

AND b~untno = a~untno

AND b~FRMDT <= YATNDENT-PCHDT

AND b~TODAT >= YATNDENT-PCHDT

INNER JOIN YSHIFTM as c

on c~untno = b~untno

AND c~sftcd = b~sftcd

WHERE a~EMPCD = YATNDENT-EMPCD

AND a~UNTNO = YEMPMST-UNTNO.

ENDSELECT.

Error is:

The list "(YEMPMST-DIVID, YEMPMST-DPTID, YESHTMST-SFTCD,

YSHIFTM-FRMTM, YSHIFTM-TOTTM)" after "INTO" is not of the the form (f1,

...,fn), or contains an undefined field. the form (f1, ...,fn), or

contains an undefined field or contains an

But here all the fields are in correct order ..

Kindly give me suggestion...

Many Thanks / Himanshu Gupta