You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
411 B
MySQL
9 lines
411 B
MySQL
2 years ago
|
select c.id,c.cargoinfo_id,c.cargociq_id,
|
||
|
(select ciqcode from Import_cargociq where id=c.cargociq_id) cargociq,
|
||
|
a.cargoinfo_id,a.cargociq_id,
|
||
|
(select ciqcode from Import_cargociq where id=a.cargociq_id) appciq
|
||
|
from import_cargo c
|
||
|
left join Import_appstate s on s.cargo_id=c.id
|
||
|
left join Import_approval a on a.id=s.app_id
|
||
|
left join import_main m on m.contractno=c.contractno
|
||
|
where c.cargociq_id<>a.cargociq_id
|