Hi All,
I am storing queries in the table and getting executed one by one.
My stored query,
SELECT count(DISTINCT 1) tst FROM insurance_data v
WHERE ROWNUM < 2
AND v.coverage_type = '''BLDG_GREEN_UPGRADE'''
My code is like below
vinnercur := dbms_sql.open_cursor;
dbms_sql.parse( vinnercur,vsqlquery,dbms_sql.native);
---vsql is my query from database
vexecute := dbms_sql.execute(vinnercur);
dbms_sql.column_value(vinnercur,1,vcnt);
vrtn:= dbms_sql.fetch_rows(vinnercur);
IF vrtn> 0 THEN
dbms_sql.column_value(vinnercur,1,vcnt);
END IF;
Getting value as 1 in vrtn
But vcnt is 0
when i am running the same query from sql developer as below like then
SELECT count(DISTINCT 1) tst FROM insurance_data v
WHERE ROWNUM < 2
AND v.coverage_type = 'BLDG_GREEN_UPGRADE'
Getting value as "1"
Can you please suggest what i am doong wrong here.
If required i can post complete code.
Thanks a lot !!