sqlµ¼³öÊý¾Ý¿âʱ±¨ "µÇ½ xxx ʧ°Ü",ÎÞ·¨Íê³É
ÐÞ¸ÄÊý¾Ý¿â¶ÔÏóËùÓÐÈË
½ñÌì°ïÅóÓÑ´«Êý¾Ý¿â±¨´í,Ìáʾ "
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]µÇ½ xxx ʧ°Ü",ÕýºÃǰ¶Îʱ¼äÅöµ½Í¬ÑùÎÊÌâ,³¢ÊÔɾ³ýÓû§ xxx , ÓÖ±¨´í,Ìáʾ" Óû§ÓµÓжÔÏó,ËùÒÔÎÞ·¨É¾³ý". ²é¿´Êý¾Ý¿â,·¢ÏÖ¸ÃÓû§ÓµÓÐºÜ¶à´æ´¢¹ý³Ì,Ò»¸öÒ»¸ö¸ÄÌ«Âé·³,´ÓÍøÉÏÕÒµ½ÈçÏ·½·¨,Ç¡ºÃ½â¾ö´ËÎÊÌâ:
CREATE PROCEDURE dbo.User_ChangeObjectOwnerBatch
@OldOwner as NVARCHAR(128),
@NewOwner as NVARCHAR(128)
AS
DECLARE @Name as NVARCHAR(128)
DECLARE @Owner as NVARCHAR(128)
DECLARE @OwnerName as NVARCHAR(128)
DECLARE curObject CURSOR FOR
select 'Name' = name,
'Owner' = user_name(uid)
from sysobjects
where user_name(uid)=@OldOwner
order by name
OPEN curObject
FETCH NEXT from curObject INTO @Name, @Owner
WHILE(@@FETCH_STATUS=0)
BEGIN
if @Owner=@OldOwner
begin
set @OwnerName = @OldOwner + '.' + rtrim(@Name)
exec sp_changeobjectowner @OwnerName, @NewOwner
end
-- select @name,@NewOwner,@OldOwner
FETCH NEXT from curObject INTO @Name, @Owner
END
close curObject
deallocate curObject
GO
È»ºóÖ´Ðд洢¹ý³Ì¼´¿É
exec User_ChangeObjectOwnerBatch
Ïà¹ØÎĵµ£º
¾µäSQLÓï¾ä´óÈ«
ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
¡¡¡¡SQL·ÖÀࣺ
¡¡¡¡DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
¡¡¡¡DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
¡¡¡¡DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
¡¡¡¡Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
¡¡ ......
if(query.getIsScrapAlert()!=null&&query.getIsScrapAlert()==1){
//criteria.add(Expression.sql(" add_months(this_.D_RECEIVE_DATE,this_.N_DEPRECIABLE_LIFE*12)<add_months(sysdate,-3) "));
criteria.add(Expression.sql(" ((add_months(this_. ......
Knowledge Xpert® for PL/SQL ÊÇÒ»¸ö¹¦ÄÜÇ¿´óµÄ»ùÓÚWindowsµÄ¼¼Êõ×ÊÔ´¿â£¬Ëü¸²¸ÇPL/SQL ¿ª·¢µÄÕû¸öÉúÃüÖÜÆÚ£¬ÉÏǧÖÖרÌâÌṩ±àд¸ßÖÊÁ¿´úÂëËùÐèÒªµÄ±³¾°ÐÅÏ¢¡¢×îºÃµÄ¾ÑéºÍ³ÌÐò·¶Àý¡£
ÌṩÉÏǧÖÖרÌ⣬¸²¸ÇPL/SQL ±à³ÌµÄÕû¸öÉúÃüÖÜÆÚ£¬´Ó»ù±¾µÄרÌâµ½¸ß¼¶µÄPL/SQL ±àÂë¼¼Êõ¡£
ÓɰüÀ¨Mike Ault¡¢Steven Feuerstein¡¢ ......
ÎÒÃÇÒª×öµ½²»µ«»áдSQL,»¹Òª×öµ½Ð´³öÐÔÄÜÓÅÁ¼µÄSQL,ÒÔÏÂΪ±ÊÕßѧϰ¡¢ÕªÂ¼¡¢²¢»ã×ܲ¿·Ö×ÊÁÏÓë´ó¼Ò·ÖÏí£¡
£¨1£© Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
ORACLE µÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom× ......
/******* µ¼³öµ½excel
exec master..xp_cmdshell ’bcp settledb.dbo.shanghu out c:\temp1.xls -c -q -s"gnetdata/gnetdata" -u"sa" -p""’
/*********** µ¼Èëexcel
select *
from opendatasource( ’microsoft.jet.oledb.4.0’,
’data source="c:\test.xls";user ......