Convert VB.NET to TSQL PROC & Reference a Proc from another Proc

Convert VB.NET to TSQL PROC & Reference a Proc from another Proc

Post by jhcore » Sat, 28 May 2005 01:36:14


Here is a paraphrase of some sql that we use. This could be a stored
procedure
with @my_lat and @my_long passed in as your search coordinates. This
code
assumes a table with XCOORD and YCOORD columns that hold the lat and
long for each entry.

SELECT (ROUND(3956 * (2 * ASIN( SQRT( (1-COS(2*(((RADIANS(@my_lat) -
RADIANS(YCOORD))/2))))/2
+ COS(RADIANS(YCOORD)) * COS(RADIANS(@my_lat)) *
(1-COS(2*(((RADIANS(@my_long) - RADIANS(XCOORD))/2))))/2))),2))
AS Distance,
Store
from StoreTable
ORDER BY Distance ASC

HTH,
Jim
 
 
 

Convert VB.NET to TSQL PROC & Reference a Proc from another Proc

Post by David Lozz » Fri, 03 Jun 2005 03:35:10

erfect

thank you!


< XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...