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

Free BarCode128 SQL±àÂë

CREATE   FUNCTION StringToBarcode
 (@Value Varchar(50)   )
RETURNS NVarchar(100)
AS
BEGIN
 Declare @charCount int
 Declare  @charPos int, @minCharPos int
 declare @currentChar int, @checksum int
   Declare @isTableB int,@isValid int
   Declare @returnValue NVarchar(100)
 
 set @isTableB=1
 set @isValid=1
 set @returnValue=''
 if Len(@Value)>0
 BEGIN
  set @charCount=1
  while @charCount<=Len(@Value)
  BEGIN
   SET @currentChar = ASCII(Substring(@value,@charCount, 1))
   IF NOT (@currentChar>=32 AND @currentChar<=126)
   BEGIN
    SET @isValid=0
    break
   END
   SET @charCount=@charCount+1
  END
  if @isValid=1
  BEGIN
   SET @charPos=1
   WHILE @charPos<=LEN(@value)
   BEGIN
    if @isTableB=1
    BEGIN
     --See if interesting to switch to table C
               --yes for 4 digits at start or end, else if 6 digits
     IF @charPos=1 or @charPos+3=Len(@Value)
      SET @minCharPos=4
     ELSE
      SET @minCharPos=6
     SET @minCharPos=dbo.IsNumber(@Value,@charPos, @minCharPos)
     if @minCharPos<0
     BEGIN
      --Choice table C
      IF @charPos=1
       --Starting with table C
       SET @returnValue=Nchar(205)
     &nbs


Ïà¹ØÎĵµ£º

SQL¾ÛºÏº¯


SQL¾ÛºÏº¯
±êÇ©£ºsql¾ÛºÏº¯Êý ÔÓ̸ 
 
¾ÛºÏº¯Êý£º
1.AVG ·µ»Ø×éÖÐµÄÆ½¾ùÖµ£¬¿ÕÖµ½«±»ºöÂÔ¡£
ÀýÈ磺use  northwind   // ²Ù×÷northwindÊý¾Ý¿â
   Go
   Select  avg (unitprice)   //´Ó±íÖÐÑ¡ÔñÇóunitpriceµÄƽ¾ùÖµ
    & ......

sql º¯Êý×ܽá

sql º¯Êý×ܽá
³£ÓõÄ×Ö·û´®º¯ÊýÓУº
Ò»¡¢×Ö·ûת»»º¯Êý
1¡¢ASCII()
·µ»Ø×Ö·û±í´ïʽ×î×ó¶Ë×Ö·ûµÄASCII ÂëÖµ¡£ÔÚASCII£¨£©º¯ÊýÖУ¬´¿Êý×ÖµÄ×Ö·û´®¿É²»ÓÑ’À¨ÆðÀ´£¬µ«º¬ÆäËü×Ö·ûµÄ×Ö·û´®±ØÐëÓÑ’À¨ÆðÀ´Ê¹Ó㬷ñÔò»á³ö´í¡£
2¡¢CHAR()
½«ASCII Âëת»»Îª×Ö·û¡£Èç¹ûûÓÐÊäÈë0 ~ 255 Ö®¼äµÄASCII ......

ÔÚCMDϲÙ×÷SQL SERVERÊý¾Ý¿â


MYSQL¿ÉÒÔÔÚ¿ØÖÆÌ¨Ï½øÐвÙ×÷£¬ÀûÓÃÃüÁî
SQL´úÂë
mysql -h localhost -u root -p123456  
¾Í¿ÉÒԵǽMYSQLµÄ¿ØÖÆÌ¨¡£
sql serverÒ²ÌṩÁË¿ØÖÆÌ¨ÏµIJÙ×÷¹¦ÄÜ¡£
ÔÚSQL SERVERµÄ binnĿ¼Ï£¬ÌṩÁËosql.exeÓëisql.exeÕâÁ½¸öÎļþ¡£
ÕâÁ½¸ö³ÌÐò¶¼ÌṩÁË·ÃÎÊSQL SERVERµÄ¹¦ÄÜ£¬ÕâÁ ......

ͨ¹ýÁ½¸öÀý×Ó½²½âPIVOT/UNPIVOTµÄÓ÷¨_SQL¼¼ÇÉ

ʹÓùýSQL Server 2000µÄÈ˶¼ÖªµÀ£¬ÒªÏëʵÏÖÐÐÁÐת»»,±ØÐë×ÛºÏÀûÓþۺϺ¯ÊýºÍ¶¯Ì¬SQL£¬¾ßÌåʵÏÖÆðÀ´ÐèÒªÒ»¶¨µÄ¼¼ÇÉ£¬¶øÔÚSQL Server 2005ÖУ¬Ê¹ÓÃÐÂÒý½øµÄ¹Ø¼ü×ÖPIVOT/UNPIVOT£¬Ôò¿ÉÒÔºÜÈÝÒ×µÄʵÏÖÐÐÁÐת»»µÄÐèÇó¡£
ÔÚ±¾ÎÄÖÐÎÒÃǽ«Í¨¹ýÁ½¸ö¼òµ¥µÄÀý×ÓÏêϸ½²½âPIVOT/UNPIVOTµÄÓ÷¨¡£
PIVOTµÄÓ÷¨£º
Ê×ÏÈ´´½¨²âÊÔ±í£¬È» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ