Troia Linked Server olarak bağlı Distributor True olan sunucudaki Tablolara işlem yapmak.

/*DIKISOTOMASYON VERITABANINA KAYDET*/
 OBJECT :
 STRING STR1,
 STRING PARCA,
 INTEGER DETEXPOS;
STR1=’SET XACT_ABORT ON’;
 SELECT *
 FROM MACELLAN..VW_DIKIS_OTOMASYON
 WHERE CONFIRMATION=PCONFIRMATION
 AND CONFIRMPOS=PCONFPOS AND MATERIAL NOT LIKE ‘%P’
 ORDERBY MATERIAL DESC
 INTO TBLIAS ;
 IF NOTSELECTED THEN
 SELECT *
 FROM MAC2011..VW_DIKIS_OTOMASYON
 WHERE CONFIRMATION=PCONFIRMATION
 AND CONFIRMPOS=PCONFPOS AND MATERIAL NOT LIKE ‘%P’
 ORDERBY MATERIAL DESC
 INTO TBLIAS ;
 ENDIF;
IF SELECTED THEN
LOOP AT TBLIAS
 BEGIN
 PARCA=STRSTR(TBLIAS_MATERIAL,5,1);
IF PARCA==’P’ THEN
 RETURN;
 ENDIF;
 IF PARCA==’V’ THEN
 RETURN;
 ENDIF;
APPEND COLUMN CYCLE,INTEGER,2 TO TBLIAS;
 DETEXPOS=STRPOS(TBLIAS_DIKISKODU,’D1′);
IF DETEXPOS>0 THEN
 MOVE 24 TO TBLIAS_CYCLE;
 ENDIF;
DETEXPOS=STRPOS(TBLIAS_DIKISKODU,’D2′);
IF DETEXPOS>0 THEN
 MOVE 29 TO TBLIAS_CYCLE;
 ENDIF;
DETEXPOS=STRPOS(TBLIAS_DIKISKODU,’D3′);
IF DETEXPOS>0 THEN
 MOVE 36 TO TBLIAS_CYCLE;
 ENDIF;
DETEXPOS=STRPOS(TBLIAS_DIKISKODU,’D4′);
IF DETEXPOS>0 THEN
 MOVE 43 TO TBLIAS_CYCLE;
 ENDIF;
 IF SELECTED THEN
 BEGINTRAN;
 EXECUTESQL STR1;
 SELECT *
 FROM [DIKISOTOMASYON\WINTR].[IAS].[dbo].[TBLORGU]
 WHERE 1=2
 INTO TBLOTOMASYON;
MOVE-CORRESPONDING TBLIAS TO TBLOTOMASYON;
 INSERT INTO TBLOTOMASYON;
IF SYS_STATUS THEN
 ROLLBACKTRAN ;
 RETURN;
 ENDIF;
COMMITTRAN;
 ENDIF;
ENDLOOP;
ENDIF;