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+"')"
Ïà¹ØÎÊ´ð£º
....½Óµ½Ò»¸öС³ÌÐò..¹¤×÷ÔÀ´´ó¸ÅÊÇÕâÑùµÄ...ǰ̨ÊÇWEB·þÎñÆ÷.¼Ü¹¹¾ÍÊÇASP+SQL..ǰ̨ÓÉASPÏò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 µÄÆÀ¹ÀÆÚÒѹý¡£ÏëÎÊһϴó¼ÒÎÒ¸ÃÔõÑùÉý¼¶°¡£¿ Íû´ó¼ÒÏêϸָµ¼Ò»Ï°¡£¬ÏÈлÁË¡¡ Éý¼¶Ê²Ã´???Ö±½ÓÏÂÔظö¿ª·¢°æ×°ÉϾÍOKÁË Éý¼¶Ê²Ã´°¡£¬ ......
±ía(ûÓÐÖ÷¼ü) id name age ----------- ---------- ----------- 1 chenqin& ......
ÎÒÓõÄÊÇmysql5.1£¬Êý¾Ý¿â×Ö·û¼¯Îªutf8 ͨ¹ýdosÃüÁîÐе¼ÈëSQLÎļþ ³ö´í£¬ÎÞ·¨µ¼Èë¡£ ½«SQLÎļþÖеÄÊý¾ÝÈ«²¿Ê¹ÓÃÓ¢ÎÄ ¿ÉÒÔµ¼Èë ÇëÎÊÎÊÌâÔÚÄÄ£¿ ×°¸öÖÐÎÄÈí¼þ¼´¿É. ºÜ¶àÄêÒÔÇ°,Óùý¸öÒ»¸ ......