ÇóÖúsql serverÓï¾ä - MS-SQL Server / Ó¦ÓÃʵÀý
SELECT s.StationID, s.StationName, A.FileBeginTime, A.FileEndTime
from Station s INNER JOIN
Camera c ON s.StationID = c.StationID INNER JOIN
ArchiveFile A ON A.CameraSign = c.CameraSign
WHERE (s.StationName = '¶þÂ¥EMBA')
ORDER BY s.StationID, A.FileBeginTime, A.FileEndTime
ÎÒÔÚÈýÕűíÖÐÓÃÓï¾ä²éѯ³öÁËÕâÑùÒ»¸ö½á¹û£º
StationID StationName FileBeginTime FileEndTime
2 ¶þÂ¥EMBA 2010-3-18 15:51:12 2010-3-18:15:35:26
2 ¶þÂ¥EMBA 2010-3-18 15:54:42 2010-3-18 16:00:00
2 ¶þÂ¥EMBA 2010-4-1 09:27:07 2010-4-1 12:30:00
2 ¶þÂ¥EMBA 2010-4-1 09:27:07 2010-4-1 12:30:00
2 ¶þÂ¥EMBA 2010-4-1 09:27:07 2010-4-1 12:30:00
2 ¶þÂ¥EMBA 2010-4-1 13:00:04 2010-4-1 18:00:04
2 ¶þÂ¥EMBA 2010-4-1 13:00:04 2010-4-1 18:00:05
2 ¶þÂ¥EMBA 2010-4-1 13:00:01 2010-4-1 18:00:54
2 ¶þÂ¥EMBA 2010-4-1 18:00:04 2010-4-1 18:15:00
2 ¶þÂ¥EMBA 2010-4-1 18:00:04 2010-4-1 18:15:00
2 ¶þÂ¥EMBA 2010-4-1 18:00:04 2010-4-1 18:15:01
¡¡¡¡¡¡¡¡¡¡
ÎÒÏëµÃµ½ÕâÑùµÄ½á¹û£º
Station StationName FileBeginTime FileEndTime(ÔÊÐíʱ¼äÉÏÓÐÒ»·ÖÖÓµÄÎó²î)
2 ¶þÂ¥EMBA 2010-4-1 09:27:07 2010-4-1 12:30:00
2 ¶þÂ¥EMBA 2010-4-1 13:00:04 2010-4-1 18:00:04
2 ¶þÂ¥EMBA 2010-4-1 18:00:04 2
Ïà¹ØÎÊ´ð£º
Ö´ÐеÄ˳Ðò£º
1£©Îļþä¯ÀÀ¿ò£¨Ñ¡ÔñÎļþʹÓã©
Ñ¡ÔñºÃÎļþºó
µã»÷Ò»¸öµ¼Èë°´Å¥µÄʱºò £¬°ÑÉÏÃæÉÏ´«¿òÀïµÄcsvÎļþÒÔÒ»¸öIDΪÎļþÃû£¬ÉÏ´«µ½**/**Îļþ¼ÐÏÂ
2£©¶ÁÈ¡Õâ¸öÎļþ¼ÐϵÄcsvµÄÎļþ£¬×ª»»³Ésql
3 ......
ÕâÀïÏëÁ˽âÏ£¬¹ØÓÚSQL ServerÖзÖÒ³ºÍOracleÖзÖÒ³£»
ƽ³£Ð´Ó¦ÓóÌÐòµÄʱºò£¬±ÈÈçÓõÄÓïÑÔÊÇJava£¬ÓиöÁбíÒ³Ã棬ÐèÒª¶ÔÊý¾Ý·ÖÒ³ÏÔʾ£»
ÕâÀïÒª·ÖÒ³ÄѵÀ²»ÐèÒª½èÖúJava£¬¶øÖ±½ÓsqlÄÜÖªµÀ·ÖÒ³Âð£¬ÆðÂëÒ²Òª´«¸öÒ³Âë½ ......
½«Ò»¸ö²éѯÓï¾ä¸³¸øÒ»¸ö±äÁ¿£¬ÈçÏ£º
DECLARE @STR NVARCHAR(MAX)
SET @STR='SELECT * from SALE_PROD'
ÔõôÑù²ÅÄÜÖ´ÐÐËüÄØ£¿
Çë¸ßÊÖ£¬ÈÊÐÖ£¬ÏÀ½ã°ï°ïæ°¡
¶àл£¬¿ÉÒÔÀ²£¬¸ßÊÖ°¡
Ö±½ÓÖ´ÐоÍÐÐÁË
exec ......
Ôõô°ÑMDFÊý¾Ýתµ½MySQL£¿
ÖÁÉٵø½¼Óµ½sqlserverÉÏ
¾ßÌåÔõôŪ°¡ ÎҵıÏÒµÉè¼ÆµÄÊý¾Ý¿âÊÇ´ÓÍøÉÏdownÏÂÀ´µÄ£¿£¿
Ä㻹²»ÈçÖ±½ÓÓÃsqlserverÄØ
º¯Êý¡¢´æ´¢¹ý³Ì¶¼µÃ¸ÄÁË¡£
sqlserverûÔõôÓùý¡£Ò²Ã»Óа²× ......