Ali Shah
asked on
Help in Understanding a SQL Query
Hi guys,
Can you please help me understand this query
What does Select 42 means?
regards
Can you please help me understand this query
SELECT Point.STAsText() AS Wkt
FROM AddressSearchString AS S
WHERE NOT EXISTS (SELECT 42
FROM [PhysicalSpace].[LocationShapes]
WHERE S.Point.STDistance(ShapeData) < 3.0 AND [IsPoint] = 1)
GROUP BY Point.STAsText()
What does Select 42 means?
regards
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No there is purpose , It is used in the where clause. In this case we need to take results where we should NOT have any rows from the Inner query.
To be honest all query seems very odd to me. You have 2 tables and there's no apparent connection between them.
Is the following query returning the same rows as the original one?
Is the following query returning the same rows as the original one?
SELECT Point.STAsText() AS Wkt
FROM AddressSearchString AS S
WHERE S.Point.STDistance(ShapeData) < 3.0
GROUP BY Point.STAsText()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Vitor and Pawan. it explains it all. Learning very quickly with the help of you guys.
thanks again
thanks again
ASKER