?
Solved

Join to tab files

Posted on 2008-01-31
8
Medium Priority
?
283 Views
Last Modified: 2012-06-27
I'm a sql developer who hasn't used GIS before.
From what I can tell MapInfo (Exponare) keeps it's data in tab files.
I need to write views (in SQL Server) that will take 95% of it's info from a sql table but needs to join to the mapping data to collect the other 5%
The 2 datasets have a common key so that is fine.
Writing a query in mapinfo that selects data from a sql table is fine (via odbc) but the other way around?
Where would I start?
Special driver?
Linked tables within SQL (that isn't a sql table)??
0
Comment
Question by:QPR
  • 4
  • 3
7 Comments
 
LVL 35

Expert Comment

by:David Todd
ID: 20810647
Hi QPR,

One idea, if Mapinfo has a number of flat text files, would be to do a bulk insert or the like overnight for just the 5% of data you require ...

Your other ideas look like they'll work if there is an OBDC driver for mapinfo.

Cheers
  David
0
 
LVL 29

Author Comment

by:QPR
ID: 20811126
Thanks David,
If I had the driver had would I then connect?
Ultimately I would be showing this data (together with the other 95% from the SQL DB) on an aspx page.
Perhaps I could create a connection via the driver from the page... but would I be able to use this functionailty in a stored procedure?
I've only ever used sql tools to retrieve sql data (local or remote)

select stuff
from mysqldb
inner join tabFiles (via odbc)
on 1 = 1
0
 
LVL 29

Author Comment

by:QPR
ID: 20811153
I should also add that I am not 100% sure how the mapping data is stored.
I've been brought into this project late in the day and can only find scratchy details as half the pages are down on their product info pages. To my knowledge the back end is mapinfo and the web front end is called Exponare. Exponare talks of data in tab files but this could be (a guess) extracted data from a db that resides on the web server. If any other GIS-types out there know then I'd be grateful for the info.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
LVL 35

Accepted Solution

by:
David Todd earned 2000 total points
ID: 20811291
Hi,

If you have an odbc driver, then you can set up a linked server from SQL. Maybe the distributed query thing (ie select * from server1.db1.dbo.table1 t1 join server2.db2.dbo.table2 t2 on t1.something = t2.somethingelse) might not work, but openquery is a possiblity ...

Cheers
  David
0
 
LVL 29

Author Comment

by:QPR
ID: 20811310
Ahhh thanks, I mistakenly assumed that linked servers were (only) other sql servers.
That's the only way I've used them anyways.
The consultant will be here next week and he may be able to shed some light on things. Just thought it would be nice to do a bit of spadework so I could cut through the inevitable sales pitch!
0
 
LVL 29

Author Comment

by:QPR
ID: 20811317
Although why I thought that when I've previoyusly connected to Active Directory via linked servers I don't know!
Just had a quick revisit of Linked Servers and saw the drop down list of drivers. Should have looked there first.
Bob Geldof was right, Mondays suck!  :)
0
 
LVL 35

Expert Comment

by:David Todd
ID: 20811329
Hi QPR,

And doing releases or promising anything late on a friday is also dangerous ...

Cheers
  David
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question