substr(strA,3,length(strA)-2)) 应该要用to_number转换一下的吧: select * from tbname where to_number(substr(strA,3,length(strA)-2))) > 7
select * from tableA where to_number(substr(strA,instr(strA,'/')+1))>7
Question: Please use a single SQL to get the following result. 以下是数据源,其中PO、Item、Unit price为表kaz_po_lines之列名(Column name)。 Data source -------------------------------- PO Item Unit price -------------------------------- 10 A1 1.25 10 A3 2.56 20 A2 1.26 20 A3 2.36 -------------------------------- Table Name: kaz_po_lines 以下是通过一个SQL语句后,想要得到的结果。 Get result: ---------------------------------------------- Item Unit price (PO 10) Unit price (PO 20) ---------------------------------------------- A1 1.25 NULL A2 NULL 1.26 A3 2.56 2.36 ----------------------------------------------
select * from tableA where to_number(substr(strA,instr(strA,'/')+1))>7
select * from tbname where to_number(substr(strA,3,length(strA)-2))) > 7
Please use a single SQL to get the following result.
以下是数据源,其中PO、Item、Unit price为表kaz_po_lines之列名(Column name)。
Data source
--------------------------------
PO Item Unit price
--------------------------------
10 A1 1.25
10 A3 2.56
20 A2 1.26
20 A3 2.36
--------------------------------
Table Name: kaz_po_lines
以下是通过一个SQL语句后,想要得到的结果。
Get result:
----------------------------------------------
Item Unit price (PO 10) Unit price (PO 20)
----------------------------------------------
A1 1.25 NULL
A2 NULL 1.26
A3 2.56 2.36
----------------------------------------------