Community
Showing results for 
Search instead for 
Do you mean 
Reply

Read data from database contacts table and export to other SQL server database

Copper Contributor
Posts: 11
Country: Canada

Read data from database contacts table and export to other SQL server database

Hi,

 

I need help to get data from database contacts table.  I want to read data of some columns (fields) of contacts table from Act database and export to other Sql server database. can any one advice how to go it by T-SQL?  

 

thanks in advance,

 

Felix 

Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Read data from database contacts table and export to other SQL server database

Hiya Felix,

 

You'll need to ask Sage for the SA password for your dB to do that via SQL -> SQL.

You could use the OLEDB to access the Contact Field Data and simply output to Excel and then save as csv?

 

HTH

Vivek Gargav

Caldere Associates Ltd.

www.caldere.com 

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Copper Contributor
Posts: 13
Country: United States

Re: Read data from database contacts table and export to other SQL server database

If your ACT software is 11.1 or higher, you have the ACTREADER password utility for free. You dont need the SA password to do what you want. Use it to set the password for the ACT SQL instance, then using Management Studio on the SQL instance that you have full rights on, play with the following script. There should be enough here to get you going. Note; You'll need to edit this for your own ACT7 SQL instance name:

 

EXEC sp_addlinkedserver  @server='ACER-01\ACT7'
GO
EXEC sp_addlinkedsrvlogin 'ACER-01\ACT7', 'false', NULL, 'actreader', 'PW$ecret1'
GO
IF OBJECT_ID('[MyLocalDB].dbo.[TBL_LINKEDCONTACTS]', 'U') IS NOT NULL
DROP TABLE [MyLocalDB].dbo.[TBL_LINKEDCONTACTS]
GO
SELECT * INTO [MyLocalDB].dbo.[TBL_LINKEDCONTACTS] from [ACER-01\ACT7].[ACT2010Demo].dbo.[TBL_CONTACT]
GO
EXEC sp_dropserver 'ACER-01\ACT7', 'droplogins'
GO
PRINT 'DONE'
GO

Doug Little

Aliano Consulting

dclittle@alianoconsulting.com

 

Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: Read data from database contacts table and export to other SQL server database