Your SQL command was:
CREATE TABLE #upload ( up_id int,  up_ra  Float, up_dec  Float, up_sep  Float) 
INSERT INTO #upload values ( 1,256.443154,58.0255,1.0 ),( 2,29.94136,0.0893,1.0 )  
CREATE TABLE #x (up_id int,objID bigint)  
INSERT INTO #x 
SELECT up_id,  dbo.fGetNearestObjIdEq( up_ra,up_dec,up_sep ) as objId  
FROM #upload 
WHERE  dbo.fGetNearestObjIdEq( up_ra,up_dec,up_sep ) IS NOT NULL 
SELECT TOP 50 
 p.ra,p.dec, p.run,p.rerun,p.camCol,p.field,p.obj 
FROM ..PhotoObj AS p 
JOIN #x AS x ON x.objID=p.objID 
JOIN #upload AS u ON u.up_id = x.up_id    
ORDER BY x.up_id 

Your query output (max 500,000 rows):

radecrunreruncamColfieldobj
256.44314483465258.0252475784424133930115653
29.94135382168520.089292198231689342633014315171

Use the button below to upload the results of the above query to the SAS and retrieve the corresponding FITS files:

Upload list of fields to SAS