Solved

SQL to Data Feed

Posted on 2013-01-11
3
947 Views
Last Modified: 2013-03-27
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
Comment
Question by:MoogControls
3 Comments
 

Author Comment

by:MoogControls
ID: 38768031
Note: the feed will be used to populate a geckoboard dashboard.
0
 
LVL 13

Accepted Solution

by:
jonnidip earned 250 total points
ID: 38768398
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
 
LVL 11

Assisted Solution

by:mcnute
mcnute earned 250 total points
ID: 38769601
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now