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

SQLÈÕÆÚת»»~

ÏÂÃæµÄÈÕÆÚÎÒÒªÓñäÁ¿±íʾ
µ«ÎÒ½ÓÊÕµÄÈÕÆÚµÄ¸ñʽÓëÏÂÃæ²»Í¬
  ÎÒ½ÓÊÕµÄÈç 2009-10-10
ÎÒÓ¦¸ÃÔõô±äÄØ£¿
ÿ´Î¶¼°Ñ date1  ºÍdate2ÓÃString ÕâÑùÊDz»ÊDz»ºÃ
SQL code:

between '" + date1 + "' nad '" + date2 + "'


SQL code:

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 ÊÇ·ñʶ±ð

ÒýÓÃ
'2007Äê10ÔÂ25ÈÕ'

²»Ö§³ÖµÄÈÕÆÚ¸ñʽ.

²»Ö§³ÖµÄÈÕÆÚ¸ñʽ£¿
  SQL²»Ö§³Ö£¿

outdate ÊÇʲôÀàÐ͵Ä

¼ÈÈ»ÊÇString ÀàÐÍ

String ÀàÐÍ
¿ÉÒÔÓÃbetween and Âð£¿


Ò²¿ÉÒÔÓüÆËãÁУ¬²»¹ýÈç¹ûÖмäÓзǷ


Ïà¹ØÎÊ´ð£º

ÇóSQL£¿

´ó¼ÒºÃ£¬ÇëÎÊÔÚ±íMÖÐÓÐ×ֶΣºa b c d e 
ÎÒÏë²é³öÆäÖÐÂú×ãÏÂÃæÈÎÒâÒ»ÏîµÄÊý¾Ý£¬1.×Ö¶Îa µÄÖµ²»ÊÇ ¡®Êé»ò±Ê»ò±¾¡¯ÖÐÈÎÒ»£¬2.aΪÊéµÄʱºò×Ö¶Îb,cÊÇ¿Õ;3.µ±aֵΪ±ÊµÄʱºòdÊÇ¿Õ;4.µ±aΪ±¾µÄʱºòb,d,e¶¼ÊÇ¿Õ;5.È ......

sql server ´æ´¢¹ý³ÌÑ­»·¸³ÖµµÄÎÊÌâ

СµÜÊǸöÐÂÊÖ ÏÖÔÚÓиöÎÊÌâÒ»Ö±²»Äܽâ¾ö
ÀýÈç
procedure produce_proc
    @p001 nvarchar(8000),
    @p002 nvarchar(8000),
    @p003 nvarchar(8000),
  & ......

ÇósqlÓï¾ä

pln_id memo
  1    ÎÒÊÇ
  1    ÄãºÃ
  2    ÄãÊÇ
  2    ÎÒºÃ

½á¹û

  pln_id memo 
    ......

sqlÓï¾ä Çó½Ì

±íA ÄÚ ÓÐid ºÍ name

Ï£Íû¸ù¾ÝA±íµÄname½øÐвéѯ,µ«ÊÇname¿ÉÄÜ»áÖØ¸´,ËùÒÔÐèÒªÅжÏ.

ÓÐÒ»¸ösqlº¯Êý f ,ËüµÄ²ÎÊýÊÇA±íµÄid×Ö¶Î,·µ»ØÒ»¸öÖµ.

ÎÒÏ£Íû×îºóµÃµ½Ò»¸ö±í,°üº¬id name ºÍ[×îºóº¯Êýf·µ»Ø ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ