Converting output of sql query
- by phenevo
Hi,
Let say I have table
Payments
Id int autoincement
Status int
and my query is :
select id, status from payments
but I wanna convert status to enum.
0 is unpaid
1 is paid.
so result should look like:
1 paid
2 unpaid
3 paid
...
I need this conversion because I use
XmlReader reader = cmd.ExecuteXmlReader();
oc.LoadXml("<results></results>");
XmlNode newNode = doc.ReadNode(reader);
while (newNode != null)
{
doc.DocumentElement.AppendChild(newNode);
newNode = doc.ReadNode(reader);
}
and then I save this xml and opening it by excel, and statuses should be friendly for user.