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

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 codeselect*from[biao]orderbycast(split(mytxt,'|')(0)byint)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 ʱ¼äÎÊÌâ

sql table±íÓиöÎı¾ÀàÐ͵Äa×ֶΣ¬´æ´¢µÄÄÚÈÝÈ«²¿ÊÇÊý×Ö£¬ÀýÈç2009001£¬2008578ÕâÑùµÄ¸ñʽ£»b×Ö¶ÎÎı¾ÀàÐÍ£¬´æµÄÒ²ÊÇÊý×ÖÀýÈç 001£¬123
aspÀïÃæ strday=100£¬strb=001

ÎÒÏë¶Á³ö£¬´Óa×ֶεÄÊý×Ö°´´óµ½Ð¡µÄË ......

Á½¸öµ¼¹¹sql serverÊý¾Ý¿â,Êý¾Ýµ¼Èëµ¼³öÎÊÌâ

ÏÖÔÚÓÐÁ½¸öÒì¹¹µÄsql serverÊý¾Ý¿â,ÎÒÏ뽫µÚÒ»¸ö±íÖеÄÊý¾Ýµ¼Èëµ½µÚ¶þ¸ö±íÖÐ,×Ô¼ºÖ¸¶¨µ¼ÈëÊý¾ÝµÄ×Ö¶Î,ÈçºÎµ¼ÈëÊý¾ÝÄØ,´ó¼ÒÌÖÂÛÒ»ÏÂ?
dts¹¤¾ß

µ¼Èëµ¼³ö¹¤¾ß.

DD

¹þ¹þ£¬¹À¼ÆÕâλÊǵØQIOU¶¼Êܲ»Á˵Ä

Ö±½ÓÐ ......

SQL serverÊý¾Ý¼¯³ö´íÇóÖú

Á½ÖÖ´íÎó£º
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:    ......

sql ÎÊÌâ

PBÖпª·¢µÄ¡£

DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)

string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+&q ......

sql²éѯÒÉÎÊ

±íÖа´datadate,tradeidΪÖ÷¼ü£¬Ò²¾ÍÊÇ˵tradeid»áÖظ´³öÏÖÔÚ²»Í¬ÌìÖУ¬Í¬Ò»ÌìµÄtradeidÊDz»Í¬µÄ¡£ÏÖÔÚÎÒÏ£ÍûÈ¡Ò»¶Îʱ¼ä·¶Î§ÄÚ²»Öظ´µÄtradeid£¬ÇÒֻҪÿ¸ötradeidµÄ×îºóÒ»´Î³öÏÖµÄÄÇÌõ¡£sqlÓï¾ä¸ÃÔõôд

£º ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ