¹ØÓÚsqlserver Êý¾Ý±í²éѯµÄÎÊÌâ
Ô´Êý¾Ý±í¸ñʽÈçÏÂ
Ä¿±êÊý¾Ý¼¯¸ñʽÈçÏÂ
Çë¸ßÊÖ°ïæ½â¾ö
×îºÃÊǼòµ¥²éѯÓï¾ä¸ã¶¨µÄ£¬²»ÏëʹÓÃÓαêµÈ¸´ÔÓ²Ù×÷
¿´²»¶®
Ô´Êý¾ÝÊÇDEPTºÍBIµÄÒ»¶ÔÒ»µÄÊý¾ÝÐÐ ÆäÖÐ DEPTÊÇÖ÷¼ü×Ö¶Î
Ä¿±êÏëÒª»ñµÃÒÔÇø¼äÐÎʽ±íʾµÄÊý¾ÝÐУ¬±ÈÈçÔÚÔ´±íÖÐ100 <=DEPT <=101µÄÐжÔÓ¦µÄBI¶¼ÊÇ0.4
¼´µÃµ½Ä¿±êÊý¾Ý¼¯ÖеĵÚÒ»ÐÐ 100,101,0.4
Ä¿±êÊý¾Ý¼¯ÖеÄDEPT1ΪÖ÷¼ü
¼ÌÐøÏòϼ´µÃµ½101.5£¬102£¬0.8±íʾÔÚÔ´±íÖдÓ101.5µ½102µÄDEPT¶ÔÓ¦µÄBIΪ0.8
ÎÒµÄÄ¿µÄ¾ÍÊǽ«BI½øÐоۺϣ¬µ«Ê¹ÓÃgroup byµÄ»°¾Í»áÖ»µÃµ½ÈýÐÐÊý¾Ý £¬BI·Ö±ðÊÇ0£¬0.4£¬0.8
¶øÇҵò»µ½¶ÔÓ¦µÄDEPT1ºÍDEPT2£¬
ËùÒÔÔÚÕâÀïÇëÇó¸ßÊÖ°ïæ
·Ç³£¸Ðл5Â¥¸ßÈË£¬ÎÒÒªµÄÕýÊÇÕâ¸öЧ¹û
Ïà¹ØÎÊ´ð£º
ÊÇÕâÑùµÄ£¬ÎÒÓÃÊÇODBCÊý¾ÝÔ´Á¬½Ó·þÎñÆ÷µÄÊý¾Ý¿â£¬ÏÖÔÚÎÒ¾õµÃºÜÂé·³£¬ÒòΪҪΪÿÈç»úÌí¼Ó¶ÔÓ¦µÄÊý¾ÝÔ´£¬Ïë°ÑËû¸Ä³ÉADO·½·¨À´·ÃÎÊ·þÎñÆ÷µÄÊý¾Ý¿âÄÜʵÏÖÂð£¿ÒªÔõôд¡£
±ÈÈç·þÎñÆ÷ÀïÓжþ¸öÊý¾Ý¿âdata1 ºÍdata2£¬¿Í»§ ......
Çë½Ì¸÷λ£º
ÔÚ³¬ÊеÄÊÕÒøϵͳÖУ¬Èç¹ûÓÐ20¶à¸ö¿Í»§¶Ë£¬ÓпÉÄÜͬʱ¶Ôij×Ö¶ÎÊý¾Ý½øÐÐÐ޸ģ¬»ò½øÐÐɾ³ý£¬¾ÍÓпÉÄܾͻáÔì³ÉijЩ¿Í»§¶Ë³öÏÖ´íÎó£¬Ó¦¸ÃÈçºÎÈ¥±ÜÃâÄØ£¿ÄÜ·ñÌṩ¾ßÌåÊÂÀý£¬Ð»Ð»
Ôõô»áͬʱÐÞ¸ÄÄØ£¿
......
ÓÐÈËÊÔ¹ýÔÚwin7ÉÏ°²×°sqlserverÂð£¿
Ìý˵sql2000×°²»ÉÏÈ¥£¬²»ÖªµÀÆäËû°æ±¾Ðв»ÐС£
ºÃÏñ²»ÐÐ,²»¼æÈÝ,ÉÏ´ÎÒ²ÓÐÈËÎʹýѽ
ºÇºÇ£¬ÓÐÍøÓÑÓÐÏà¹ØµÄ¾ÑéÂð£¿
Õâ¸ösqlserverÒª¾¡Á¿×°ÔÚwin7ÉÏ¡£
SQLSERVER 2000Ã ......
sqlserverÖж¨Òå×Ö¶Îʱ£¬ÓбêʶÖÖ×Ó¡¢±êʶºÍ¹«Ê½µÈ£¬ÊÇʲôÒâ˼£¿
Ó¦¸Ã˵µÄÊÇidentity°É
identity?ɶÒâ˼£¿
IDENTITY£¨º¯Êý£©
Ö»ÓÃÔÚ´øÓÐ INTO table ×Ó¾äµÄ SELECT Óï¾äÖУ¬ÒÔ½«±êʶÁвåÈ뵽бíÖС£
¾¡¹ ......