Forum Stats

  • 3,855,047 Users
  • 2,264,453 Discussions
  • 7,905,875 Comments

Discussions

Logged in username in query (for report)

Balbuena
Balbuena Member Posts: 1
edited May 22, 2014 2:25PM in APEX Discussions

Hello all,

This might seem like an obvious question to you guys here, but I've been Googling about this for a while now, and I just can't come up with specific enough keywords to point me in the right direction.

Basically I'm creating a report region, built with a query that is reduceable to:

SELECT * FROM PROJECTS WHERE TECH_LEAD = ? OR BUSINESS_ANALYST = ?

...except I want that question mark to be replaced with the logged in username/userid, as shown in the top right corner.

Best Answer

  • fac586
    fac586 Senior Technical Architect Member Posts: 21,232 Red Diamond
    edited May 22, 2014 2:10PM Answer ✓
    1721667 wrote:
    
    

    Please update your forum profile with a real handle instead of "1721667".

    This might seem like an obvious question to you guys here, but I've been Googling about this for a while now, and I just can't come up with specific enough keywords to point me in the right direction.
    
    Basically I'm creating a report region, built with a query that is reduceable to:
    
    SELECT * FROM PROJECTS WHERE TECH_LEAD = ? OR BUSINESS_ANALYST = ?
    
    ...except I want that question mark to be replaced with the logged in username/userid, as shown in the top right corner.
    
    

    Use the bind variable syntax of the built-in APP_USER substitution string:


    SELECT * FROM PROJECTS WHERE TECH_LEAD = :APP_USER OR BUSINESS_ANALYST = :APP_USER

Answers

  • fac586
    fac586 Senior Technical Architect Member Posts: 21,232 Red Diamond
    edited May 22, 2014 2:10PM Answer ✓
    1721667 wrote:
    
    

    Please update your forum profile with a real handle instead of "1721667".

    This might seem like an obvious question to you guys here, but I've been Googling about this for a while now, and I just can't come up with specific enough keywords to point me in the right direction.
    
    Basically I'm creating a report region, built with a query that is reduceable to:
    
    SELECT * FROM PROJECTS WHERE TECH_LEAD = ? OR BUSINESS_ANALYST = ?
    
    ...except I want that question mark to be replaced with the logged in username/userid, as shown in the top right corner.
    
    

    Use the bind variable syntax of the built-in APP_USER substitution string:


    SELECT * FROM PROJECTS WHERE TECH_LEAD = :APP_USER OR BUSINESS_ANALYST = :APP_USER

  • GhanaApexDeveloper
    GhanaApexDeveloper Member Posts: 467 Silver Badge

    Hi,

    i suggest you look at this apex cheat sheet, has some valuable information concerning the basic nitty gritty of Oracle Apex

    Look up: Oracle Apex Cheat Sheet

    Thanks

    Benjamin.

    GhanaApexDeveloper
This discussion has been closed.