2

I am trying to pass this query "select A||','||B AS "AB" from C" as it is in a method so that it will execute.

but issue is as per my design 'AB' not coverted as "AB" in get method.

dt = conn.Get("select A||','||B AS 'AB' from C");

but in get method i want 'AB' as "AB" so that it will run in query

public DataTable Get(string cmdText, params string[] param)
    {}

how could i convert 'AB'as "AB".Any idea would be Appreciated.

Dai
  • 141,631
  • 28
  • 261
  • 374
Mohan
  • 238
  • 2
  • 15
  • 2
    `dt = conn.Get(@"select A||','||B AS ""AB"" from C");` – croxy Aug 24 '18 at 07:45
  • 1
    As far as Oracle is concerned, query would run OK without a *column alias* (i.e. `select a||','||b from c`), as well as if you don't quote the alias at all (i.e. `select a||','||b as ab from c`). – Littlefoot Aug 24 '18 at 07:46
  • If the query is fixed and parameters are vary you can try to use Stored procedure in sql. – Ashok Aug 24 '18 at 07:48

0 Answers0