ÔÚSqlServerÖÐÓÃ×Ô¶¨Ò庯Êý·µ»Ø¶¯Ì¬±íÄÚÈÝ
˵Ã÷£ºÔÚSupplyPlan±íÖУ¬´æ´¢×Åÿһ¸öRequestQty¼°Æä¶ÔÓ¦µÄ¿ªÊ¼ÖÕÖ¹ÈÕÆڶΣ»ÒòΪÎÒÔÚÒÔºó´¦ÀíÖÐÒªÅжϵ±Ç°ÌìÊôÓÚÄÄÒ»ÌõRequestQtyµÄÈÕÆÚÇø¼ä²¢½øÐд¦Àí£¬ËùÒÔºǫ́Êý¾Ý¿âÖ»ÄÜÉè¼Æ³ÉÕâÖÖ´æ´¢ÐÎʽ£»µ«ÊÇÔÚÒ³ÃæµÄÏÔʾʱºò£¬ÐèÒª¶¯Ì¬µÄ¸ù¾Ýÿһ¸öSupplyPlanNoÉú³É¶ÔÓ¦µÄ¶àÌõÈÕÆÚÇø¶Î¼°ÆäÊýÁ¿ÏÔʾ£¬ËùÒÔ²ÉÓÃ×Ô¶¨Ò庯ÊýÐÎʽ·µ»Ø´¦ÀíÒÔºóµÄ¶¯Ì¬¼Ç¼¼¯£¡·µ»ØµÄ×Ö¶Î@AllRequestQtyΪ"1|13|5|8"ÐÎʽ£¬ÔÚaspÖоͿÉÒÔ²ÉÓÃsplitº¯Êý·Ö×é´Ó¶ø¶¯Ì¬ÏÔʾ×ֶΡ£
/*
** add by wls For: convert many lines of SP datas to one char group by vehicle,part
*/
CREATE FUNCTION xzc.fn_getContent_SupplyPlan
(@s_p_no int = NULL,
@viewFlag varchar(1) = ''
)
RETURNS @fn_getContent_SupplyPlan TABLE
(
ID varchar(8000),
SupplyPlanNo int,
Vehicle varchar(25),
Sort varchar(20),
Part varchar(25),
RequestQty varchar(8000),
Remark varchar(255)
)
AS
BEGIN
DECLARE @sVehicle varchar(25), @sSort varchar(20)
DECLARE @sPart varchar(25), @iVehicle varchar(25)
DECLARE @iPart varchar(25), @sRemark varchar(255)
DECLARE @RequestQty int , @theID int
DECLARE @AllRequestQty varchar(8000), @allID varchar(8000)
select @AllRequestQty = ''
select @allID = ''
/*Outer CURSOR*/
DECLARE getVehiclePartSP CURSOR SCROLL FOR
select distinct Vehicle, Sort, Part from SupplyPlan
where SupplyPlanNo = @s_p_no and ViewFlag = @viewFlag
/* --Order by ID desc
select Vehicle, Sort, Part from (select min(ID) as ID, Vehicle, Sort, Part from SupplyPlan
Ïà¹ØÎĵµ£º
»°Ëµ°³ÊǸöÀÁÈË¡£¡£¡£¡£
×°ÍêSQLSERVER2005 ÒòΪ¿ª»úºÜÂý ËùÒÔÄؾͰѿª»ú·þÎñ¸ã³ÉÊÖ¶¯µÄÁË
ÕâÑù¿ª»ú¿ìÁ˺ܶà
¿ÉÊÇÎÊÌâÒ²À´ÁË
ÿ´ÎÒªÓÃSqlServerµÄʱºòÒªÒ»¸öÒ»¸ö·þÎñÈ¥¿ªÆðÀ´ ¡£¡£¡£¡£
Âé·³°¡¡£¡£¡£¡£¡£
²»±È2000Óиö ¿ª¹ØµÄ³ÌÐò
ËùÒÔÉÏÍøÕÒÁËϽ̳Ì
×Ô¼ºÐ´¸öÅú´¦Àí ×Ô¶¯Æô¶¯·þÎñ
ÍÛ¹þ¹þ
ͻȻ¾õµÃ Ö»ÒªÓÐÍ ......
SERVER Í£Ö¹,ÎÞ·¨Æô¶¯,¹ýÆÚÁË (ÆÀ¹À°æ2000)(2008-04-25 22:31:17)±êÇ©£ºsql server ÎÞ·¨Æô¶¯ ¹ýÆÚ ½â¾ö·½·¨ it
µ± SQL Server 2000 ÆÀ¹À°æµÄ 120 ÌìÆÀ¹ÀÆÚ¹ýÆÚºó£¬SQL Server ½«ÎÞ·¨Æô¶¯¡£
ÔÚ Windows ʼþ²é¿´Æ÷Ó¦ÓóÌÐòÈÕÖ¾ÖУ¬Äú¿ÉÄܻῴµ½ÏÂÃæµÄ´íÎó£º
SQL Server evaluation period has expired ......
¡¡¡¡1.¾ø¶ÔÖµ
¡¡¡¡S:select abs(-1) value
¡¡¡¡O:select abs(-1) value from dual
¡¡¡¡2.È¡Õû(´ó)
¡¡¡¡S:select ceiling(-1.001) value
¡¡¡¡O:select ceil(-1.001) value from dual
¡¡¡¡3.È¡Õû£¨Ð¡£©
¡¡¡¡S:select floor(-1.001) value
¡¡¡¡O:select floor(-1.001) value from dual
¡¡¡¡4.È¡Õû£¨½ØÈ¡£©
¡¡¡¡ ......
ÎÒ×°µÄÊÇXpϵͳ£¬µ±ÎÒ×°Sql Server2000Êý¾Ý¿âºó£¬ÓÃJava³ÌÐòÀ´½øÐÐÊý¾Ý¿âÁ¬½Óʱ³ö´íÁË£¬·¢ÏÖÊÇ1433¶Ë¿ÚûÓдò¿ª£¬ÔÚÍøÉÏÕÒÁËЩ½â¾ö°ì·¨£¬·½·¨ËµµÄ²»ÊǺÜÇå³þ£¬»¹ÓеãÂÞàÂÁË¡£ÎÒ½â¾öºó·¢ÏÖ°ì·¨ÊÇ£ºÊ×ÏÈÊDz鿴ÄãµÄ°æ±¾£¬¿ÉÒÔÓÃselect @@versionÀ´²é¿´¡£×°ÍêSql Server 2000 1433¶Ë¿ÚÓÐÊÇûÓдò¿ª£¬¿ÉÒÔÓÃnet -an -p tcp ......
ÉÏ´Î×öÁ˸öÏîÄ¿£¬Éæ¼°µ½Êý¾Ý¿âµÄ»¹ÔºÍ»Ö¸´£¬µ½ÍøÉÏÕÒÁËһϣ¬ÊÇÀûÓÃSQLDMOʵÏֵģ¬Ö»ÒªÌí¼ÓSQLDMOÒýÓþͺÃÁË£¬È»ºóÀûÓÃϱߵÄÀàµÄ·½·¨¾Í¿ÉÒÔʵÏÖÁË¡£
ÎÒ°ÑÔ×÷ÕßµÄÀàÀ©³äÁËһϣ¬¿ÉÒÔ×Ô¶¯Ê¶±ðweb.configÀï µÄÊý¾Ý¿âÁ¬½Ó×Ö·û´®£¬¿ÉÒÔͨ¹ý±äÁ¿ÉèÖû¹Ô»Ö¸´µÄÐÅÏ¢¡£
ÐèҪעÒâµÄʱ»¹Ô£¬»¹ÔµÄʱºòÎÊÌ ......