Results 1 to 2 of 2

Thread: create view

  1. #1
    Join Date
    Nov 2008
    Posts
    26

    Question Unanswered: create view

    hi i am creating batch file for creating view

    the view is created on user1 schema and tables used for creating view is on user2 schema.

    iam getiing error

    SP2-0734: unknown command beginning "from LIFEC..." - rest of line ignored.
    SP2-0734: unknown command beginning "where cln..." - rest of line ignored.
    SP2-0734: unknown command beginning "clnt.CLIEN..." - rest of line ignored.
    clnt.SALUTATION||' '||clnt.GIVENNAME||' '||clnt.SURNAME as NAME
    *
    ERROR at line 13:
    ORA-00923: FROM keyword not found where expected


    No errors.

    how can i resolve this error with sp2-0734????

    this is my batch file




    spool btsviews.log

    set scan off;

    CREATE OR REPLACE VIEW VW_LETTERTEMPLATE AS
    select clnt.SALUTATION,clnt.GIVENNAME,clnt.SURNAME ,detl.ADDRESSLINE1,detl.ADDRESSLINE2,detl.ADDRESSL INE3,
    detl.ADDRESSLINE4,detl.ADDRESSLINE5,(select DESCRIPTION from LIFECONNECT.m_ps_letterinfo
    where LIFECONNECT.m_ps_letterinfo.CLIENTID=clnt.clientid AND CREATEDDATE IN
    (SELECT MAX(CREATEDDATE) FROM LIFECONNECT.M_PS_LETTERINFO) ) as "DESCRIPTION" ,
    PINCODE ,PHONENO1,clnt.CLIENTID,(select NVL(max(CREATEDDATE),SYSDATE) from LIFECONNECT.m_ps_letterinfo
    where LIFECONNECT.m_ps_letterinfo.CLIENTID=clnt.clientid and SERREQSTATUS='M' ) as printdate,
    policy.ASSIGNEENAME,policy.ECSSTATUS,policy.HISSDA TE,policy.MAKERDATE,
    policy.MAKERID,policy.MODEOFPAYMENT,policy.CLIENTI D AS OWNERNAME ,policy.PLANNAME,
    policy.POLICYID AS POLICYNO,policy.POLICYSTATUS,policy.PREMIUMAMOUNT,
    policy.PREMIUMSTATUS,policy.PTDATE,policy.RENEWPRE MDUEDATE,
    policy.TIMESTAMP,clnt.clientid as updatedclient,policy.POLICYID AS updatedPOLICYNO,
    clnt.SALUTATION||' '||clnt.GIVENNAME||' '||clnt.SURNAME as NAME


    from LIFECONNECT.M_ONLINE_CLIENTINFO clnt,LIFECONNECT.M_ONLINE_CLNT_ADD_DETL detl,LIFECONNECT.M_PS_POLICYINFO policy

    where clnt.CLIENTID=detl.CLIENTID AND
    clnt.CLIENTID=policy.CLIENTID;

    /
    SHOW ERRORS;

    spool off

    exit;

  2. #2
    Join Date
    Mar 2007
    Posts
    623
    Remove the empty lines inside the CREATE VIEW Statement. As you can see in the error messages, the client treats its parts after empty lines as separate statements.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •