G
Guest
I'm having trouble creating a local table in the current database. I'm trying
to use a SQL pass through query. Could you look at this and tell me what I'm
doing wrong?
CREATE TABLE ActiveEmplyeeAnnualRate (last_name, first_name, annual_rt)
select a.emplid, b.last_name, b.first_name, a.annual_rt into Active Emplyee
Annual Rate
from hrwpv.ps_job a, hrwpv.ps_names b
where a.emplid = b.emplid
and a.empl_status in ('A', 'P', 'L')
and a.emplid > '000000001'
and a.company < '90'
and a.effdt = (select max(aa.effdt)
from hrwpv.ps_job aa
where a.emplid = aa.emplid)
and a.effseq = (select max(aaa.effseq)
from hrwpv.ps_job aaa
where a.emplid = aaa.emplid
and a.effdt = aaa.effdt)
;
to use a SQL pass through query. Could you look at this and tell me what I'm
doing wrong?
CREATE TABLE ActiveEmplyeeAnnualRate (last_name, first_name, annual_rt)
select a.emplid, b.last_name, b.first_name, a.annual_rt into Active Emplyee
Annual Rate
from hrwpv.ps_job a, hrwpv.ps_names b
where a.emplid = b.emplid
and a.empl_status in ('A', 'P', 'L')
and a.emplid > '000000001'
and a.company < '90'
and a.effdt = (select max(aa.effdt)
from hrwpv.ps_job aa
where a.emplid = aa.emplid)
and a.effseq = (select max(aaa.effseq)
from hrwpv.ps_job aaa
where a.emplid = aaa.emplid
and a.effdt = aaa.effdt)
;