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

sql serverºÍoracleÐÐתÁеÄÒ»ÖÖµäÐÍ·½·¨

sql serverºÍoracleÐÐתÁеÄÒ»ÖÖµäÐÍ·½·¨
Ç°ÑÔ£ºÍøÉÏÓв»ÉÙÎÄÕÂÊǽ²ÐÐתÁеģ¬µ«ÊǴ󲿷ֶ¼ÊÇÖ±½ÓÌù´úÂ룬ºöÊÓÁËÖмä¹ý³Ì£¬±¾ÈË×Ô¼ºË¼¿¼ÁËÏÂΪʲôҪÕâÑùʵÏÖ£¬²¢ÇÒ×öÁËÈçϵıʼǣ¬¶ÔÓÐЩ¶®µÄÈËÀ´Ëµ¿ÉÄÜûÓмÛÖµ£¬Ï£Íû¶Ô»¹²»¶®µÄÈËÓÐÒ»µã½è¼øÒâÒå¡£
¶ÔÓÚÓÐЩҵÎñÀ´Ëµ£¬Êý¾ÝÔÚ±íÖеĴ洢ºÍÆä×îÖÕµÄGrid±íÏÖÇ¡ºÃÏ൱ÓÚ°ÑÔ´±íµ¹×ª£¬ÄÇôÕâ¸öʱºòÎÒÃǾÍÅöµ½ÁËÈçºÎ°ÑÐÐת»¯ÎªÁеÄÎÊÌ⣬ΪÁ˼ò»¯ÎÊÌ⣬ÎÒÃÇÇÒ¿´Èçϲéѯ³öÀ´µÄÊý¾Ý£¬Äú²»±Ø¹ØÐıíµÄÉè¼ÆÒÔ¼°sqlÓï¾ä£º

¼ÙÉèÓõ½µÄsqlÓï¾äΪ£º
SELECT [ÐÕÃû],[ʱ´ú],[½ðÇ®]
  from [test].[dbo].[people]  
Õâ¸ö±í´æ´¢ÁËÁ½¸öÈËÔÚ²»Í¬Ê±´ú£¨Ê±´úÊǹ̶¨µÄÈý¸ö£ºÄêÇá¡¢ÖÐÄêºÍÀÏÄ꣩ӵÓеĽð±Ò£¬ÆäÖУº
ÕÅÈýÔÚÄêÇá¡¢ÖÐÄêºÍÀÏÄêʱÆÚ·Ö±ðÓµÓÐ1000¡¢5000¡¢800¸ö½ð±Ò£»
ÀîËÄÔÚÄêÇá¡¢ÖÐÄêºÍÀÏÄêʱÆÚ·Ö±ðÓµÓÐ1200¡¢6000¡¢500¸ö½ð±Ò¡£
ÏÖÔÚÎÒÃÇÏë°ÑÁ½ÈËÔÚ²»Í¬½×¶ÎÓµÓеĽð±ÒÓÃÀàËÆÈçϵıí¸ñÀ´Õ¹ÏÖ£º
ÐÕÃû
ÄêÇá
ÖÐÄê
ÀÏÄê
ÕÅÈý
1000
5000
800
ÀîËÄ
1200
6000
500
ÎÒÃÇÏÖÔÚ¿¼ÂÇÓÃ×î¼òµ¥ºÍÖ±½ÓµÄ°ì·¨À´ÊµÏÖ£¬Æäʵ¹Ø¼üÊÇÈçºÎ´´½¨ÄÇЩÐèÒªÔö¼ÓµÄÁУ¬ÇÒÈçºÎÉ趨ÆäÖµ£¬ÏÖÔÚÎÒÃÇÀ´´´½¨“ÄêÇá”ÁУ¬¹Ø¼üµÄÎÊÌâÊÇ£¬ÕâÒ»ÁеÄÖµÈçºÎÉ趨£¿ºÏ·¨µÄÂß¼­Ó¦¸ÃÊÇÕâÑù£ºÈç¹û¸ÃÐв»ÊÇ“ÄêÇá”ʱ´ú£¬ÄÇôÆ䓽ðÇ®”ÎÒÃÇÈÏΪÊÇ0£¬ÄÇôsqlÓï¾äÈçºÎдÄØ£¿
Èç¹ûÊÇÓõÄsql server£¬ÄÇô¿Ï¶¨ÒªÓõ½caseÁË£º
case  [ʱ´ú] when 'ÄêÇá' then [½ðÇ®] else 0 end as ÄêÇá
»ò
case when  [ʱ´ú]= 'ÄêÇá' then [½ðÇ®] else 0 end as ÄêÇá
Èç¹ûÓõÄÊÇoracle£¬ÄÇôҪÓõ½decodeº¯Êý£¬decode(1+1,3,'´í',2,'ÊÇ',5,'´í','¶¼²»Âú×ãÏ·µ»ØµÄÖµ')£¬Õâ¸öº¯Êý½«·µ»Ø“ÊÇ”£¬¾ßÌåÓ÷¨ÏÞÓÚƪ·ùÕâÀï²»ÔÙ½éÉÜ£¬ÏàÐÅ´ó¼Ò´ÓÕâ¸öʽ×Ó¿ÉÒÔ´ó¸ÅÁ˽⵽ÆäÒâ˼£¬ÓÃdecode´´½¨“ÄêÇá”Áеľä×ÓÊÇ£ºÍêÕûµÄsqlÓï¾äÈçÏÂËùʾ£º
decode(ʱ´ú,'ÄêÇá',½ðÇ®,0)) ÄêÇá
SELECT [ÐÕÃû],[ʱ´ú],[½ðÇ®], 
case  [ʱ´ú] when 'ÄêÇá' then [½ðÇ®] else 0 end as ÄêÇá,
case  [ʱ´ú] when 'ÖÐÄê' then [½ðÇ®] else 0 end as&nb


Ïà¹ØÎĵµ£º

oracleÊý¾Ý¿âµ¼½øACEESSµÄ·½·¨

 2010Äê2ÔÂ3ÈÕ£¬±¾ÈËÓÐÒ»個興奮µÄС發現£¬ÊµÑéÖ¤Ã÷£¬Ö±½ÓÓÃTOAD½«oracleÊý¾Ý¿âÖеÄÊý¾ÝÖ±½Óµ¼Èë
ACCESSÖÐÊDz»¿ÉÄܵġ£ÄÇ為ÁË×öµ½´ÓTOADÖн«Êý¾Ýµ¼ÈëACCESSÔËÓüä½ÓÇþµÀ¡£¿ÉÒÔÓÃÎı¾Îļþ»òxlsµÈÎļþ¡£Æäʵ×îÁîÎҸе½¾ªÏ²µÄÊÇ£¬ÎÒÊÇͨ¹ýsql 2000×÷為Ò»¸ö¼ä½ÓµÄÖн飬ÒòĠ ......

ÓÃradiusºÍoracle×öÈÏÖ¤¼Æ·Ñϵͳ


Redhat
as4 + oracle 10g(10.2.0)
+ freeradius1.1.2+ tomcat5.5
*****************************
±¾ÎÄĿ¼
********************************
Ò»¡¢°²×°
redhat as4
¶þ¡¢°²×°
oracle 10g
£¨
10201_database_linux32.zip
£©
   
£¨Ò»£©¼ì²é
oracle 10g
ËùÐèµÄ°ü×é¼þ£º
£¨¶þ£©ÉèÖÃϵͳ²ÎÊ ......

SQL ServerºÍOracleµÄ³£Óú¯Êý¶Ô±È

---------Êýѧº¯Êý
1.¾ø¶ÔÖµ
S:select abs(-1) value
O:select abs(-1) value from dual
2.È¡Õû(´ó)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.È¡Õû£¨Ð¡£©
S:select floor(-1.001) value
O:select floor(-1.001) value from dual
4.È¡Õû£¨½ØÈ¡£©
S:select cast(-1.002 as int) v ......

ѧϰSQLÓï¾äÖ®SQLÓï¾ä´óÈ«

¡¡--Óï ¾ä ¹¦ ÄÜ¡¡¡¡--Êý¾Ý²Ù×÷¡¡¡¡SELECT --´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁС¡¡¡INSERT --ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐС¡¡¡DELETE --´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐС¡¡¡UPDATE --¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý¡¡¡¡--Êý¾Ý¶¨Òå¡¡¡¡CREATE TABLE --´´½¨Ò»¸öÊý¾Ý¿â±í¡¡¡¡DROP TABLE --´ÓÊý¾Ý¿âÖÐɾ³ý±í¡¡¡¡ALTER TABLE --ÐÞ¸ÄÊý¾Ý¿â±í½á¹¹¡¡¡¡CREATE VI ......

¶¯Ì¬SQL(Dynamic SQL)

----start
    ¶¯Ì¬SQLÊÇÔÚ³ÌÐòÔËÐÐʱ¹¹ÔìµÄ£¬ÒªÖ´Ðе¥ÌõSQL£¬Ê¹ÓÃEXECUTE IMMEDATE Óï¾ä£»µ±ÅúÁ¿Ö´ÐÐSQLʱ£¬ÏÈʹÓÃPREPARE Óï¾ä¹¹ÔìSQL£¬È»ºóʹÓÃEXECUTE Óï¾äÖ´ÐС£
Ò»£ºPrepareÓï¾ä£ºÓÃÀ´¹¹ÔìÅúÁ¿SQL
Óï·¨£º
PREPARE <sql-statement> [OUTPUT] INTO <result> [INPUT INTO] <input> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ