sqlÓï¾äÖÐÄܲ»ÄÜÕâÑùÅÅÐò£¿
Êý¾Ý±í¡¾biao¡¿£¬
×ֶΣºid¡¢myname¡¢mytxt
mytxtÄÚÈݸñʽÐÎÈ磺n|abcd¡££¨ÀýÈ磺1|ÁõµÂ»ª£¬2|Èδﻪ£¬3|αÌϼ£¬4|Âõ¿Ë@½Ü¿ËÑ·£©
ÎÒÏÖÔÚÏ£Íû¶Á¼Ç¼³öÀ´ºó£¬°´ÕÕ[mytxt]×Ö¶ÎÀïµÄÊúÏߣ¨|£©Ç°ÃæµÄÄǸöÊý×ÖÅÅÐò£¬¿ÉÒÔʵÏÖÂð£¿
sql="select * from [biao] order by split(mytxt,'|') desc"
ÕâÑùдû°ì·¨ÅÅÐò£¬¶øÇһᵼÖÂËÀÑ»·¡£
ÇëÎÊÈçºÎʵÏÖÄØ£¿
sql="select * from [biao] order by left(mytxt,1) desc"
ÊÔÒ»ÏÂ
sql="select * from [biao] order by split(mytxt,'|')(0) desc"
ÊÔÊÔÕâÑùÐв»ÐÐ
ÍêÉÆһϣº
SQL code:
select * from [biao] order by cast(split(mytxt,'|')(0) by int) desc
×Ö·ûÅÅÐò'10'»áÅÅÔÚ'2'ºóÃæ
д´íÁË
SQL code:
SQL codeselect*from[biao]orderbycast(split(mytxt,'|')(0) as int)desc
°ï¶¥ÏÂ
ÎÒÊÇÂ¥Ö÷£¬»·¾³ÊÇ£º
asp+access
cast ²»ÄÜÓá£
SQL code
Code highlighting p
Ïà¹ØÎÊ´ð£º
sql table±íÓиöÎı¾ÀàÐ͵Äa×ֶΣ¬´æ´¢µÄÄÚÈÝÈ«²¿ÊÇÊý×Ö£¬ÀýÈç2009001£¬2008578ÕâÑùµÄ¸ñʽ£»b×Ö¶ÎÎı¾ÀàÐÍ£¬´æµÄÒ²ÊÇÊý×ÖÀýÈç 001£¬123
aspÀïÃæ strday=100£¬strb=001
ÎÒÏë¶Á³ö£¬´Óa×ֶεÄÊý×Ö°´´óµ½Ð¡µÄË ......
ÏÖÔÚÓÐÁ½¸öÒì¹¹µÄsql serverÊý¾Ý¿â,ÎÒÏ뽫µÚÒ»¸ö±íÖеÄÊý¾Ýµ¼Èëµ½µÚ¶þ¸ö±íÖÐ,×Ô¼ºÖ¸¶¨µ¼ÈëÊý¾ÝµÄ×Ö¶Î,ÈçºÎµ¼ÈëÊý¾ÝÄØ,´ó¼ÒÌÖÂÛÒ»ÏÂ?
dts¹¤¾ß
µ¼Èëµ¼³ö¹¤¾ß.
DD
¹þ¹þ£¬¹À¼ÆÕâλÊǵØQIOU¶¼Êܲ»Á˵Ä
Ö±½ÓÐ ......
Á½ÖÖ´íÎó£º
1.Èç¹ûÎÒÕâÑùÉêÃ÷£ºResultSet rs;´íÎóÌáʾÈçÏ£º
An error occurred at line: 51 in the jsp file: /index.jsp
The local variable rs may not have been initialized
48: ......
PBÖпª·¢µÄ¡£
DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)
string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+&q ......
±íÖа´datadate,tradeidΪÖ÷¼ü£¬Ò²¾ÍÊÇ˵tradeid»áÖظ´³öÏÖÔÚ²»Í¬ÌìÖУ¬Í¬Ò»ÌìµÄtradeidÊDz»Í¬µÄ¡£ÏÖÔÚÎÒÏ£ÍûÈ¡Ò»¶Îʱ¼ä·¶Î§ÄÚ²»Öظ´µÄtradeid£¬ÇÒֻҪÿ¸ötradeidµÄ×îºóÒ»´Î³öÏÖµÄÄÇÌõ¡£sqlÓï¾ä¸ÃÔõôд
£º ......