Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    57

    Unanswered: can't create VIEW. HELP!

    ok, i've been trying this for hours now and i keep getting errors. here is my scripts for creating the VIEW in PL/SQL. if i do it with double-quotes like this:


    SQL> CREATE VIEW
    2 "MY_ADDSTUDENTTARGET" ("DEMOGRAPHICID","ETHNICITYID","REFERRERID","DEMOG RAPHICSTUDENTID","ACADE
    MICYEARID","DOB","EMAIL","FNAME","HOMEADDRESS1","H OMEADDRESS2","HOMECITY","HOMECOUNTRY","HOMEPOST","
    HOMESTATE","LNAME","MAILINGADDRESS1","MAILINGADDRE SS2","MAILINGCITY","MAILINGCOUNTRY","MAILINGPOST" ,
    "MAILINGSTATE","MNAME","PHONE1","SEX","SSN","STUDE NTSTATUS","STUDENTTYPE","SUPPCOLLEGEID","CURRENTOU
    ","MAJORID","OUSTUDENTTYPE","VA","SUPPHSID","HOMEH S","HSADDR1","HSADDR2","HSCITY","HSSTATE","HSPO ST"
    ,"HSPHONE","LOGINID","STUDENTACCOUNTID", "ACCOUNTID", "ACCOUNTSTUDENTID")
    3 AS
    4 SELECT DEMOGRAPHIC.DEMOGRAPHICID, DEMOGRAPHIC.ETHNICITYID, DEMOGRAPHIC.REFERRERID, DEMOGRAPHIC.
    STUDENTID, STUDENT.ACADEMICYEARID, STUDENT.DOB, STUDENT.EMAIL, STUDENT.FNAME, STUDENT.HOMEADDRESS1,S
    TUDENT.HOMEADDRESS2, STUDENT.HOMECITY, STUDENT.HOMECOUNTRY, STUDENT.HOMEPOST, STUDENT.HOMESTATE, STU
    DENT.LNAME, STUDENT.MAILINGADDRESS1, STUDENT.MAILINGADDRESS2, STUDENT.MAILINGCITY, STUDENT.MAILINGCO
    UNTRY, STUDENT.MAILINGPOST, STUDENT.MAILINGSTATE, STUDENT.MNAME, STUDENT.PHONE1, STUDENT.SEX, STUDEN
    T.SSN, STUDENT.STUDENTSTATUS, STUDENT.STUDENTTYPE, SUPPCOLLEGE.SUPPCOLLEGEID, SUPPCOLLEGE.CURRENTOU,
    SUPPCOLLEGE.MAJORID, SUPPCOLLEGE.OUSTUDENTTYPE, SUPPCOLLEGE.VA, SUPPHS.SUPPHSID, SUPPHS.HOMEHS, SUP
    PHS.HSADDR1, SUPPHS.HSADDR2, SUPPHS.HSCITY, SUPPHS.HSSTATE, SUPPHS.HSPOST, SUPPHS.HSPHONE, STUDENT.L
    OGINID, STUDENTACCOUNT.STUDENTACCOUNTID, STUDENTACCOUNT.ACCOUNTID, STUDENTACCOUNT.STUDENTID
    5 FROM DEMOGRAPHIC, STUDENT, SUPPCOLLEGE, SUPPHS, STUDENTACCOUNT;

    i get the followimg error: "MY_ADDSTUDENTTARGET" ("DEMOGRAPHICID","ETHNICITYID","REFERRERID","DEMOG RAPHICSTUDENTID","ACADEMICYE

    ERROR at line 2:
    ORA-00972: identifier is too long


    if i do it without the quotes around the VIEW name and column names, i get this error: MICYEARID,DOB,EMAIL,FNAME,HOMEADDRESS1,HOMEADDRESS 2,HOMECITY,HOMECOUNTRY,HOMEPOST,
    *
    ERROR at line 3:
    ORA-00907: missing right parenthesis

    help, i don't know what to do.
    thanks.

    system: WinXP, Oracle8i

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    Each column name has a limit of 30 characters from SQL / PLSQL.

    "SESTUDENTACCOUNT.STUDENTACCOUNTID"
    Last edited by r123456; 12-05-03 at 20:39.
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Oct 2003
    Posts
    57
    well, i got rid of that really long column name (31 chars), but i am still getting the same error. any ideas?

  4. #4
    Join Date
    Oct 2003
    Posts
    57
    never mind, i figured it out. apparently, there is a command line string limit in pl/sql. you learn something new every day i guess.

Posting Permissions

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