Howdy,

I want to make a sql that goes to oracle. the sql should be
"Select "cusip", "price structure" from tableA" (basically the columns are wrapped in double quotes.

I used this synatax in C#:

string mysql = "select "+'"'+"cusip,"+'"' + '"'+ "Price structure\"" from tableA"

and I am getting the following output:

select \"cusip,\"\"Price from tableA

This output can't be processed by Oracle.

How can I fix the syntax in C#, so that the output would be "Select "cusip", "price structure" from tableA"

thanks
nath

Did you try escaping the " marks

string mysql = "select \"cusip\", \"price structure\" from tableA";

Oracle should accept you using:

string mysql = "select 'cusip', 'price structure' from tableA";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.