Insert from SQL to SQLBase with linked Server

251 Views Asked by At

how can i insert from SQL Server to a SQLBase Database using linked Server?

1

There are 1 best solutions below

0
Steve Leighton On

Here are various examples of the correct syntax for SQLServer to SQLBase assuming your LinkedServer is called 'ISLANDLINK' . Note the two dots.

or Go here for the full script and explanation : SQLServer to SQLBase via LinkedServer

or Go here for another example: SQLServer to SQLBase via LinkedServer (more)

--Select:
SELECT * FROM OPENQUERY( ISLANDLINK, 'Select * from SYSADM.BUDGET where DEPT_ID = ''MIS'' ') 

--Update:
UPDATE [ISLANDLINK]..[SYSADM].[BUDGET]
   SET [BGT_YEAR] = 2016
WHERE DEPT_ID = 'MIS'

GO

--Insert:
INSERT INTO [ISLANDLINK]..[SYSADM].[EMPLOYEE]
           ([EMPLOYEE_ID]
           ,[LAST_NAME])     VALUES (99  ,'PLUMAS' )

GO

--Delete:
DELETE FROM [ISLANDLINK]..[SYSADM].[EMPLOYEE]
      WHERE [LAST_NAME] = 'PLUMAS'