sql ×Ö·û´®´¦Àí - MS-SQL Server / Ó¦ÓÃʵÀý
ÓÐÒ»¸ö±íµÄ×Ö¶ÎFileName±£´æÊý¾ÝÊÇ:010101 »ò 100010 »ò 111100 111111 ´ú±í == >> abcdef create table a ( id int not null, FileName varchar(100) not null ) insert into a values(1,'010101') insert into a values(2,'100010 ') insert into a values(3,'111100') Æ©Èç:ÊäÈëÒ»¸ö FileNameµÄֵΪ 010101 --->>b;d;f Èç: select funs('010101') from a; /** b;d;f */ funsÕâ¸öº¯ÊýÒªÇó°ïæµÄ..лл
ÒªÇóдһ¸öº¯Êý ³¤¶ÈÊǹ̶¨µÄ²»£¿ SQL code: case when substing(FileName,1,1)=0 then '' else 'a' end +';'+ case when substing(FileName,2,1)=0 then '' else 'b' end +';'+ case when substing(FileName,3,1)=0 then '' else 'c' end +';'+ ......ÒýÓà SQL code case when substing(FileName,1,1)=0 then '' else 'a' end +';'+ case when substing(FileName,2,1)=0 then '' else 'b' end +';'+ case when substing(FileName,3,1)=0 then '' else 'c' end +';'+ ...¡¡ Õâ¸ö²»ÊÇÎÒÏëÒªµÄ.. ³¤¶È²»¹Ì¶¨µÄ.. ´Ó¡°010101¡± ת»»¡°b;d;f¡±£¬ËûÃǵĹØÏµÊÇʲô£¿Èç¹ûÒ»µã¹ØÏµ¶¼Ã»ÓУ¬ËüÊÇʲô³öÀ´µÄ£¬²»Ã÷°×£¿ ÊDz»ÊÇÕâ¸ö±í»¹ÓÐÆäËû×ֶΣ¿ ÊÇÓÐÆäËû±í... ÉÏÃæµÄÎÒÖ»ÊǾٸöÀý×Ó... SQL code Code highlighting produced by Actip
Ïà¹ØÎÊ´ð£º
tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£© tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname ½á¹û£º µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......
ÐèÇóÈçÏ£º ѧԺ academy£¨aid,aname£© °à¼¶ class£¨cid,cname,aid£© ѧÉú stu(sid,sname,aid,cid) סËÞÇø region(rid,rname) ËÞÉáÂ¥ build(bid,rid,bnote) bnoteÊÇ¡®ÄС¯/¡®Å®¡¯ ËÞÉá dorm(did,rid,bid£¬bedn ......
A±í ÓÐÁ½¸ö×Ö¶Î id ΨһÊý×ÖÓò InfoTxt text ÀàÐÍ ÎÒÏÖÔÚÒª°Ñ id ²»ÊÇ14 µÄËùÓÐ InfoTxt×Ö¶Î Îı¾ºóÃæ ¶¼¼ÓÉÏ 'aaa' °´ÏÂÃæÖ´ÐÐÏÂÀ´ Ö»Óбí×îºóÒ»ÐмÓÉÏÁË 'aaa' ......
ÔÚAccessµÄ²éѯÖÐÖ´ÐÐÏÂÃæµÄÓï¾ä,ÎÞЧ,ÌáʾÆÚ´ýselect ,updata ,... CreateTble C=Answer N="»ØÌû±í" ( C=ID T="INTEGER" P=No M=No N="±àºÅ" Z=false, C=Ques ......
ÎÒÓÐÒ»¸ö×Ö¶ÎÊÇ varchar(1) ÀàÐÍ£¬¶þ½øÖƱíʾҲ¾ÍÊÇ8λµÄ ¡®0000 0000¡¯ ±ÈÈçÕâ¸öʱºòÎÒÐèҪɸѡ³öÕâ¸ö×Ö¶ÎΪËùÓÐµÄ ¡®0000 0100¡¯µÄÐУ¬ÇëÎÊSQLÄÜʵÏÖÕâÑùµÄ¡°Î»¡±µÄɸѡÂ𣿠лл~~~ ÓÐλ²Ù×ݺ¯ÊýÂ𣿲»ÐоÍ× ......