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

ÇósqlÓï¾ä£¬sqliteÊý¾Ý¿â

µç»°±¾Æ¥Åä²éѯ£¬Ï£ÍûÒ»ÌõÓï¾ä¸ã¶¨
 
¼ÙÉèºÅÂë±¾(numtable)ÈçÏÂ:

ºÅÂë(num)      ÁªÏµÈË (relationname)     
10086          Òƶ¯¿Í·þ
110            ±¨¾¯
8776532        ÕÅÈý¼Ò
13959112113    ÕÅÈýÊÖ»ú


ÏÖÔڵ绰ºôÈëÆ¥Åä¹æÔòΪ£º

Èç¹ûºôÈëºÅÂë>=7λ£¬Æ¥Åäºó7λ£»Èç¹ûºôÈëºÅÂë <7λ£¬È«Æ¥Å䷽ʽ

(»òÕßÉÏÃæ¹æÔò¿ÉÒÔÃèÊöΪ£¬ºôÈëºÅÂëÓëºÅÂë±¾ºÅÂ붼´óÓÚµÈÓÚ7λʱ£¬Æ¥Åäºó7λ£»Èç¹ûÈÎÒâÒ»·½Ð¡ÓÚ7λʱ£¬È«Æ¥Å䷽ʽ)

Àý×Ó˵Ã÷Æ¥ÅäÔ­Ôò
¼ÙÈçºôÈë13959112113 ÏÔʾ¡°ÕÅÈýÊÖ»ú¡±
      13339112113 ÏÔʾ¡°ÕÅÈýÊÖ»ú¡±
      13959112110 ²»ÄÜÆ¥Å䱨¾¯
      13959110086 ²»ÄÜÆ¥ÅäÒƶ¯¿Í·þ
      1008        ÏÔʾ¡°Òƶ¯·þ¡±
      13958776532 ÏÔʾ¡°ÕÅÈý¼Ò¡±
      8776532    ÏÔʾ¡°ÕÅÈý¼Ò¡±   

mark£¬²»´í

SQL code:
select * from numtable where (char_length('ºôÈëºÅÂë')>=7 and char_length(num)>=7 and substring('ºôÈëºÅÂë',char_length('ºôÈëºÅÂë')-6,7)=substring(num,char_length(num)-6,7)) or (char_length('ºôÈëºÅÂë')<7 and num='ºôÈëºÅÂë');


select rel


Ïà¹ØÎÊ´ð£º

SQL×ֶΣ¬ºáÏòÕ¹¿ª

ÇëÎʸ÷룬ÈçºÎ½«SQlÖУ¬Ä³×Ö¶ÎÖеÄÖµºáÏòÕ¹¿ªÄØ£¬
CASE WHEN

¾ßÌåÎÊÌâ¾ßÌå·ÖÎö£¬¿´ÄãÒªÔõôչ¿ª

ÐÕÃû  ¿ÆÄ¿      ³É¼¨
ÕÅÈý  Ó¢Óï    90
ÀîËÄ  Ó¢Óï&nb ......

²»Ã÷°×µÄSQL×¢ÈëÎÊÌâ

ÎÒÊý¾Ý¿âÊÇMSSQLµÄ£¬×òÌìËùÓÐµÄ±í±»×¢ÈëJS½Å±¾´úÂë,Óиö²»Ã÷°×µÄµØ·½À´ÎÊÎÊ´ó¼Ò

ÎÒ·¢ÏÖÓÐЩ±íÎÒ¸ù±¾Ã»Ê¹Óã¬Ò²Ã»ÓÐÈë¿âµÄASPÒ³ÃæºÍÓï¾ä£¬ËüÊÇÔÛ¸ö×¢ÈëµÄÄØ£¿
òËÆselectÓï¾äÊÇ¿ÉÒÔǶÌ׵İɣ¿
¿ÉÄÜÊÇwhere ......

SQL ¶à±í²éѯ²é³öËùÒªµÄÊý¾Ý£¿

ÒÑÖª´ÓB,±íÖÐÕÒ³öID, NAMEÁ½ÏîÓëC±íÏàͬµÄÊý¾Ý£¬ÔÙÒÀ¾ÝB±íÖо­¹ý²éѯ³öÀ´µÄID,CODEÁ½ÏîÊý¾Ý²éѯÓëA±íID,CODEÁ½ÏîÏàͬµÄÊý¾ÝÖжÔÓ¦µÄEMAILÀ´£¬²¢ÁгöÈçÏÂD±íµÄÐÎʽ£¬²»ÖªÎÒÊÇ·ñ±íʾÇå³þ£¿Âé·³°ïÎÒÁÐһϹ«Ê½ºÃÂð£¿Íò· ......

¾ÈÃü°¡£¡£¡JSPÁ¬½ÓSQL2000ÎÊÌ⣡

¸÷λ´óÏÀ¾ÈÃü°¡ £¡£¡
¸Õ×°ÁËSQL2000 sp3
ÏëÓÃJSPÁ¬½ÓÊý¾Ý¿âµ«ÊdzöÏÖÎÊÌâÁË
ÎÒÓõÄÊÇJDK6.0+tomcat5.0+SQL2000 SP3+JDBC sp3
ËüÏÔʾµÄÊÇ
javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver fo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ