I’ve a query like this, which is already in double quotes.
result = db.Query("SELECT ACTUAL_N_WELLS, TARGET_N_WELLS, YTD ACTUAL AS YTD_ACTUAL,
YTD BUDGET AS YTD_BUDGET, (CONVERT(DATETIME,PERIOD,112)) AS DATES
FROM DASH_GL_DRILLING_PERF
WHERE ASSET_NAME='Bab & Gas Asset'
AND ( to_date(DASH_GL_DRILLING_PERF.PERIOD,'yyyy/mm/dd') >
(SELECT add_months(max(to_date(DASH_GL_DRILLING_PERF.PERIOD,'yyyy/mm/dd')),-3)
from DASH_GL_DRILLING_PERF))");
In this the column “YTD ACTUAL” and “YTD BUDGET” have spaces, but since the query is already inside double quotes, how do I write the column names? How can I escape the double quotes in this case?
If you are using
C#,JavaorPHPon this, escape the double quotes with backslash\