• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 976
  • Last Modified:

SQL to Data Feed

I have a MSSQL 2008 database, and i need to create either an XML or JSON feed from a query. Nothing complex just 8 x pairs of data (value, label) What is the easiest way to do this? Can i do it directly from SQL or do i need a script in-between?
0
MoogControls
Asked:
MoogControls
2 Solutions
 
MoogControlsAuthor Commented:
Note: the feed will be used to populate a geckoboard dashboard.
0
 
jonnidipCommented:
MSSQL 2008 has a "for xml" clause that can be used to return xml from query statements.
You may look for info at: http://msdn.microsoft.com/en-us/library/ms178107.aspx

Regards.
0
 
mcnuteCommented:
with php, you can do just a simple
json_encode($yourresultarray)

Open in new window

to send json to the requesting page. Assumed to be the geckoboard.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now