Solved

SQL to Data Feed

Posted on 2013-01-11
3
963 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
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.
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.

734 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