sql ÎÊÌâ
PBÖпª·¢µÄ¡£
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ÀàÐÍ
×îºÃÓòÎÊý»¯µÄÐÎʽд.
PB²»¶®£¡Â¥Ï¼ÌÐø
ÄܾٸöÀý×ÓÂð£¬Ð»Ð»
C# code:
string sql = xx + " where startTime > @startTime and EndTime < @endTime";
SqlCommand cmd = new SqlCommand(sql,con);
cmd.Parameters.Add("@startTime",SqlDbType.DateTime);
cmd.Parameters.Add("@endTime",SqlDbType.DateTime);
cmd.Parameters["startTime"].Value = xx;
cmd.Parameters["endTime"].Value = xx;
cmd.ExecuteNonQuery();
PBÀïÃæ¿ÉÒÔÕâôÓÃô£¿/СÁº´ó´ó
DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)
--MSSQL
string sql
sql = dw_1.GetSQLSelect()+" Where (StartTime> '"+em_1.Text+"') and (EndTime < '"+em_2.Text+"')"
SQL code
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.
Ïà¹ØÎÊ´ð£º
with adod_dict do
begin
close;
commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......
ÎÒEXCELÖÐÒ»¸öµ¥Ôª¸ñµÄÊý¾ÝÈç "2009-01","8949-232"
½«Õâ¸öÊý¾ÝÕ³Ìùµ½PL/SQLÖеÄÒ»¸ö±íÖкó,Êý¾ÝÈ·ÊdzÉΪÁË 2009-01,8949-232 ,°ÑËùÓеÄ""¶¼Ã»ÁË,
ÈçºÎŪÄØ?Çë´ó¼ÒÊÔ ......
3.ѧÉú±í£¬Ñ¡¿Î±í¡£¿Î³Ì±í¡£Èý¸ö±í£¬ÕÒ³öÑ¡ËùÓпγ̵ÄѧÉú¡£
4.ѧÉú±í£¬Ñ¡¿Î±í¡£¿Î³Ì±í¡£Èý¸ö±í£¬ÕÒ³öÑ¡ÁË5ÃÅÒÔÉϿγ̵ÄѧÉú¡£
5.ѧÉú±í£¬³É¼¨±í¡£¿Î³Ì±í¡£Èý¸ö±í£¬ÕÒ³öËùÓпγ̵ķÖÊýÔÚ80·ÖÒÔÉϵÄѧÉú¡£
......
×îÏÈϵͳװÓÐsql2000£¬ÀïÃæÒ²ÔËÐÐÁ˺öàÍøÕ¾Êý¾Ý¿âÓ¦ÓóÌÐò£¬ÏÖÔÚÓиöÍøÕ¾ÐèÒªÅÜÔÚsql server2005ƽ̨ÉÏ£¬ÇëÎÊÎÒ¿ÉÒÔÖ±½ÓÔÚÕâ¸ö°²×°ÓÐsql server2000µÄ·þÎñÆ÷ÉÏÖ±½Ó°²×°sql server2005Â𣿻᲻»áÁ½¸ö°æ±¾µÄ·¢Éú¼æÈÝÐ ......