insert into hwouttb3 select * from hwouttb where outdate between '2007Äê10ÔÂ25ÈÕ' and '2007Äê11ÔÂ25ÈÕ'and gysh like '%Éú產%' or gysh like '%¹¤³Ì%' or gysh like '%倉庫%' union all select * from hwouttb2 where outdate between '2007Äê10ÔÂ25ÈÕ' and '2007Äê11ÔÂ25ÈÕ'and gysh like '%Éú產%' or gysh like '%¹¤³Ì%' or gysh like '%倉庫%'
'2007Äê10ÔÂ25ÈÕ'
²»Ö§³ÖµÄÈÕÆÚ¸ñʽ. ½«ÈÕÆÚת»»Ò»Ï¸ñʽconvert(varchar(10), outdate ,110) Â¥Ö÷µÄÒâ˼ ÎÒ²»Ì«Çå³þ¡£µ«ÊÇÈç¹û ÊÇdatetimeÀàÐ굀 ¶¼ÊÇÄÜÓÃbetween and µÄ¡£ Â¥Ö÷ΨһÐèҪעÒâµÄÊÇ ½ÓÊÕµ½µÄÈÕÆÚ¸ñʽsql server ÊÇ·ñʶ±ð ²»Ö§³ÖµÄÈÕÆÚ¸ñʽ£¿ SQL²»Ö§³Ö£¿ outdate ÊÇʲôÀàÐ굀 ¼ÈÈ»ÊÇString ÀàÐÍ String ÀàÐÍ ¿ÉÒÔÓÃbetween and Â𣿠Ҳ¿ÉÒÔÓüÆËãÁУ¬²»¹ýÈç¹ûÖмäÓзǷ