today:
647
yesterday:
1,155
Total:
1,131,817

SQL Global & Custom Serach

admin 2016.04.28 14:28 Views : 187

-- Global Serach --



select * from (
select CUSTOMER_ID, Initcap( CUST_LAST_NAME ||','|| CUST_FIRST_NAME   ) Name, 
CUST_CITY, CREDIT_LIMIT, CUST_EMAIL, NLS_TERRITORY,
case ACCOUNT_MGR_ID
  when   1 then 'John'
    when   2 then  'Bill'
    when 3 then 'Smith'
   when  4 then 'Joe'
        when 5 then 'Ron' else
         'N/A'
         end as MGR_id
   from DEMO_CUSTOMERS
where instr(upper(CUST_LAST_NAME), upper  ( nvl (:P1_CUST_LAST_NAME,CUST_LAST_NAME))) > 0

AND instr(upper(CUST_FIRST_NAME), upper  ( nvl (:P1_CUST_FIRST_NAME,CUST_FIRST_NAME))) > 0

order by 1)
where (
 instr(upper("NAME"),upper(nvl(:P1_SEARCH,"NAME"))) > 0  or
 instr(upper("CUST_CITY"),upper(nvl(:P1_SEARCH,"CUST_CITY"))) > 0  or
 instr(upper("CUST_EMAIL"),upper(nvl(:P1_SEARCH,"CUST_EMAIL"))) > 0  or
 instr(upper("NLS_TERRITORY"),upper(nvl(:P1_SEARCH,"NLS_TERRITORY"))) > 0  or
 instr(upper("MGR_ID"),upper(nvl(:P1_SEARCH,"MGR_ID"))) > 0
)

No. Subject Author Date Views
29 Group by, Order by (두개의 Table을 활용한 Sub Total / 최고값 ) admin 2016.05.06 345
28 EMPLOYEE_LEVEL_ID admin 2016.05.03 145
27 HEAD TITLE (제목)을 조건에 따라 바꾸기 admin 2016.05.03 194
26 APEX ADMIN PASSWORD 바꾸기 admin 2016.05.02 160
25 wwv_flow_files admin 2016.05.01 199
24 EXPORT & IMPORT admin 2016.05.01 296
23 Outer Join with Oracle SQL admin 2016.04.29 206
22 Report by Order / Product / Order and Product / By Order & Non Order admin 2016.04.29 288
21 Delimiter admin 2016.04.29 194
20 SQL SELECT DISTINCT Statement admin 2016.04.29 234
19 TAP ( Main & Sub ) / Button 의 Switch admin 2016.04.28 228
18 COUNT admin 2016.04.28 206
17 CREATING A TABLE / SEQUENCE / TRIGGER admin 2016.04.28 252
16 CREATE (INSERT) PROCESS admin 2016.04.28 216
15 DELETE PROCESS admin 2016.04.28 222
» Global & Custom Serach file admin 2016.04.28 187
13 INSERT PROCESS admin 2016.04.28 214
12 JAVA for delete admin 2016.04.28 204
11 LIST OF VALUE (DYNAMIC) admin 2016.04.28 181
10 MAX admin 2016.04.28 211