ÇóÒ»SQLÓï¾ä - MS-SQL Server / Ó¦ÓÃʵÀý
´ÓÒ³ÃæÉϵõ½ÁËÒ»¸öÈÕÆÚsendTime,±ÈÈç½ñÌìÊÇ6ÔÂ1ºÅ£¬sendTime¸ÕºÃÒ²ÊÇ6ÔÂ1ºÅ£¬ÔòÄܲé³öÊý¾Ý¡£ÇóÓï¾ä
SQL code:
select * from aaa where sendTime=?????
-- Õý½â!
¶î£¬À´ÍíÁË¡£¡£¡£
SQL code:
--try
select * from aaa where right(convert(nvarchar(10),sendTime,120),5)='06-01'
SQL code:
select * from aaa where convert(nvarchar(10),sendTime,120)='2010-06-01'
,. .
¶àлʥÉÏ¡£
ÓÖ¿´µ½Ð¡FÁË··
Ïà¹ØÎÊ´ð£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£©
tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname
½á¹û£º
µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......
½«Ò»¸ö²éѯÓï¾ä¸³¸øÒ»¸ö±äÁ¿£¬ÈçÏ£º
DECLARE @STR NVARCHAR(MAX)
SET @STR='SELECT * from SALE_PROD'
ÔõôÑù²ÅÄÜÖ´ÐÐËüÄØ£¿
Çë¸ßÊÖ£¬ÈÊÐÖ£¬ÏÀ½ã°ï°ïæ°¡
¶àл£¬¿ÉÒÔÀ²£¬¸ßÊÖ°¡
Ö±½ÓÖ´ÐоÍÐÐÁË
exec ......
ÎÒÓÐÒ»¸ö×Ö¶ÎÊÇ varchar(1) ÀàÐÍ£¬¶þ½øÖƱíʾҲ¾ÍÊÇ8λµÄ ¡®0000 0000¡¯
±ÈÈçÕâ¸öʱºòÎÒÐèҪɸѡ³öÕâ¸ö×Ö¶ÎΪËùÓÐµÄ ¡®0000 0100¡¯µÄÐУ¬ÇëÎÊSQLÄÜʵÏÖÕâÑùµÄ¡°Î»¡±µÄɸѡÂð£¿
лл~~~
ÓÐλ²Ù×ݺ¯ÊýÂ𣿲»ÐоÍ× ......