Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp¡¢delphi¡¢oracleµÄ¼¼ÊõÎĵµ×ܽá

1) DelphiÏòoracleÖд«µÝ²ÎÊý ÈçoracleÖеIJÎÊýÃûΪerpcx 
´ð£ºÈç¹ûÏë´Ó±íÀïÈ¡Öµµ½oracle£¬Ôòerpcx:=trim(aq1.fieldbyname('erpcx').AsString);
·ñÔòÖ±½ÓÓÿؼþÃû×Ö
Óï¾äΪ
with aperp do    
begin
connection:=dm.ADOCerp;      
parameters.Clear;       
procedurename:='pc_erpbominquery';       
parameters.CreateParameter(erpcx,ftstring,pdinput,60,erpcx); ´Ë¾äΪ´«²ÎÊýÓï¾ä
·ñÔòÖ±½ÓÓÃ Parameters.CreateParameter('@erpcx',ftString,pdInput,100,edit5.text);        
ExecProc;    
end; 
  
2)sqlÈ¡ËÄÉáÎåÈëÖ°  round(×Ö¶ÎÃû£¬Ð¡ÊýµãºóλÊýÈçÈ¡ÕûÊýΪ0) 
 
3)sqlÁ¬½Óͬһ·þÎñÆ÷µÄ²»Í¬±íµÄÊý¾Ý 
´ð£ºselect * from Êý¾Ý¿âÃû.dbo.±íÃû 
 
4£©ÒªÏë´Ó¶à¸ö±íÀï²éÊý¾Ý£¬aÀïÓÐ5¸ö bÀïÓÐ3¸ö cÀïÓÐ2¸öÏÔʾʱ¸ÃÈçºÎÈ¥µôÖظ´µÄ²¿·ÖÄØ
Èç ±ía                  ±íb                    ±íc
id  education          id    guanxi        id  work
0001  1´óѧ            0001    ¸¸×Ó          0001  1¹«Ë¾
0001  2´óѧ            0001    ĸ×Ó          0001  2¹«Ë¾
0001  3´óѧ            0001    ½ãÃÃ
0001  4´óѧ
´ð£ºalter table a add px int identity(1,1)
go
alter table b add px int identity(1,1)
go
alter table c add px int identity(1,1)
go
select  a.id,a.educatio


Ïà¹ØÎĵµ£º

ºìÆìDC Server 5.0ÉÏ°²×°Oracle 10g R2

  Ç°ÃæдÁ˶à·ÝºìÆìDC 4.1ºÍ5.0ÉÏ°²×°Oracle 9i/10gµÄÎĵµ£¬µ«Ò»Ö±Ã»ÓÐÕûÀíDC 5.0ÉÏ°²×°Oracle 10gµ¥»ú·þÎñÆ÷µÄ×ÊÁÏ£¬Ô­ÒòÊǸùý³Ì·Ç³£¼òµ¥¡£µ«×î½üÏîÄ¿ÖУ¬»¹ÊÇÓÐÓû§Óöµ½Ð©ÎÊÌ⣬½ñÌì¾Í°ÑһЩÐèҪעÒâµÄµØ·½ÕûÀíһϣ¬ÏêϸµÄ¹ý³Ì¾Í²»ÃèÊöÁË¡£
Ò»¡¢ÏµÍ³»·¾³
²Ù×÷ϵͳ£ººìÆì DC 5.0 for x86 »ò x86_64
Ó²¼þ»·¾ ......

oracle·Ö×麯ÊýÖ®ROLLUP

 
1.³õʼ»¯ÊµÑ黵¾³
1£©´´½¨²âÊÔ±ígroup_test
sec@ora10g> create table group_test (group_id int, job varchar2(10), name varchar2(10), salary int);
¡¡
Table created.
¡¡
2£©³õʼ»¯Êý¾Ý
insert into group_test values (10,'Coding',    'Bruce',1000);
insert into group_test val ......

ORACLE´Ó±íÖÐËæ»ú·µ»ØnÌõ¼Ç¼

ʹÓÃORDER BY×Ӿ䣬ROWNUMÄÚÖú¯ÊýºÍDBMS_RANDOM°üÖеÄÄÚÖú¯ÊýVALUEÀ´ÊµÏÖ
SQL> select * from
2 (
3 select ename,job
4 from emp
5 order by dbms_random.value()
6 )
7 where rownum<=5;
ENAME JOB
---------- ---------
TURNER SALESMAN
SMITH CLERK
MARTIN SA ......

ORACLE¶Ô×ÖĸºÍÊý×Ö»ìºÏµÄÊý¾ÝÅÅÐò

Ö÷ÒªÊÇͨ¹ýreplaceºÍtranslateÀ´ÊµÏÖ
SQL> create view v_tt
2 as
3 select ename||' '||deptno as data
4 from emp;
View created.
SQL> select * from v_tt;
DATA
---------------------------------------------------
SMITH 20
ALLEN 30
WARD 30
JONES 20
MARTIN 30
BLAKE 30
CLARK 10
......

ROLLUPºÍCUBEÓï¾ä¡£ ORACLE·Ö×éͳ¼Æ

ROLLUPºÍCUBEÓï¾ä¡£
OracleµÄGROUP
BYÓï¾ä³ýÁË×î»ù±¾µÄÓï·¨Í⣬»¹Ö§³ÖROLLUPºÍCUBEÓï¾ä¡£Èç¹ûÊÇROLLUP(A, B, C)µÄ»°£¬Ê×ÏÈ»á¶Ô(A¡¢B¡¢C)½øÐÐGROUP
BY£¬È»ºó¶Ô(A¡¢B)½øÐÐGROUP BY£¬È»ºóÊÇ(A)½øÐÐGROUP BY£¬×îºó¶ÔÈ«±í½øÐÐGROUP BY²Ù×÷¡£Èç¹ûÊÇGROUP BY
CUBE(A, B, C)£¬ÔòÊ×ÏÈ»á¶Ô(A¡¢B¡¢C)½øÐÐGROUP
BY£¬È»ºóÒÀ´ÎÊÇ(A¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ