Darkblad

MS SQL query to get solar systems as clickable Links

Jun 12th, 2015
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. SELECT '<tr><td><a href=javascript:CCPEVE.showInfo(5,',
  2. solarSystemID,
  3. ')>',
  4. solarSystemName,
  5. '</a></td><td><a href=javascript:CCPEVE.showInfo(4,',
  6. constellationID,
  7. ')>',
  8.  
  9. (SELECT constellationName
  10. FROM mapConstellations AS c
  11. WHERE s.constellationID = c.constellationID) AS 'constellationName',
  12. '</a></td><td></td><td>Null</td>' AS 'Filler',
  13. '<td><a href=javascript:CCPEVE.showInfo(3,',
  14. regionID,
  15. ')>',
  16.  
  17. (SELECT regionName
  18. FROM mapRegions AS r
  19. WHERE s.regionID= r.regionID) AS 'regionName',
  20. '</a></td></tr>'
  21. FROM mapSolarSystems AS s
Advertisement
Add Comment
Please, Sign In to add comment