.


:




:

































 

 

 

 





.

__BEGIN_TRAN__(PROCNAME) {} if @RetVal <> 0 begin __ERR_TRAN__(PROCNAME) return@RetVal end __COMMIT_TRAN__

, .

.

 

 

1. SQL 5NT

SQL- ,

5.1.2.1 , :

Rmaket

t(h)AccPosition

tAccrualDetail

tADLink

tAudit

tCtrCondition

tCtrConditionContent

t(h)Deal

tDealOrder

tDealProtocol

tDealRelation

t(h)DealTransact

tDepartment

tDocRelation

tEntAttrValue

tInstAttr

tInstAttr2

t(h)Institution

tObjClassifier

tObjClsRelation

t(h)OperPart

t(h)PayInstruct

tPayInstructRelation

tPCardTransact

tResource

tResourceBind

t(h)Security

tSmpArchive

tSmpObject

t(h)Swift

t(h)SwiftLine

tRest

tUserRes

tUserResSel

select, update, delete.

.

select @BalanceID = BalanceID from tResource M_NOLOCK_INDEX(XPKtResource) where ResourceID = @ResourCre M_ISOLAT
deletetOperPart fromtOperPart M_INDEX(XPKtOperPart) whereOperationID = @OperationID

 

5.1.2.3 , " ", .. NOLOCK M_ISOLAT, :

(, tRest), .

(, seed-, 7- ..).

.

select @Date = DealDate from tDeal M_NOLOCK_INDEX(XPKtDeal) where DealID = @DealID M_ISOLAT select @Date = DealDate from tDeal M_NOLOCK where DealID = @DealID

 

5.1.2.4 INSERT, UPDATE, DELETE pResource, pResList, pAccTurn, pVirtualOperTurn, pTurn , .

.

.

select * from tOperPartM_NOLOCK_INDEX(XPKtOperPart) M_ISOLAT select * fromtOperPartM_INDEX(1) M_ISOLAT

 

 

5.1.2.6 Stored Procedure',

5.1.2.7 Sybase c M_ROWLOCK. :

.

create tablepAccService (ID DSIDENTIFIER, SPID DSIDENTIFIER, IRTAccountServiceID DSIDENTIFIER, InstRelTypeID DSIDENTIFIER, ChangeFlag DSTINYINT)M_ROWLOCK go

view c .5.1.2.1.

select .

tOperPart

tRest

tUserRes

tUserResSel

.

. forceplan M_FORCEPLAN, , M_FORCEORDER, , .. ..4.1.27 4.1.28

.

M_FORCEPLAN selectop.ResourceID, sum(op.Qty) fromtResourceBind rb M_NOLOCK_INDEX(XIE3tResourceBind),tOperPart op M_NOLOCK_INDEX(XAK1tOperPart) whererb.ParentID = @ResourceID andrb.ChildResType = 1 andop.ResourceID = rb.ChildID andop.OperDate > @BegDate andop.OperDate <= @EndDate group byop.ResourceIDM_FORCEORDER

 

5.1.2.12 (p-) , , , . (Sybase) .

.

delete pRestCalendarOut from pRestCalendarOut M_INDEX(pRestCalendarOut) where SPID = @@spid    

(p-) tDocMark ( ) ( )..

5.1.2.14 :

Insert: M_WITH_ROWLOCK

Update: M_UPDLOCK_INDEX

Delete: M_ROWLOCK_INDEX M_NOLOCK_INDEX, !!

Select: M_NOLOCK_INDEX - !

.

insert into pResource M_WITH_ROWLOCK select...  
update pResource set Qty = 0.0 from pResource M_UPDLOCK_INDEX(XPKpResource) where...  

 

 

-
FA#. SQL
 
-
0.9
 

 

..
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

 

16.07.2003 0.1
14.02.2008 0.9
       
       
       

 

...
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

 





:


: 2016-11-02; !; : 1127 |


:

:

, , .
==> ...

2135 - | 1781 -


© 2015-2024 lektsii.org - -

: 0.014 .