estimados tengo este problema...he probado algunas cosas pero no me ha dado resultado
esta es la sentencia:
SQL> INSERT INTO lu_subscriber VALUES
SELECT co.co_id,
dn.dn_num,
co.co_activated,
DECODE(ch.ch_status, 'd', ch.ch_validfrom),
ch.ch_status,
co.tmcode,
e.imei,
DECODE(co.sales_contact_id, NULL, 'NI', co.sales_contact_id) AS sales,
bc.billcycle,
' ' AS flag,
co.customer_id,
ra.rs_sdes,
trunc(to_date(ch.ch_validfrom)),
dnu.dn_num AS dnu_num,
(SELECT dni.dn_num
FROM directory_number dni,
contr_services_cap csi
WHERE co.co_id = csi.co_id
AND csi.dn_id = dni.dn_id
AND csi.seqno = (select max(X3.seqno) from CONTR_SERVICES_CAP X3 where X3.co_id = csi.co_id and X3.sncode = csi.sncode)
AND dni.dirnum_npcode = 22) AS ip,
cd.cd_sm_num,
p.port_num 2 3 4 code,
ch.userlastmod,
' ' AS talkgroup,
dnu.member_alias,
DECODE(co.subm_id, 1, '2G', 24, '3G', NULL)
FROM contr_services_cap csc,
directory_number dn,
curr_co_status ch,
curr_co_device cd,
billcycle_actual_view bc,
equipment e,
reasonstatus_all ra,
contr_services_cap csu,
directory_number dnu,
port p,
contract_all co
WHERE csc.co_id = co.co_id
AND dn.dn_id = csc.dn_id
AND ch.co_id = co.co_id
AND cd.co_id = co.co_id
AND bc.customer_id = co.customer_id
AND cd.eq_id = e.equipment_id
AND ch.ch_reason = ra.rs_id
AND csc.main_dirnum = 'X'
= (select max(X1.seqno) from CONTR_SERVICES_CAP X1 where X1.co_id = csc.co_id and X1.sncode = csc.sncode)
AND dn.dirnum_npcode = 1
AND co.co_id = csu.co_id
AND csu.dn_id = dnu.dn_id
AND dnu.dirnum_npcode = 89
and CSU.SEQNO = (select max(X2.SEQNO) from CONTR_SERVICES_CAP X2 where X2.CO_ID = CSU.CO_ID and X2.SNCODE = CSU.SNCODE)
AND cd.port_id = p.port_id;
SELECT co.co_id,
*
ERROR at line 2:
ORA-00936: missing expression
Cuando quito INSERT INTO lu_subscriber VALUES ...no tengo problemas, por que hace la consulta y esta termina sin error.
si me pudieran ayudar...gracias