Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export if .com in DB name 1

Status
Not open for further replies.

derwent

Programmer
May 5, 2004
428
GB
A database is named aaaaaa.com, this poses no problems for everyday tasks but I have been asked to export the data from several tables in the DB.

Right click the table > all tasks > export data
I select the server and DB, press next
select to export as .xls
it then errors our as it is trying to find aaaaaaaa, the .com bit has been ignored.

The error message is

Error Source: Microsoft OLE DB Provider for SQL Server
Unspecified error
Could not find server aaaaaa in sysservers etc etc etc

Anyone know any solutions? Thanks

 
One way....

In the step called "Specify Table Copy or Query", choose "Use a query to specify the data to transfer".

Click Next.

In the Query statement, put your query in, like...

Select * From [aaaa.com].dbo.Table

Click next, etc...

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks gmmastros, that worked perfectly. I had tried a query but omitted the .dbo. bit which was obviously what I needed.
 
I'm glad I could help. Thanks for the star.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Sorry to rehash this one back up, is it possible using a query to export the headers as column names so that we can easily match up the data to the row.

 
I'm a little confused.

I tested this by exporting from a query in to an excel spreadsheet. Row 1 of the spreadsheet contains column headers. Starting at Row 2 is the data.


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Bugger, me thick sorry! It has been one of those days, servers going down galore
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top