Help with SQL query in C#

Posted by DanSogaard on Stack Overflow See other posts from Stack Overflow or by DanSogaard
Published on 2010-03-20T15:42:04Z Indexed on 2010/03/20 15:51 UTC
Read the original article Hit count: 201

Filed under:
|

I'm trying to rename the columns. The syntax should be the column name between double quotes incase of two words, like this:

SELECT p_Name "Product Name" from items

So I'm trying to do it in C# code like this:

string sqlqry1 = "SELECT p_Name \"Prodcut Name\" from items";

But I get an error:

Syntax error (missing operator) in query expression 'p_Name "Prodcut Name"'.

It seems am having somthing wrong with the quotes, but I can't figure out.

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql