Solved

SQL to Data Feed

Posted on 2013-01-11
3
942 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
Comment Utility
Note: the feed will be used to populate a geckoboard dashboard.
0
 
LVL 13

Accepted Solution

by:
jonnidip earned 250 total points
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

744 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

16 Experts available now in Live!

Get 1:1 Help Now