sql in =

 

 

select * from data_analyze_report where report_code in
(
select report_code from data_analyze_report_title where user_id = '1' and report_type = 'DAY' and  to_date('2011-04-13', 'yyyy-mm-dd') <= to_date(report_date , 'yyyy-mm-dd') and to_date(report_date , 'yyyy-mm-dd') <= to_date('2011-06-28', 'yyyy-mm-dd')
)

 

 


select * from data_analyze_report where report_code =
(
select report_code from data_analyze_report_title where user_id = '1' and report_type = 'DAY' and  to_date('2011-04-13', 'yyyy-mm-dd') <= to_date(report_date , 'yyyy-mm-dd') and to_date(report_date , 'yyyy-mm-dd') <= to_date('2011-06-28', 'yyyy-mm-dd')
)

 

 

in 跟 =要区分开来

你可能感兴趣的:(sql,Date,report,user)