搜索
写经验 领红包
 > 社会

学代码是什么意思(学的代码)

导语:学习代码查询

学代码是什么意思(学的代码)

--column day6 new_value 6 noprint

--select store_name||&39; day6 from store_queue where store_no=&&1;

col c0 hea &39; for 9999

col c1 hea &39; for 99999999999

col c00 hea &39; for 9999

col c2 hea &39; for a60

col c3 hea &39; for 99999.99

col c4 hea &39; for 9999.99

col c5 hea &39; for 99999.99

col c6 hea &39; for 99999

col c15 hea &39; for a10

col c16 hea &39; for a10

col c17 hea &39; for a20

col c7 hea &39; for a12

col c8 hea &39; for a12

col c9 hea &39; for 999

col c10 hea &39; for 99999.99

col c11 hea &39; for 99999

col c12 hea &39; for a36

col c13 hea &39; for a10

col c14 hea &39; for a10

set line 300

--set colsep |;

set feedback off;

set trimout on;

set trimspool on;

set recsep off;

set underline off;

set feed off;

set feedback off;

set verify off

set pagesize 10000

spool kvipx.prn

select

a.group_no c0,

a.item c1,

a.descr c2,

a.unit_retail c3,

a.dms c4,

a.stock_on_hand c5,

--a.on_order c10,

--avg(a.stock_on_hand)/avg(a.dms) c6,

a.status c15,

a.kvi_ind c16,

a.item_type c17,

to_char(a.last_sold,&39;) c7,

to_char(a.last_received,&39;) c8

from

erp_item_loc a

where

a.location=110

--and a.item in(select item from kvi)

--and a.group_no in(206)

--and a.supplier in(21101747,21000103)

--and a.group_no not in(101,102,103,104)

--and a.status=&39;

and a.kvi_ind=&39;

--and a.item_type=&39;

--and a.item in(select item from ordloc where location=110 and estimated_instock_date)

--and a.stock_on_hand=0

--and a.stock_on_hand<=0

--and (sysdate-a.last_sold<=30 and a.last_received is not null)

--and a.last_sold is not null

group by

a.group_no,

a.item ,

a.descr ,

a.unit_retail ,

a.dms,

a.stock_on_hand,

--a.on_order,

a.status ,

a.kvi_ind ,

a.item_type,

to_char(a.last_sold,&39;),

to_char(a.last_received,&39;)

order by

c0,c4 desc;

spool off;

exit;

本文内容由快快网络小信整理编辑!