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

sql ÎÊÌâ

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

string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+"') and (EndTime < '"+endTime+"')"

ÕâÑùдÓÐÎÊÌâÂð£¬StartTime, EndTimeÔÚÊý¾Ý¿âÖÐÊÇdatetimeÀàÐÍ


ÓÃmessagebox('',sql)³öÀ´¿´¿´¾ÍÖªµÀÁË°¡

µ÷ÊÔÏ¿´¿´¾ÍÐС£whereÇ°¼Ó¸ö¿Õ¸ñ£¬where×Ö¾äÖпոñÈ¥µô£¬ ʱ¼äÓà '2009-1-1' £¬×¢Ò⣬'£¬'ÐèҪתÒå¡£

×îºÃµÄ辦·¨ÊÇÓÃmessagebox³ö來¿´Ò»Ï£¬SQL語¾äÓÐ沒問題¡£

ÓÃstringÊÔÊÔ
string startTime,endTime
startTime=em_1.Text
endTime=em_2.Text

string sql
sql = dw_1.GetSQLSelect()+" Where (StartTime> '"+startTime+"') and (EndTime < '"+endTime+"')"



Èç¹ûÄãÊÇÓÃÀ´¸ù¾Ýʱ¼ä²éѯ¼Ç¼µÄ»°
ls_select = "(convert(char(10),em_work.work_date,120) >= '" +ls_begin+ "') and (convert(char(10),em_work.work_date,120) <= '" + ls_end + "')"

ÒýÓÃ
ÓÃstringÊÔÊÔ
string startTime,endTime
startTime=em_1.Text
endTime=em_2.Text

string sql
sql = dw_1.GetSQLSelect()+" Where (StartTime> '"+startTime+"') and (EndTime < '"+endTime+"')"


Ïà¹ØÎÊ´ð£º

ÃÅÍ⺺ÇóÖú...¹ØÓÚºǫ́+SQL+ASP

....½Óµ½Ò»¸öС³ÌÐò..¹¤×÷Ô­À´´ó¸ÅÊÇÕâÑùµÄ...ǰ̨ÊÇWEB·þÎñÆ÷.¼Ü¹¹¾ÍÊÇASP+SQL..ǰ̨ÓÉASPÏòSQLÌí¼Ó·þÎñÀà±ð(±íµ¥).È»ºóÓÖºǫ́³ÌÐò¶ÁÈ¡±íµ¥..Ҫʵʱ¶ÁÈ¡..È»ºóÏÔʾÔÚ·þÎñÆ÷ÉÏÃæ..´ÓÀíÂÛÉÏÃæÄÜÐÐͨ²»?Èç¹û¿ÉÒÔ..ºǫ́ ......

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 server 2005ÔõôÉý¼¶£¿

ÒòΪѧϰµÄÐèÒª£¬ÓÃÁËÒ»¶Îʱ¼äµÄsql server 2005,ºÃÏñÊÇ˵sql server µÄÆÀ¹ÀÆÚÒѹý¡£ÏëÎÊһϴó¼ÒÎÒ¸ÃÔõÑùÉý¼¶°¡£¿
Íû´ó¼ÒÏêϸָµ¼Ò»Ï°¡£¬ÏÈлÁË¡­¡­
Éý¼¶Ê²Ã´???Ö±½ÓÏÂÔظö¿ª·¢°æ×°ÉϾÍOKÁË

Éý¼¶Ê²Ã´°¡£¬ ......

ÀÏÎÊÌâ ͨ¹ýSQLÓï¾äÈçºÎɾ³ý±íÖеÄÖظ´¼Ç¼£¿

±ía(ûÓÐÖ÷¼ü)
id          name      age       
----------- ---------- -----------
1          chenqin& ......

sqlÎļþ£¨Êý¾Ýº¬ÖÐÎÄ£©DOSÃüÁî´°¿ÚÎÞ·¨µ¼ÈëÎÊÌâ

ÎÒÓõÄÊÇmysql5.1£¬Êý¾Ý¿â×Ö·û¼¯Îªutf8

ͨ¹ýdosÃüÁîÐе¼ÈëSQLÎļþ ³ö´í£¬ÎÞ·¨µ¼Èë¡£

½«SQLÎļþÖеÄÊý¾ÝÈ«²¿Ê¹ÓÃÓ¢ÎÄ ¿ÉÒÔµ¼Èë

ÇëÎÊÎÊÌâÔÚÄÄ£¿
×°¸öÖÐÎÄÈí¼þ¼´¿É.

ºÜ¶àÄêÒÔÇ°,Óùý¸öÒ»¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ