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

64λSQL Server2005·ÃÎÊ32λSQL Server2000µÄÎÊÌâ

      HR·þÎñÆ÷£º ²Ù×÷ϵͳ->32λWindows2000 SP4     Êý¾Ý¿â->32λSQL Server2000
      OA·þÎñÆ÷£º ²Ù×÷ϵͳ->64λWindows2003 SP2     Êý¾Ý¿â->64λSQL Server2005
      OAÏîÄ¿ÖУ¬ÐèÒª´ÓHR·þÎñÆ÷ÖÐÈ¡µÃÓû§µÄÊÖ»úºÅ¡£¶ÔÕâÖÖÇé¿ö£¬ÎÒÒÔÇ°¶¼ÊÇʹÓý¨Á¢Á´½Ó·þÎñÆ÷µÄ·½Ê½£¬ÓÚÊÇ£¬ºÜ¿ìµØдºÃ½Å±¾£¬°ÑHR·þÎñÆ÷×¢²áÁË£º
          exec sp_dropserver  'HRServer', 'droplogins'
          exec sp_addlinkedserver  'HRServer', '', 'SQLOLEDB', '10.101.166.38'
          exec sp_addlinkedsrvlogin  'HRServer', 'false', null, 'sa', 'buaa369'
     È»ºóÖ´ÐвéѯÓï¾ä£º
          select top 10 * from HRServer.testdb.dbo.EmpContactMethod
     ½á¹û£¬²¢Ã»ÓгöÏÖÊìϤµÄÏÔʾ¼Ç¼»­Ã棬ֱ½Ó±¨´íÁË¡£¡£¡££¨Ó¢Îİ棩
OLE DB provider "SQLNCLI" for linked server "hrserver" returned message "Login timeout expired".
OLE DB provider "SQLNCLI" for linked server "hrserver" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.".
ÏûÏ¢ 53£¬¼¶±ð 16£¬×´Ì¬ 1£¬µÚ 0 ÐÐ
Named Pipes Provider: Could not open a connection to SQL Server [53].
     ´Ëʱ£¬Èç¹ûÔÚÆóÒµ¹ÜÀíÆ÷ÖÐ×¢²áÕâ¸öHR·þÎñÆ÷£¬×öÏàÓ¦µÄ²éѯ¶¼Ã»ÎÊÌâ°¡¡£¡£¡£¡£
     ÕâºÜÄÖÐÄÄÅ¡£
     µ½CSDNÉϵÚÒ»´ÎÇóÖú£¬ËµÊÇ°æ±¾²»¶Ô£¬ÐèÒªSQL Server2000Ðè°²×°SP3»òSP4²¹¶¡¡£
     ¸½°æ±¾²éѯ½Å±¾£ºSELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
     °æ±¾ºÅ¶ÔÓ¦£º
  &nbs


Ïà¹ØÎĵµ£º

sqlÖÐÖÐÎÄÁÐÃû

½ñÌìÓöµ½Ò»¸öÎÊÌ⣺
ÔÚÆ´Ò»Ìõ¶¯Ì¬SqlÓï¾äʱ£¬ÓÉÓÚÊÇÓÃ×ֶεÄÖµ×öÁÐÃû£¬ËùÒÔÁÐÃûÓõ½Á˺º×Ö¡£
Ò»ÔËÐУ¬±¨´í£ºÔÚ“¡¢”¸½¼þÓÐÓï·¨´íÎó¡£
ºÜÄÉÃÆ£¬ÄѵÀ³¬³¤ÁË£¿
³¢ÊÔÔÚÆóÒµ¹ÜÀíÆ÷ÖÐÌí¼ÓÕâ¸öÁÐÃû£¬·¢ÏÖÌí¼ÓÍêÖ®ºóϵͳ×Ô¶¯Ìí¼ÓÁËÒ»¶ÔÖÐÀ¨ºÅ£¬¶ÔÓÚ"aa¡¢bb","aa£¬bb"Ò²¶¼Ìí¼ÓÁËÖÐÀ¨ºÅ¡£
¿´À´ÊÇ΢ÈíΪÁËÒÔ·ÀÍòÒ»£¬Á¬ ......

[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Ò»)

±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Ò»)--sum()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(¶þ)--max()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Èý)--row_number() /rank()/dense_rank()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(ËÄ)--lag()/lead()
ʵ¼ÊÓ¦ÓÃÖÐÎÒÃÇ¿ÉÒÔͨ¹ýsum()ͳ¼Æ³ö×éÖеÄ×ܼƻòÕßÊÇÀÛ¼ÓÖµ£¬¾ßÌåʾÀýÈçÏ£º
......

[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(¶þ)

±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Ò»)--sum()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(¶þ)--max()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Èý)--row_number() /rank()/dense_rank()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(ËÄ)--lag()/lead()
Èç¹ûÎÒÃÇ°´ÕÕʾÀýÏëµÃµ½Ã¿¸ö²¿ÃÅнˮֵ×î¸ßµÄ¹ÍÔ±µÄ¼Í¼£¬¿ÉÒÔÓÐËÄÖÖ·½·¨ÊµÏÖ£ ......

DB2 SQL ¾«Òª £¨³ÖÐø¸üÐÂÖÐ.......£©

----start
      ·²ÊÇÖªµÀÊý¾Ý¿âµÄÈ˶¼ÖªµÀSQL£¬·²ÊǶÔSQLÓÐÒ»µãÁ˽âµÄÈ˶¼¾õµÃSQLºÜ¼òµ¥£¬·²ÊÇÓÐÕâÖָоõµÄÈ˶¼ÊÇSQLµÃ³õ¼¶Óû§£¬ÒòΪËûѧ»áÁËÔö²éɾ¸Ä¾ÍÒÔΪÕâ¾ÍÊÇSQLµÄÈ«²¿¡£Ä¿Ç°µÄ´ó²¿·ÖÓ¦ÓÃÈí¼þ¶¼ÊÇÒÔÊý¾Ý¿âΪÖÐÐÄ£¬Ëæ×ÅÈí¼þµÄÔËÐУ¬Êý¾ÝÁ¿»áÔ½À´Ô½´ó¡£ÈçºÎÓüò½à¡¢¸ßЧµÄSQLÓï¾ä²Ù×÷Êý¾ÝÏÔµÃÔ½À ......

SQL ²éѯÓÅ»¯ £¨Ò»£©

ʹÓþۼ¯Ë÷ÒýÓÅ»¯SQL²éѯ
Ê×ÏÈÈÃÎÒÃÇ×öÒ»¸ö²âÊÔ£¬ÏÖ´´½¨Ò»¸ö±í Ïò±íÖвåÈë²»µÈÊý¾Ý
--DROP TABLE T_UserInfo--------------------------------------
CREATE
TABLE
T_UserInfo
(
Userid
varchar(20),
UserName varchar(20)
)
--
DECLARE
@I INT
DECLARE
@ENDID INT
SELECT
@I =
1
SELECT
@ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ