ÔÚc#ÖеÄÈ¡µÃsql server´æ´¢¹ý³ÌµÄoutput²ÎÊý
private void Create_Pz(string Sourcename)
{
string OutMsg;
SqlParameter[] sortPara = { new SqlParameter("@ps_IsType", Pzcheck),
new SqlParameter("@pi_SourceId", Pzcode),
new SqlParameter("@ps_ZdrCode", ZdrCode),
new SqlParameter("@OutMsg", SqlDbType.VarChar,500,ParameterDirection.Output,
true,0,0,string.Empty,DataRowVersion.Default,null)
};
if (Convert.ToBoolean(SqlHelper.ExecuteNonQuery(SqlHelper.SQLCONN, CommandType.StoredProcedure, "sCwGenPzWizard", sortPara)))
{
&n
Ïà¹ØÎĵµ£º
SQLÓï¾äÖеÄHaving×Ó¾äÓëwhere×Ó¾äÖ®Çø±ð
---WHERE¾ä×Ó×÷ÓÃÓÚ»ù±¾±í»òÊÔͼ£¬´ÓÖÐÑ¡ÔñÂú×ãÌõ¼þµÄÔª×é¡£HAVING×÷ÓÃÓÚ×飬´ÓÖÐÑ¡ÔñÂú×ãÌõ¼þµÄ×é---
ÔÚËµÇø±ð֮ǰ£¬µÃÏȽéÉÜGROUP BYÕâ¸ö×Ӿ䣬¶øÔÚ˵GROUP×Ó¾äǰ£¬ÓÖµÃÏÈ˵˵“¾ÛºÏº¯Êý”——SQLÓïÑÔÖÐÒ»ÖÖÌØÊâµÄº¯Êý¡£ÀýÈçSUM, COUNT, MAX, AVGµÈ¡£Õâ ......
1=1»òÕß'a'='a'µÈµÈºãµÈʽÊÇT-SQLÖбí´ïtrueµÄ·½·¨¡£ÒòΪÔÚT-SQLÖÐûÓÐtrueÕâÑùµÄ¹Ø¼ü
×Ö»òÖµ£¬ËùÒÔÐèÒª½èÖúÕâЩºãµÈʽÀ´±í´ïtrueµÄ¸ÅÄî¡£
Ïà¶ÔµÄ£¬Í¬Ñù¿ÉÒÔʹÓÃ1<>1»òÕß1=2µÈÀ´±í´ïfalse¡£
ÔÚÓ¦ÓóÌʽµÄ°²È«ÐÔ·½Ã棬ʹÓÃÕâЩʽ×ÓÊÇSQL×¢ÈëµÄ»ù±¾ÔÀí£¬ËùÒÔÔÚÆ´½ÓSQLÓï¾äµÄʱºòÒª¹ýÂ˸÷ÖÖ¸÷ÑùµÄÃô¸Ð×Ö
·û¡£
µ±È» ......
1. ʹÓõÄÊÇ·þÎñÆ÷Éϵ쬲»ÊDZ¾»úµÄOracle£¬°´ÏÂÃæ×ö¾Í¿ÉÒÔÁË£º
ÉèÖû·¾³±äÁ¿:NLS_LANG£¬¾ßÌåÖµÓÃÏÂÃæ²éѯµÄÖµ:
SELECT 'AMERICAN_AMERICA.' || PROPERTY_VALUE
from DATABASE_PROPERTIES
WHERE PROPERTY_NAME = 'NLS_CHARACTERSET';
2. Èç¹ûÊDZ¾»úµÄOracle¾ÍÐèÒªÔÚOracleµÄ°²×°Ä¿Â¼ÏÂÃæ¸ÄÉèÖãº
......
½¨Á¢Ò»¸ö Web Ó¦Ó㬷ÖÒ³ä¯ÀÀ¹¦Äܱز»¿ÉÉÙ¡£Õâ¸öÎÊÌâÊÇÊý¾Ý¿â´¦ÀíÖÐÊ®·Ö³£¼ûµÄÎÊÌâ¡£¾µäµÄÊý¾Ý·ÖÒ³·½·¨ÊÇ:ADO ¼Í¼¼¯·ÖÒ³·¨£¬Ò²¾ÍÊÇÀûÓÃADO×Ô´øµÄ·ÖÒ³¹¦ÄÜ£¨ÀûÓÃÓα꣩À´ÊµÏÖ·ÖÒ³¡£µ«ÕâÖÖ·ÖÒ³·½·¨½öÊÊÓÃÓÚ½ÏСÊý¾ÝÁ¿µÄÇéÐΣ¬ÒòΪÓα걾ÉíÓÐȱµã£ºÓαêÊÇ´æ·ÅÔÚÄÚ´æÖУ¬ºÜ·ÑÄÚ´æ¡£ÓαêÒ»½¨Á¢£¬¾Í½«Ïà¹ØµÄ¼ÇÂ¼Ëø×¡£¬Ö±µ½È¡ÏûÓ ......
create table "user" (
id int identity,
constraint PK_USER prim ......