INVALID IDENTIFIER error in the statement ON

I have problems with this SELECT statement in a report with the search items. The item sought in Question matches the string "Email". Any activity record that 'Email' in the field of the activity_type must be selected. The line of code is:

Select user_name, total of (select user_name, count (*) total from eba_ver2_cust_activity where activity_type = group e-mail user_name)
order by 2 desc, desc 2

There are some substitutions here. The 'Email' value is: P23_ACTIVITY_TYPE on the page.

The error I get is:

Failed to parse the SQL query:
ORA-00904: "EMAIL": invalid identifier

The problem is that the string constant is interpreted as an identifier name. Some sbustitutions are made to the general SELECT statement that fails. The relevant part of the code generating the wrong SELECTION is:

If: P23_ACTIVITY_TYPE! = 'null' and: P23_ACTIVITY_TYPE is not null then
If: P23_START_DATE is not null or: P23_END_DATE is not null then
l_sql: = l_sql | "and activity_type_id = ' |: P23_ACTIVITY_TYPE;"
on the other
l_sql: = l_sql | "where activity_type_id = ' |: P23_ACTIVITY_TYPE;
end if;

Anyway, the content of: P23_ACTIVITY_TYPE are treated as means of identification instead of a string. Help, please.

Steve "n00b" to Raleigh NC

Hi Steve,.

COBOL! If you've actually seen the real life before dinosaurs? ;) They still teach the last College I've heard...

What is the error you see? It can be as Tony said above, that you do not close your last statement. Here is what should look like this block of code:

if :P23_ACTIVITY_TYPE != '%null%' and :P23_ACTIVITY_TYPE is not null then
if :P23_START_DATE is not null or :P23_END_DATE is not null then
l_sql := l_sql || ' and activity_type_id = ''' || :P23_ACTIVITY_TYPE || '''';
else
l_sql := l_sql || ' where activity_type_id = ''' || :P23_ACTIVITY_TYPE || '''';
end if;
end if;

Note This is a series of simple "quotes.

Aaron

Tags: Database

Similar Questions

  • Invalid identifier error using UNION ALL?

    Can someone tell me why it gives me the error: ORA-00904: "Wait_time": invalid identifier.

    It must be something with the UNION ALL because it works fine if I have only one query at a time.

    Thank you
    Deanna



    Select wait_time | ' Minutes.' | «, » || COUNTY (wait_time) under the name of "0 to 10 Min, COUNT"
    Of MOTOR_ASSIST2
    WHERE the wait_time BETWEEN 0 AND 10 and ((: p53_fiscal_yr IS NULL))
    GOLD: p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), "YYYY"))
    OR (: p53_month IS NULL or: P53_month = TO_CHAR (DATETIME, 'MM'))
    (AND (: p53_year IS NULL or: p53_year = TO_CHAR (DATETIME, 'YYYY')))

    UNION ALL

    Select wait_time | ' Minutes.' | «, » || COUNTY (wait_time) under the name of "11-30 Min, COUNT.
    Of MOTOR_ASSIST2
    where wait_time BETWEEN 11 AND 30 and ((: p53_fiscal_yr IS NULL))
    GOLD: p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), "YYYY"))
    OR (: p53_month IS NULL or: P53_month = TO_CHAR (DATETIME, 'MM'))
    (AND (: p53_year IS NULL or: p53_year = TO_CHAR (DATETIME, 'YYYY')))

    UNION ALL

    Select wait_time | ' Minutes.' | «, » || COUNTY (wait_time) under the name of "31-60 Min, COUNT.
    of MOTOR_ASSIST2
    where wait_time BETWEEN 31 AND 60 and ((: p53_fiscal_yr IS NULL))
    GOLD: p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), "YYYY"))
    OR (: p53_month IS NULL or: P53_month = TO_CHAR (DATETIME, 'MM'))
    (AND (: p53_year IS NULL or: p53_year = TO_CHAR (DATETIME, 'YYYY')))

    UNION ALL

    Select wait_time | ' Minutes.' | «, » || (WAIT_TIME) count as '61 Min + COUNT.
    of MOTOR_ASSIST2
    where wait_time BETWEEN 61 AND 1000 and ((: p53_fiscal_yr IS NULL))
    GOLD: p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), "YYYY"))
    OR (: p53_month IS NULL or: P53_month = TO_CHAR (DATETIME, 'MM'))
    (AND (: p53_year IS NULL or: p53_year = TO_CHAR (DATETIME, 'YYYY')))


    WAIT_TIME GROUP
    ORDER BY WAIT_TIME;

    And if you want to be really want...

    SQL> ed
    Wrote file afiedt.buf
    
      1  WITH c1 as (select row_number() over (order by sal) as rn
      2                    ,SAL||':'||COUNT(*) "SAL0-999"
      3              from emp
      4              where sal between 0 and 999
      5              group by sal)
      6      ,c2 as (select row_number() over (order by sal) as rn
      7                    ,SAL||':'||COUNT(*) "SAL1000-1999"
      8              from emp
      9              where sal between 1000 and 1999
     10              group by sal)
     11      ,c3 as (select row_number() over (order by sal) as rn
     12                    ,SAL||':'||COUNT(*) "SAL2000-2999"
     13              from emp
     14              where sal between 2000 and 2999
     15              group by sal)
     16      ,c4 as (select row_number() over (order by sal) as rn
     17                    ,SAL||':'||COUNT(*) "SAL3000-3999"
     18              from emp
     19              where sal between 3000 and 3999
     20              group by sal)
     21      ,c5 as (select row_number() over (order by sal) as rn
     22                    ,SAL||':'||COUNT(*) "SAL4000+"
     23              from emp
     24              where sal >= 4000
     25              group by sal)
     26  select "SAL0-999", "SAL1000-1999", "SAL2000-2999", "SAL3000-3999", "SAL4000+"
     27  from c1 FULL OUTER JOIN c2 ON (c2.rn = c1.rn)
     28          FULL OUTER JOIN c3 ON (c3.rn = COALESCE(c1.rn, c2.rn))
     29          FULL OUTER JOIN c4 ON (c4.rn = COALESCE(c1.rn, c2.rn, c3.rn))
     30          FULL OUTER JOIN c5 ON (c5.rn = COALESCE(c1.rn, c2.rn, c3.rn, c4.rn))
     31* order by 1,2,3,4,5
    SQL> /
    
    SAL0-999       SAL1000-1999   SAL2000-2999   SAL3000-3999   SAL4000+
    -------------- -------------- -------------- -------------- --------------
    800:1          1100:1         2450:1         3000:2         5000:1
    950:1          1250:2         2850:1
                   1300:1         2975:1
                   1500:1
                   1600:1
    
    SQL>
    

    Published by: BluShadow on November 7, 2008 15:47
    Elimination of unnecessary case statements

  • "ORA-00904 of invalid identifier", what's the problem?

    Hey,.

    I am trying to create very basic (via Script Editor) 4 tables in Application Express 4.1.0.00.32 and get this error and cannot understand why. If anyone can point out where I am going wrong would be perfect!

    Here's the script:

    ----------

    Drop TABLE County CASCADE CONSTRAINTS ;

    Drop TABLE City CASCADE CONSTRAINTS ;

    Drop TABLE Offence CASCADE CONSTRAINTS ;

    Drop TABLE Region CASCADE CONSTRAINTS ;


    CREATE TABLE County (

    PRIMARY County_Name VARCHAR2()55) KEY

        Rental VARCHAR2 (55) ,

        Details VARCHAR2 (222) );


    CREATE TABLE Offence (

        Offence_ID NUMBER (3) PRIMARY KEY ,

    Offence_Desc VARCHAR2()333)

    Offence_Type VARCHAR2()111() NOT NULL

        Date DATE NOT NULL ,

        Time NUMBER (5) ,

    County_Name VARCHAR2()55( ) REFERENCES County()County_Name)

    City_Name VARCHAR2()55( ) REFERENCES City()short-term()

    Region_Name VARCHAR2()55( ) REFERENCES region()rated()()


    CREATE TABLE City (

    County_Name VARCHAR2()55( ) REFERENCES County()County_Name)

    PRIMARY City_Name VARCHAR2()55) KEY

        PostCode VARCHAR (8) NOT NULL ,

        House # NUMBER (3) NOT NULL ,

        Street VARCHAR2 (55) ,

        Town VARCHAR2 (55) ,

        Building_Name VARCHAR2 (55) );

    CREATE TABLE Region (

    PRIMARY Region_Name VARCHAR2()55) KEY

        City VARCHAR2 (55) NOT NULL ,

        Est_Population NUMBER (9) NOT NULL );

    -----------


    The error I get in the summary when I run the script is:

    6 «»0.00CREATE TABLE offence (Offence_ID NUMBER PRIMARY KEY (3),)"ORA-00904: invalid identifier.

    So I guess it's related to the "Offence_ID" line (designed as the primary key / identifier), but I don't see a problem.

    Any help is greatly appreciated!

    The DATE is an Oracle reserved word.

    Oracle reserved words and keywords

    SQL > create table test_tbl

    () 2

    3 date default sysdate

    4  );

    date default sysdate

    *

    ERROR at line 3:

    ORA-00904: invalid identifier

    SQL > create table test_tbl

    () 2

    3 'DATE' date default sysdate

    4  );

    Table created.

    I wouldn't recommend do not name your DATE column, but to use something like Offence_date instead.

  • Connect-VIServer throws the invalid URI error in the Studio of Powershell, but is very well outdoors

    I don't know if it's a problem of Powershell Studio 2014 or PowerCLI, but other people have reported the "invalid URI: the hostname could not be parsed" error, so I'll start here.

    I have a PowerCLI 5.0.1 on Windows 7, Powershell v2.0 and Powershell Studio 2014.

    In my script, when I run the Connect-VIServer-Server $server command, the command fails and generates the invalid URI error.  However, when I run my script in the command window PowerCLI, the script works fine.

    I guess I have a problem of environment in the Studio of Powershell, but wonder what circumstances causes PowerCLI to raise this error.

    So far, I have not had much luck with Studio 2014 Powershell and PowerCLI, don't know if it's powershell v2.0 or something else.

    It looks like a Studio of Powershell environment problem.

    I have many ps1 files and use the point of supply to load the files ps1 in support which includes the call to connect-VIServer.  When I put the connect-VIServer in the file main ps1 I can connect to my vCenter, but when I put in the origin file, I cannot connect, nor can fact the fitting of test-work order.

    Thanks for the help.

  • Internet subnet mask is invalid - RVS4000 - error on the wan configuration

    Hi, I am trying to configure my RVS4000 to have access to the internet and get this error.

    I have my DSL ISP (585v7 - latest firmware bethere.co.uk) modem set to bridge mode and the internet connection is up (under the lights).

    I then plugged my RVS4000 him and through the browser interface management I try to configure my static IP using my allocated (and proven - I use them now on a router netgear & modem) Details.

    I'm going to 'wan configuration' and choose 'Type of 'static IP' Internet connection' and then enter my known IP, subnet mask, gateway by default and DNS details and as soon as I select 'save' I get the error "Internet subnet is invalid. (Please enter again". To avoid a problem with browser field validation, I tried this in IE and Safari.

    Can someone point me in the right direction please? It seems such a simple thing but I can't make it work / accept the correct values.

    Thank you!

    Post edited by: stu_malt1

    Well, I finally got your TIFF files, and noticed something really weird...

    You have your subnet mask shown in the screenshot for the RVS4000 as 225.225.240.0.

    This is an incorrect subnet mask. Did you mean to put something in the direction of 255.255.240.0?

  • We get a "invalid number" error when the Xref database of fill

    Hi all

    My table (XREF_DATA) target has the following parameters and its respective data types: -.

    XREF_TABLE_NAME
    XREF_COLUMN_NAME
    ROW_NUMBER
    VALUE
    IS_DELETED
    LAST_MODIFIED
    LAST_ACCESSED

    All are varchar2

    But when I am executing the interface and observing the results then this error pops up:-1722: 42000: java.sql.SQLException: ORA-01722: invalid number to the stadium
    Insert flow I$ Table(I$_XREF_DATA)

    I used CKM, LKMSql for Oracle and the incremental update of the IKM Oracle)


    My target table has all the varchar2 data type, then why it gives this error number invalid?



    Kind regards
    Sourav

    Hello

    You can copy the SQL code generated by ODI (for the stage which gives this error) and then try to run it through any SQL client like toad / developer sql etc.
    This will help you find erroneous data.

    Also is LAST_MODIFIED and LAST_ACCESSED have as VARCHAR2 data type? The name it seems that it is lying do DATE.

    Thank you
    Fati

  • error with the statement

    Hello I have a few errors here:
    Statement = connect.createStatement ();
    resultSet = statement.executeQuery ("SELECT * FROM DEMO.info");

    the first line:
    cannot find symbol
    symbol: executeQuery (java.lang.String) method
    location: java.beans.Statement of the class

    the other is:
    cannot find symbol
    symbol: executeQuery (java.lang.String) method
    location: java.beans.Statement of the class

    My imports are:
    import java.beans.Statement;
    import java.sql.Connection;
    to import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;

    Thanks for the help

    symbol: executeQuery (java.lang.String) method
    location: java.beans.Statement of the class

    You import the erroneous statement. Should be java.sql.Statement.

  • My incoming mail 'outlook' works very well; However, the outgoing never pass. I get an error with the State report. What gives?

    My "Outlook" or "Outlook Express" never seems to complete an outgoing message.  I get very well.  When I try to send, there is an error message.  What gives?

    Hi BrendaJones,

    1. What is the exact error message you get?

    I suggest you try the steps from the following link and see if that helps.

    Troubleshooting error messages that you receive when you try to send and receive e-mail in Outlook and Outlook Express
    http://support.Microsoft.com/kb/813514

  • -You also get an invalid identifier error when executing this query sql for a data model, but not in TOAD/SQL Developer?

    Hello OTN.

    I don't understand why my sql query will pass by in the data model of the BI Publisher. I created a new data model, chose the data source and type of Standard SQL = SQL. I tried several databases and all the same error in BI Publisher, but the application works well in TOAD / SQL Developer. So, I think it might be something with my case so I'm tender hand to you to try and let me know if you get the same result as me.

    The query is:

    SELECT to_char (to_date ('15-' |)) TO_CHAR(:P_MONTH) | » -'|| (To_char(:P_YEAR), "YYYY-DD-MONTH") - 90, "YYYYMM") as yrmth FROM DUAL


    Values of the variable:

    : P_MONTH = APRIL

    : P_YEAR = 2015

    I tried multiple variations and not had much luck. Here are the other options I've tried:

    WITH DATES AS

    (

    Select TO_NUMBER (decode (: P_MONTH, 'JANUARY', '01',))

    'FEBRUARY', '02',.

    'MARCH', '03'.

    'APRIL', '04'

    'MAY', '05'.

    'JUNE', '06'.

    'JULY', '07',.

    'AUGUST', '08'.

    'SEPTEMBER', '09'.

    'OCTOBER', '10',.

    'NOVEMBER', '11'.

    "DECEMBER", "12."

    '01')) as mth_nbr

    of the double

    )

    SELECT to_char (to_date ('15-' |)) MTH_NBR | » -'|| (TO_CHAR(:P_YEAR), 'DD-MM-YYYY') - 90, "YYYYMM")

    OF DATES

    SELECT to_char (to_date ('15-' |: P_MONTH |)) » -'|| ((: P_YEAR, 'MONTH-DD-YYYY')-90, "YYYYMM") as yrmth FROM DUAL

    I'm running out of ideas and I don't know why it does not work. If anyone has any suggestions or ideas, please let me know. I always mark answers correct and useful in my thread and I appreciate all your help.

    Best regards

    -Konrad

    So I thought to it. It seems that there is a bug/lag between the guest screen that appears when you enter SQL in the data model and parameter values, to at model/value data.

    Here's how I solved my problem.

    I have created a new data model and first created all my settings required in the data model (including the default values without quotes, i.e. APRIL instead "Of APRIL") and then saved.

    Then I stuck my sql query in the data model and when I clicked ok, I entered my string values in the message box with single quotes (i.e. "in APRIL' instead of APRIL)

    After entering the values of string with single quotes in the dialog box, I was able to retrieve the columns in the data model and save.

    In the data tab, is no longer, I had to enter the values in single quotes, but entered values normally instead, and the code worked.

    It seems the box prompted to bind the values of the variables when the SQL text in a data model expects strings to be wrapped in single quotes, but no where else. It's a big headache for me, but I'm glad that I solved it, and I hope this can be of help to other institutions.

    See you soon.

  • SQL invalid identifier error

    Hello

    I have a table in my database, when I use
    Select * from table_name; It gives me results

    If I use

    Select nom_de_colonne from table_name;

    It gives me column-name is not a valid identifier.

    I don't know I'm not the typos on column_name, any thoughts on what could be the problem

    Thank you

    Someone made the unfortunate decision to use quotes around column names when the table was created, and so the column name is in different cases. You must use now for always the quotes around the name of column

    Select 'Sex' of the trial;

  • DIAG [37000] [Microsoft] [ODBC Microsoft Access driver] syntax error in the statement CREATE TABLE

    Dear Experts,
    We work with software that uses the database (excel / access / SQL / Oracle) via the windows ODBC drivers. He can't go to the database. here below you can see the ODBC log:

    LFM 1178-1204 OUT SQLAllocHandle with code 0 (SQL_SUCCESS) back
    SQLSMALLINT 2
    SQLHANDLE 0X06CC1F48
    SQLHANDLE * 0X0C460BCC (0X05D3AC30)

    LFM 1178-1204 ENTER SQLDriverConnectW
    HDBC 0X05D3AC30
    HWND 0X00000000
    WCHAR * 0X64CD8B34-[3] "*-0.
    SWORD                       -3
    WCHAR * 0X64CD8B34
    SWORD                       -3
    SWORD * 0X00000000
    UWORD                        0

    LFM 1178-1204 DATED SQLDriverConnectW code 0 (SQL_SUCCESS) back
    HDBC 0X05D3AC30
    HWND 0X00000000
    WCHAR * 0X64CD8B34-[3] "*-0.
    SWORD                       -3
    WCHAR * 0x64CD8B34 -[3]
    SWORD                       -3
    SWORD * 0X00000000
    UWORD                        0

    Understand that if someone can help?
    Thank you
    Hassan

    Hassan

    This issue is beyond the scope of this site and should be asked on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Error with the States of the slide show button

    When I write my website, buttons 'previous' and 'next' are not transparant in normal mode that I conceived in Muse. They should only be visible when you flipping. Even then, they should be 70% transparant. What can I do about it?

    Schermafbeelding 2015-03-19 om 11.28.08.pngSchermafbeelding 2015-03-19 om 11.28.22.png

    Please check the active status for content and then make changes.

    Thank you

    Sanjit

  • ORA-00904: "A". "" LVCI_ISSUEDATE ": invalid identifier

    Hello

    I get (ORA-00904: "A".) ("' LVCI_ISSUEDATE ': invalid identifier) error for the following query...

    SELECT A.lvci_issuedate, A.lvci_lotno, (SELECT B.cot_desc FROM tb_lvm_cottondesc B
    WHERE B.cot_seqno_pk = A.lvci_cottonno) AS cotton.
    A.lvci_nbales, (SELECT C.lvcr_rate FROM tb_lvm_cottonreceipt C WHERE C.lvcr_cottonno = A.lvci_cottonno
    AND C.lvcr_invdate = (SELECT MAX (lvcr_invdate) FROM (SELECT D.lvcr_invdate FROM tb_lvm_cottonreceipt D.lvcr_invdate D WHERE < A.lvci_issuedate))) AS RATE, A.lvci_weight, A.lvci_issuedate tb_lvm_cottonissue A.lvci_issuedate A WHERE BETWEEN to_date (January 12, 2008 ', ' dd/mm/yyyy') AND to_date (June 12, 2008 ', ' dd/mm/yyyy')

    I use Oracle 9i.

    Could you give me solution to this problem? What's not in my sql query?

    Hi psram.

    First bad thing, it's that you format your query in order to make it readable.

    SELECT A.lvci_issuedate
         , A.lvci_lotno
         , (SELECT B.cot_desc
              FROM tb_lvm_cottondesc B
             WHERE B.cot_seqno_pk = A.lvci_cottonno) AS cotton
         , A.lvci_nbales
         , (SELECT C.lvcr_rate
              FROM tb_lvm_cottonreceipt C
             WHERE C.lvcr_cottonno = A.lvci_cottonno
               AND C.lvcr_invdate = (SELECT MAX(lvcr_invdate)
                                       FROM (SELECT D.lvcr_invdate
                                               FROM tb_lvm_cottonreceipt D
                                              WHERE D.lvcr_invdate < *A.lvci_issuedate*))) AS RATE
         , A.lvci_weight
         , A.lvci_issuedate
      FROM tb_lvm_cottonissue A
     WHERE A.lvci_issuedate BETWEEN to_date('01/12/2008', 'dd/mm/yyyy')
                                AND to_date('06/12/2008', 'dd/mm/yyyy');
    

    Then it is nested too deep, I think it's the same thing:

    SELECT A.lvci_issuedate
         , A.lvci_lotno
         , (SELECT B.cot_desc
              FROM tb_lvm_cottondesc B
             WHERE B.cot_seqno_pk = A.lvci_cottonno) AS cotton
         , A.lvci_nbales
         , (SELECT C.lvcr_rate
              FROM tb_lvm_cottonreceipt C
             WHERE C.lvcr_cottonno = A.lvci_cottonno
               AND C.lvcr_invdate = (SELECT MAX(lvcr_invdate)
                                       FROM tb_lvm_cottonreceipt D
                                      WHERE D.lvcr_invdate < A.lvci_issuedate)) AS RATE
         , A.lvci_weight
         , A.lvci_issuedate
      FROM tb_lvm_cottonissue A
     WHERE A.lvci_issuedate BETWEEN to_date('01/12/2008', 'dd/mm/yyyy')
                                AND to_date('06/12/2008', 'dd/mm/yyyy');
    

    Try, but I thing it is always nested deep

    Concerning
    Peter

  • Apps BI - workflow task has received the error "invalid identifier".

    Hi all

    I'm loading acreage subject of projects using the client CAD for 11.5.10 container. And my Oracle EBS 11.5.10 only data source. Few of the workflow tasks failed. For example: "SDE_ORA_TaksDimension." When I checked the logs of session, its display like "ORA-00904 'PA_PROJ_ELEMENT_VERSIONS'." FINANCIAL_TASK_FLAG ': invalid identifier "error of a few paintings of projects (PA). I checked in the database to Oracle 11.5.10 and noticed that the column (FINANCIAL_TASK_FLAG) itself is not there in the table (PA_PROJ_ELEMENT_VERSIONS).
    I also checked SDE_ORA_TaksDimension in "SDE_ORA11510_Adaptor" mapping in the table PA_PROJ_ELEMENT_VERSIONS Design, Informatica PowerCenter Workflow is to have the column with "FINANCIAL_TASK_FLAG".

    In other words, there are some differences between available "SDE_ORA11510_Adaptor" and Oracle EBS 11.5.10 database. Could someone please help me or guide me to solve this problem?

    Thank you
    Harish Nunn

    This is probably because you do not have the PRE REQUISIUTE following for PROJECT ANALYTICS for 11.5.10:

    requires the Family Pack M (11i. PJ_PF. (M) to be applied to Oracle eBusiness Suite 11.5.10.

    You need to run the analytical project.

    Check the answer as CORRECT

  • Get the error invalid identifier in the left outer join

    I wrote a query and get the invalid identifier error during execution:
    the exact error is: ORA-00904: "D". "" ACCT_NO ": invalid identifier
    This query is not able to access the parent table alias in the subquery of the left outer join.

    This is the query:
    SELECT D.PROD_DESC_TX, BASE. ASSET_NUM, BASE. PROD_ID, BASE.NAME
    OF TABLE1 D
    LEFT OUTER JOIN
    (
    SELECT ASSET_NUM, PROD_ID, B.SID
    FROM TABLE2 E
    JOIN IN-HOUSE TABLE3 HAS IT E.PROD_ID = A.ROW_ID
    JOIN INTERNAL TABLE 4 C ON A.PAR_PROD_INT_ID = C.ROW_ID
    INTERNAL TABLE5 JOIN B ON C.ROW_ID = B.PAR_ROW_ID
    AND B.TYPE = 'VALUE '.
    AND B.NAME = 'VALUE '.
    WHERE E.ASSET_NUM = ((CASE WHEN LTRIM (RTRIM (D.BANK_NO)) = '021 ' THEN '021' ELSE ' 020' END) |) LTRIM (RTRIM (D.APPL_CD)). LTRIM (RTRIM (D.ACCT_NO)))
    ) BASE ON ((CASE WHEN LTRIM (RTRIM (D.BANK_NO)) = '021 ' THEN '021' ELSE ' 020' END) |) LTRIM (RTRIM (D.APPL_CD)). LTRIM (RTRIM (D.ACCT_NO))) = BASE. ASSET_NUM
    WHERE D.BANK_NO = 'VALUE '.
    AND D.APPL_CD = 'VALUE '.
    AND D.ACCT_NO = 'VALUE '.

    Edited by: user648525 13 Sep, 2011 01:21

    I can easily look at your request at this time (using my iPhone on a train).

    But trying out this line in the WHERE (the one with the invalid reference) clause in the main query.

    Who is... in the view of inline, use only the logic of the join (the clauses).

    Overflow the filtering logic (WHERE clause) to the main request. You may need to select some additional inline view columns to make these references work.

Maybe you are looking for