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 9002275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:32:56+00:00 2026-06-16T00:32:56+00:00

As you see below; how can I implement fx.ftf_validitystartdate= … this lines value since

  • 0

As you see below; how can I implement fx.ftf_validitystartdate= … this lines value since oracle does not allow me to do it like this below
.

    select * from  acc_accounts acc
    join kp_paramcore p on
    acc.account_no = p.accountnum
    acc.suffix = p.suffixc
         LEFT JOIN ftf_rates fx
              ON p.maturestart = fx.ftf_vadealtsinir
             AND p.maturefinish = fx.ftf_vadeustsinir
             AND fx.statusrec = 'A'
             AND fx.currencycode = acc.currencsw_kod
             AND fx.status= 'A' 
  and  fx.ftf_validitystartdate= (SELECT MAX(ff.ftf_validitystartdate)
                                               FROM ftf_rates ff
                                              WHERE ff.status = 'A'
                                                AND ff.statusrec = 'A'
                                                AND v_CurrentDate BETWEEN ff.systemstartdate AND ff.systemfinishdate                                            AND ff.currencycode = acc.currencsw_kod
    )
  • 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-16T00:32:57+00:00Added an answer on June 16, 2026 at 12:32 am

    I publish the workaround with CTE and tested only in Oracle 11g.

    To make test I create this schema:

    create table t_a ( a int );
    create table t_b ( a int);
    create table t_c ( a int);
    
    insert into t_a values (1);
    insert into t_a values (2);
    insert into t_a values (3);
    
    insert into t_b values (1);
    insert into t_b values (2);
    insert into t_b values (3);
    
    insert into t_c values (1);
    insert into t_c values (2);
    insert into t_c values (3);
    

    At this time I force error with this query:

    select * 
    from t_a
    left outer join t_b
      on t_a.a = t_b.a and
         t_b.a = ( select max( a )
                 from t_c);
    

    And now I rewrite query with CTE:

    with cte (a ) as (
       select a
       from t_b
       where t_b.a = ( select min( a )
                 from t_c)
    )
    select * 
    from t_a
    left outer join cte
      on t_a.a = cte.a;
    

    This second query returns right results.

    I rewrite your query with CTE:

    with CTE as (
       select * from ftf_rates 
       where ftf_validitystartdate= (SELECT MAX(ff.ftf_validitystartdate)
                                     FROM ftf_rates ff
                                     WHERE ff.status = 'A'
                                          AND ff.statusrec = 'A'
                                          AND v_CurrentDate BETWEEN ff.systemstartdate 
                                          AND ff.systemfinishdate                   
                                          AND ff.currencycode = acc.currencsw_kod )
    
    )
        select * from  acc_accounts acc
        join kp_paramcore p on
        acc.account_no = p.accountnum
        acc.suffix = p.suffixc
             LEFT JOIN CTE fx
                  ON p.maturestart = fx.ftf_vadealtsinir
                 AND p.maturefinish = fx.ftf_vadeustsinir
                 AND fx.statusrec = 'A'
                 AND fx.currencycode = acc.currencsw_kod
                 AND fx.status= 'A' 
    

    Notice, only tested in Oracle 11g. See @a_horse_with_no_name coment:

    @danihp: CTEs were available long before Oracle 11g (I think they were
    introducted in 9.1 maybe even earlier – but they are definitely
    available in 10.x). 11.2 introduced recursive CTEs which is not needed
    in this case. –

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

Sidebar

Related Questions

Trying not to lose it here. As you can see below I have assigned
I see below code in this link : An elegant way to implement INotifyPropertyChanged
As you can see below, I have Parallel.For loop. If run the program while
I'm using graphviz (dot) to generate the graph you can see below. The node
I have two async classes in my application which you can see below class
In my application I have an edit profile page which you can see below;
i have a pretty complicated form. as you can see below: alt text http://img9.imageshack.us/img9/2465/test2xk.jpg
How can I define a width for the label Quantity (see below)? I would
I have a SOAP message (see below). Using Xpath, how can I extract the
as you can see the class below declares 2 private instance variables and 2

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.