Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8702115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:34:15+00:00 2026-06-13T02:34:15+00:00

Is there a advanced oracle feature to modify the SQL Query just before it

  • 0

Is there a advanced oracle feature to modify the SQL Query just before it is submitted to oracle? Or may be modify the result set? Based on certain condition? Like may be based on the name of the process that submits the query? Or based on the query text?

The scenario is that a process (written in C++) is running a query and we don’t have a way to change the C++ code. A particular business validation within that process is failing and in order to make the validation not fail, I want a way to manipulate the returned data set or manipulate the select query just before it is submitted to oracle engine.

The C++ code is running this exact query

SELECT PL_ID FROM A_HDR WHERE ENT_NBR=”

I want to change it such that ORACLE always sees and executes the following query instead

SELECT NULL FROM A_HDR WHERE ENT_NBR=”

Please guide

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:34:16+00:00Added an answer on June 13, 2026 at 2:34 am

    Oracle Virtual Private Database may be what you’re looking for. From the manual:

    Oracle Virtual Private Database (VPD) enables you to create security
    policies to control database access at the row and column level.
    Essentially, Oracle Virtual Private Database adds a dynamic WHERE
    clause to a SQL statement that is issued against the table, view, or
    synonym to which an Oracle Virtual Private Database security policy
    was applied.

    You may be able to get the process and query text from SYS_CONTEXT. For example, sys_context('userenv', 'current_sql') and sys_context('userenv', 'module'). You may also need to use GV$SESSION to get more information.

    However, I think you should try to avoid VPD if possible. It is extremely confusing to have all your SQL statements silently converted in the background. It can make development and troubleshooting very difficult.


    Update

    The SQL Translation Framework feature in Oracle 12c would probably be the best solution for this problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any advanced Oracle SQL methods to solve this kind of situation? Simplified:
Is there any sql*plus command to remove \r \n and \t from the result
I just installed Oracle, and I am working with SQL*Plus because the GUI tool,
I am new to the SQL/Oracle, and wondering if there's an easy way to
I need help about a query in oracle 10g, Here is my question: There
When we fire a SQL query like SELECT * FROM SOME_TABLE_NAME under ORACLE What
Is there a way i can output in SQL Oracle as follow with a
In Oracle, there's a view called V$SQLAREA that lists statistics on shared SQL area
Hi we know that is we do the following query in Oracle SQL we
Is there a win64 identifier in Qmake project files? Qt Qmake advanced documentation does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.