2013-04-10 4 views
1
("SELECT * FROM (
    select id, title, report_date, report_file, company, 'company' as report_type from rs_company_report 
    union 
    select id, title, report_date, report_file, company, 'sector' as report_type from rs_sector_report 
    union 
    select id, title, report_date, report_file, company, 'morning' as report_type from rs_morning_report) as company_reports where company LIKE '%1%' order by title "); 

어떻게이 쿼리를 zend 테이블 게이트 웨이 형식으로 변환 할 수 있습니까?UNION을 사용하여 여러 테이블에서 데이터 가져 오기

+0

테이블 스키마를 게시하십시오. – Raptor

+0

스키마로 편집 한 질문입니다. –

답변

0

지금) (

을 결합있다 그러나이 두 작동하지 않습니다 :

  • 두 개 이상의 SELECT의

  • ORDER

관련 문제