Case is left (t5.name,2) = ' substring ' and then ' (t5.name,9,2) Else substring (t5.name,7,2) End GD
Intercept pre-1~10 digits ac17072408
Select substring (name,0,11) from Profin_application;
name=ac1707240801
Select substring (name,0,11) from Profin_application;
Select Left (name,10) from Profin_application;
Select T1.name, Timeadd (' Hour ', 8,t1.date), T3.name_template, left (t3.name_template,3), substring (t3.name_ template,6,3) number, t4.material, T4.cust_spec,
T5.name, Case is left (t5.name,2) = ' "Then substring" (t5.name,3,6) Else left (t5.name,6) End pp,case when left ( t5.name,2) = ' then substring (t5.name,9,2) Else substring (t5.name,7,2) End GD, right (t5.name,3), T6.name, T8.name, T2.lqty
From mrp_production_report T1
Left join Mrp_production_report_line T2 on t1.id=t2.line_id
Left join product_product T3 on T2.lproduct_id=t3.id
Left join product_template T4 on T3.product_tmpl_id=t4.id
Left join Mrp_production_report_lot T5 on t5.id=t2.lot_id
Left join Mrp_routing_workcenter T6 on T6.id=t2.lprocedure
Left join Res_users T7 on T7.id=t2.lemployee
Left join Res_partner T8 on t8.id=t7.partner_id
where t2.lstate=2 and t6.name= ' sorting ' or t6.name= ' wrapper ' and t1.company_id=4 and t1.date>= ' ${sd} 0:00:00 ' and T1.date<= ' ${ed} 23:59:59 '
SQL statement Intercept string