Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL to Data Feed

Posted on 2013-01-11
3
Medium Priority
?
974 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 750 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 750 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

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?
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

610 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