Oracle sqlÓï¾äת»»ÎªMysqlÓï¾ä ¼±~~
Oracle £ºselect grbh from com.eway.vo.Zjxx zj where to_char(zj.jbsj,'yyyymm')='"+ sj + "'
ÆäÖÐ sjÊÇ×Ö·û´®²ÎÊý ÏÖÔÚÏë°ÑÉÏÃæµÄSQLÓï¾äת»»ÎªMysqlµÄ Ö÷ÒªÊÇʱ¼ä´«Èë ÒòΪ´«ÈëµÄÊÇ×Ö·û´® 200909 ¶øÊý¾Ý¿âÖÐÊÇ 2009-09-31 00£º00£º00 ËùÒÔÏëÇë½ÌÈçÉÏÔÚMysqlÈçºÎÐÞ¸Ä~
ÔÚÏßµÈ ¼±~~
DATE_FORMAT(zj.jbsj,'%Y%m')
SQL code:
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2009-09-09 16:08:42 |
+---------------------+
1 row in set (0.00 sec)
mysql> select date_format(now(),'%Y%m');
+---------------------------+
| date_format(now(),'%Y%m') |
+---------------------------+
| 200909 |
+---------------------------+
1 row in set (0.00 sec)
mysql>
ÍêÈ«µÈ¼ÛµÄд·¨ date_format º¯Êý µÈ¼ÛÓÚ to_char£¬src_TO_DATEº¯ÊýµÈ¼ÛÓÚ to_date
select grbh from zj where date_format(zj.jbsj,'%Y%m')='"+ sj + "'
ssql = "select grbh from com.eway.vo.Zjxx zj where date_format(zj.jbsj,'%Y%m')='"+ sj + "'"
SELECT GRBH from FFXX WHERE FFSJ=to_date('"ffsj"','yyyy-mm-dd')";
Õâ¸ö¸ÃÔõô¸ÄÄØ£¿£¿Ð»Ð»ÁË
SQL code
Code highlighting produced by Actip
Ïà¹ØÎÊ´ð£º
ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд
ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......
select convert(varchar(50),cast(convert(numeric(18,2),1275674000000/100000000)as real))+'ÒÚ'
select cast(convert(numeric(18,2),1275674000000/100000000)as real)
ΪʲôÉÏÒ»¸öÓÃvarcharת»»ºó¾ÍÖ»±£ÁôÁËÒ ......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
Winform+MySQL×öÏîÄ¿£¬ÔÚ×¢ÖØÐÔÄܵÄÇé¿öÏ£¬ÎÒ¸ÃÈçºÎÈ¥Íê³ÉÕâÀàÐ͵ÄÏîÄ¿ÄØ£¡
Çë¸÷λ¸øÒÔÌáʾ¡£
ÄãÕâ¸ö·¶Î§Ì«¹ãÁË£¬ÎÒ˵2µãÖØÒªµÄ°É
1.WINFORM³ÌÐòÊǵ¥¶ÀÔËÐеÄCS³ÌÐò£¬ºÍBS²»Í¬£¬BSµÄѹÁ¦Ê¼ÖÕ¶¼ÔÚSERVERÉϵģ¬¶ÔC ......
´ó¼ÒºÃ:
ÎÒÊǸãCµÄ, ÏÖÔÚÏëÓÃC Á¬½ÓMYSQL,µ«ÊÇÔõôҲÁ¬½Ó²»ÁË,ÎҵĴúÂëÈçÏÂ:
#include <stdio.h>
#include "C:\Program Files\MySQL\MySQL Server 5.0\include\mysql.h"
......