¾¡Á¿±ÜÃâÔÚSQLÓï¾äÖÐʹÓÃLIKE
----start
Ç°Ã棬ÎÒÃǽéÉÜÁË ¾¡Á¿±ÜÃâÔÚSQLÓï¾äµÄWHERE×Ó¾äÖÐʹÓú¯Êý£¬ÒòΪÕâÑù×ö»áʹ¸Ã×Ö¶ÎÉϵÄË÷ÒýʧЧ£¬Ó°ÏìSQLÓï¾äµÄÐÔÄÜ¡£»ùÓÚͬÑùµÄµÀÀí£¬ÎÒÃÇÒ²Ó¦¸Ã±ÜÃâʹÓÃLIKE¡£¿¼ÂÇÏÂÃæµÄÇé¿ö£º
CREATE TABLE USER
(
NAME VARCHAR(20) NOT NULL,---ÐÕÃû
MYNUMBER VARCHAR(18)---Éí·ÝÖ¤ºÅÂë
);
ÏÖÔÚÒªÇóÄã°ÑÉí·ÝÖ¤ºÅÂ뿪ͷÊÇ2102£¨´óÁ¬ÈË£©²é³öÀ´£¬Ôõô°ì£¿ÎÒÃǺÜ×ÔÈ»µÄ»áÕâôд£º
SELECT * from USER WHERE MYNUMBER LIKE '2102%';
ÉÏÊöÓï¾äÍêÈ«ÕýÈ·£¬Ö»¿ÉϧÐÔÄܲ»ºÃ£¬ÄÇôµ½µ×ÈçºÎ´¦ÀíÄØ£¿´ð°¸Êǽ«Ëüת»¯Îª·¶Î§É¨Ã裬ÈçÏ£º
SELECT * from USER WHERE MYNUMBER>='210200000000000000' AND MYNUMBER<'210300000000000000';
---¸ü¶à²Î¼û£ºDB2 SQL ¾«Òª
----ÉùÃ÷£º×ªÔØÇë×¢Ã÷³ö´¦¡£
----last update at 2009.9.24
----write by wave at 2009.9.24
----end
Ïà¹ØÎĵµ£º
ºÍjava.lang.IllegalArgumentException: org.hibernate.QueryException: JPA-style positional param was not an integral ordinalÕ½¶·ÁË°ëÌ죬º¹°¡£¡
ʹÓÃjpa + strut+ hibernate ¾Í±¨org.hibernate.QueryException: JPA-style positional param was not an integral ordinal
Ò»°ã°ÑhqlÓï¾äдÔÚÒ»ÐУ¬»áºÜ³¤£¬ÔÚideÖÐÐèÒ ......
DECLARE
TYPE list IS TABLE OF t_stu.project%TYPE INDEX BY BINARY_INTEGER;
project_list list;
v_pro_num NUMBER;
sql_str VARCHAR(255);
t_stu
SID SUBJECT SCORE
1 Êýѧ &n ......
sql ºÜ¾Ã²»Óã¬Í»È»¼äÒªÇó×ö±¨±í¡£ËùÒÔÓÖ¿ÉÒÔ²¹Ò»²¹sql֪ʶÁË¡£µ«¾³£»áÓöµ½Ò»Ð©ÈõÖÇÎÊÌâ.
дÁËÒ»Ìõsql£ºselect to_date('2009-09-24 12:20:0') Äܽ«¸Ä×Ö·û´®×ª»»ÎªÈÕÆÚ
µ«ÁíÍâÒ»Ìõsqlȴת»»²»ÁË...¸Ð¾õºÜÆæ¹Ö.ÓÚÊǺõ¡£ÔÙ×Ðϸ¿´Ò»±é ·¢ÏÖ
¸øÒ»¸öÈÕÆÚ×Ö¶ÎÉèÖñðÃûʱÉèÖóÉÁËsib.fbizDate as dateÎÒ×Ô¼º¶¼ÎÞÓïÁË¡£Ôõô»áÉè ......
ÎÒÃÇÔÚÊý¾Ý¿âÖÐʹÓñíµÄʱºò,¾³£»áÓöµ½Á½ÖÖʹÓñíµÄ·½·¨,·Ö±ð¾ÍÊÇʹÓÃÁÙʱ±í¼°±í±äÁ¿¡£ÔÚʵ¼ÊʹÓõÄʱºò£¬ÎÒÃÇÈçºÎÁé»îµÄÔÚ´æ´¢¹ý³ÌÖÐÔËÓÃËüÃÇ£¬ËäÈ»ËüÃÇʵÏֵŦÄÜ»ù±¾ÉÏÊÇÒ»ÑùµÄ£¬¿ÉÈçºÎÔÚÒ»¸ö´æ´¢¹ý³ÌÖÐÓÐʱºòȥʹÓÃÁÙʱ±í¶ø²»Ê¹Óñí±äÁ¿£¬ÓÐʱºòȥʹÓñí±äÁ¿¶ø²»Ê¹ÓÃÁÙʱ±íÄØ?
¡¡¡¡ÁÙʱ±í
¡¡¡¡ÁÙʱ±íÓëÓÀ¾Ã± ......