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

Oracle ÈÕÆÚ²éѯÎÊÌâ

ÎÒÓÐÒ»ÕűíÓиö×Ö¶ÎÃû³ÆÊÇstarttime ÀàÐÍÊÇDATE ,ÆäÖÐÓÐÒ»ÐеÄÖµÊÇ"11:00:00",ÎÒÏë°ÑÕâÒ»ÁÐÑ¡³öÀ´,Óï¾äÈçÏÂ:
select * from routebanci where starttime='11:00:00' and routename='***',¿ÉÊÇ×ÜÊÇ˵:ORA-01843: not a valid month,ÍøÉÏ¿´ÁËÒ²¸Ä¶¯ÁËһϲÎÊý NLS_DATE_LANGUAGE=AMERICAN ºÍ NLS_DATE_FORMAT=YYYY-MM-DD,¿ÉÊÇ»¹ÊDz»ÐÐ
Çë½ÌÒ»ÏÂʲôԭÒò,ÎÒÕâÀïûÓÐÄêÔÂÈÕµÄ,Ö»ÒªÒ»¸öʱ¼ä¾Í¿ÉÒÔÁË,±íÔ­À´ÊÇSQL½¨Á¢µÄ,Êǵ¼¹ýÀ´µÄ,²»ÖªµÀÓÐʲôºÃµÄ½â¾ö°ì·¨

...starttimeÄã²»ÊÇ˵ÁËÊÇdateÀàÐÍÂð
'11:00:00'ÊÇ×Ö·û´®£¬µ±È»²»Æ¥ÅäÁË
select * from routebanci where to_char(starttime,'hh24:mi:ss')='11:00:00' and routename='***'
ÊÔÊÔ

SQL code:
select * from routebanci where substr(to_char(starttime,'yyyy-mm-dd hh24:mi:ss'),11,8) = '11:00:00'


Ö§³Ö~

--¸øÄãʾÀý×Ó:
select to_char(sysdate,'hh24:mi:ss') from dual;

Ŷ£¬ÕâÑùµÄ»°¿ÉÒÔÁË,лл.
Äܲ»ÄÜת»¯ºóÃæµÄ£¬Ç°ÃæÊÔÁËTO_DATE()ºÃÏñ²»ÐУ¬²»ÖªµÀÓ¦¸ÃÔõôд£¬ÕâÑù²éѯ·¶Î§µÄ»°·½±ãÒ»µã£¬ÕâÀïÓ¦¸Ã¿ÉÒÔʹÓÃbetweenÓï¾äµÄ°É,ûÓÐÓùýQRACLE ºÇºÇ

¿¨Î÷Å·ÕýÈ·

Äܲ»ÄÜת»¯ºóÃæµÄʱ¼äÀ´×ö

ÒýÓÃ
Äܲ»ÄÜת»¯ºóÃæµÄʱ¼äÀ´×ö

¿ÉÒÔ°¡£¬µ«ÊÇÕâÑùµÄ»°¾ÍҪƥÅäµ½ÄêÔÂÈÕ£¬ÒòΪdate¸ñʽ°üº¬ÁËÄêÔÂÈÕʱ·ÖÃë
µ±Ã»¶ÔÄêÔÂÈÕ¸³ÖµÊ±£¬ÄêÔÂÈջᱻĬÈÏΪµ±Äê±¾ÔµĵÚÒ»Ìì


Ïà¹ØÎÊ´ð£º

Çë½Ì¹ØÓÚoracleµÄ×Ô¶¨Ò庯ÊýµÄÎÊÌâ

create or replace function GetWorkBeginTime()
  return date is
  myDate    date;
begin
  myDate := trunc(sysdate-1)+8/24;
  return myDate;
end;

......

ÇóÖúORACLEÅúÁ¿Çå³ý±íÊý¾ÝµÄÎÊÌâ - Oracle / ¿ª·¢

±ÈÈçÎÒÓÐtestA¡¢testB¡¢testCÈý¸ö±í
ÎÒÏÖÔÚÐèҪдһ¸öÅú´¦Àí»òÕ߽ű¾¸ø±ðÈË ×÷ÓþÍÊÇÖ´ÐÐÕâ¶ÎÓï¾ä¿ÉÒÔÇå³ýÕâÈý¸ö±íÀïÃæµÄÊý¾Ý ¾ÍÊÇÒ»¸ö³õʼ»¯µÄÒâ˼
ÄÄλ¸ßÈË°ïÖúÏ°¡ Ò»¸öÊý¾Ý¿âС°×ÔÚ´ËÇó¾ÈÀ²
SQL code:
......

oracleÖÐ×ÝÏòתºáÏò

ÓÐÒ»±íÈçÏ£º
      ID    ÐÕÃû    ¿ÆÄ¿    ³É¼¨ 
      1      ÕÅÈý    ÓïÎÄ    80  ......

ÇóʹÓÃt-sqlÓï¾ä½«paradoxÊý¾Ýµ¼ÈëoracleµÄ°ì·¨

ʹÓÃt-sqlÓï¾ä½«sqlserver2kÊý¾Ýµ¼ÈëparadoxµÄ¹¦ÄÜÎÒÒÑʵÏÖ£¬ÓõÄÊÇinsert into ... from table in [ODBC][ODBC;Driver=SQL Server...]µÄ°ì·¨£¬µ±ÎÒ×¼±¸Èç·¨ÅÚÖÆÍê³Éparadoxµ¼Èëoracleʱȴ²»ÐУ¬²»±¨´íµ«ÊÇÖ´ÐкóÃ»Ó ......

C# winformµ÷ÓÃoracleº¯Êý·µ»ØÓαê?

ÇëÎÊÒ»ÏÂ,C# winformÖÐͨ¹ýOleDbCommand,Ôõôµ÷ÓÃoracle·µ»ØÓαêÀàÐ͵ĺ¯Êý?¼±!!!


/// <summary>
        /// Ö´Ðдø²ÎÊýµÄ´æ´¢¹ý³Ì·µ»ØÊý¾Ý¼¯
      &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ