Reply to SQL Join with unknown tables - but it works!?!

Your name:

Reply:


Posted by Jack on 11/14/05 15:26

Hi all,
While debugging some old code from someone, I came across this stored
procedure:

SELECT dbo.TBL_COORD.COORD_ID AS ID, dbo.TBL_COORD.LATITUDE AS Latitude,
dbo.TBL_COORD.LONGITUDE AS Longitude,
dbo.TBL_COORD.NORTHING AS Northing,
dbo.TBL_COORD.EASTING AS Easting, dbo.refDROP_VALUES.Drop_Value AS [Geometry
Type],
refDROP_VALUES_1.Drop_Value AS [GPS Datum],
refDROP_VALUES_2.Drop_Value AS [GPS Used]
FROM dbo.TBL_COORD INNER JOIN
dbo.refDROP_VALUES ON dbo.TBL_COORD.GEOMETRYTYPE_ID =
dbo.refDROP_VALUES.ID INNER JOIN
dbo.refDROP_VALUES refDROP_VALUES_1 ON
dbo.TBL_COORD.GPS_DATUM = refDROP_VALUES_1.ID INNER JOIN
dbo.refDROP_VALUES refDROP_VALUES_2 ON
dbo.TBL_COORD.GPS_USED = refDROP_VALUES_2.ID
WHERE
<some conditions here>

This query seems to work fine, however I cannot see ANY source to the tables
refDROP_VALUES_1, and refDROP_VALUES_2. There are no views/tables/stored
procedures of any kind with these names in the databse, so I'm at a loss as
to where they're coming from. Note that there IS a table refDROP_VALUES, and
the fields that refDROP_VALUES_1 and refDROP_VALUES_2 reference ARE fields
in the table refDROP_VALUES. I can view the results from running the query.
Whats going on here? Does MS SQL create these tables?

Jack.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация