|
Posted by Jack on 11/15/05 14:16
Thank-you to all for your comments... David - I will be looking into this
to increase my MS SQL knowledge as I've never come across this concept
before!
Thanks,
Jack.
"Jack" <jacksmith@nospam.co.uk> wrote in message
news:4378917b$1@quokka.wn.com.au...
> 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]
|