New Column Breaking Existing PLSQL

My PLSQL contains many statements like this:
DECLARE
data NUMBER;
BEGIN
SELECT .. FROM ... WHERE col1=data;
END;
where col1 is a column name and 'data' is a variable named without the v_ convention. And this is the problem. If I add a new column called 'data', the above code will break since 'data' is now interpreted as the name of a column.
Are there any ways to guard against this error when adding new columns? I don't know how the existing code name the variables, and it is practically not possible to inspect all existing code manually.

In that case, give the column a name that is hard to appear as a variable in your code:
something like <TABLE_NAME>$<COLUMN_NAME> for your new column:
SQL> alter table emp add (emp$data number) ;
Table altered.
SQL> desc emp
Name                                      Null?    Type
EMPNO                                     NOT NULL NUMBER(4)
ENAME                                              VARCHAR2(10)
JOB                                                VARCHAR2(9)
MGR                                                NUMBER(4)
HIREDATE                                           DATE
SAL                                                NUMBER(7,2)
COMM                                               NUMBER(7,2)
DEPTNO                                             NUMBER(2)
EMP$DATA NUMBER
SQL>

Similar Messages

  • Creating new column in existing pdf doc

    I am trying to add a new column with some CFif content into a pdf doc that is already created. the original pdf doc contains a table PropertyDetails_T with columns such as 1st column : 'customer name' 2nd col : 'no. of. vehicles' 3rd column : 'area of farmland'. I have to insert a new column between 1st and 2nd.
    i am using dreamweaver. in design mode i inserted columns to right of 1st column and added the column name "area of property".
    Next i include CFif lines in code mode as given below :
    <cfif getPropertyDetails_T.areaofProperty NOT EQUAL "">
    <td> #NumberFormat (getPropertyDetails_T.areaofProperty,"_______.__")#</td>
    <cfelse>
    <td>0.00</td>
    </cfif>
    but after writing these lines and saving, the table in design mode has been messed up. i see that CFif content of 'no.of vehicles' has been moved to the next column 'area of farmland'. i have the new Cfif content - <cfif getPropertyDetails_T.areaofProperty NOT EQUAL "">
    <td> #NumberFormat (getPropertyDetails_T.areaofProperty,"_______.__")#</td>
    where it should be that is 'area of property' column.
    But i see that value '0.00' has been diplayed below the column 'no.of vehicles' instead of the CFif content that was previously added to it and is now pushed to next column.
    does anyone have pointers as to how i could correctly apply indentation or code it right to align the right column to the right CFif contents.
    thnx,
    sachinpol

    dear john.
    SDK Version 6.5
    I wish add on new column in existing matrix to Batch Transaction Report.
    what i doing?
    I'm sorry.
    Give me a source please.
    email : [email protected] <== source please.
    Message was edited by: kim sung bum

  • SharePoint 2013 unable to create new column with existing column name

    Hi Support,
    I'm currently having a problem in creating my first custom list in my SharePoint site. When I tried to create a new columns with existing name,  e. g "date reported" = Date/Time , "Due Date" =
    Date/Time 
    It's prompt the error like this " The page at sharepoint.itechdomain.com says: The Column name that you entered is already in use or reserved. Choose another name." I've read some forum, someone say's they need javascript command
    to fixs the problem. If these the solution for my problem, I'm not familiar on how to used javascript in my sharepoint. 
    Kindly help me how to fixs my problem as soon as possible.
    Your comment or any suggestion would be greatly appreciated.
    Thank you 
    Best Regards,
    Bishelp

    I already tried this procedure, but it doesn't work. Still the prompt says " The
    Column name that you entered is already in use or reserved. Choose another name". Is there any solution for this kind of problem?
    Let me know, 
    Thank you

  • HOW TO ADD NEW COLUMN IN EXISTING QUERY

    hi,
    i m working on oracle reorts 10g. i have a multiple query based report. now i want to add a new column in query 1 and order by on that new column .
    i added column in query but when i see that group i dont find that column in that group.wt do i need to do to visible that column in query1 group thats y the order by on that column is not working i think.
    tell how to solve it ?
    thanks

    Hi,
    The new column you have added might be in the least level group of that query.
    Drag it to the desired group level, first postion and set the break order for that item in the property pallette..
    (If still the item not coming, check whether you have put 'comma' in the select query after writing the column name)
    Simply giving the column in the order-by clause will not work in report.
    In Report, record display order is completely based on the break-order of the items given in query-groups
    If you change accordingly it will work
    Regards
    Dora

  • Best approach to publish new table or new column on existing table on MDW?

    Hi,
    I'm refering to Olite R3 without any patches. I don't use Java API, I use MDW.
    if I have a new table or a new column on a existing table, what's the best approach to publish it?
    I'm asking this because I've trying lots of approaches and the only solution was, step-by-step:
    1) On MDW, drop the publication item
    2) Add again the publication item
    3) Associate the publication item to the publication
    4) Save everything
    5) File / Deploy (if I don't do it, it does not work)
    6) Tools/Package... (that's where it's a problem: if I don't remove the app and create it again it does not work!)
    7) on the client side, I perform a msync with "force refresh"
    That's the only way I found to publish new items for sure. Any other action does not push the new table or new column to the client's embbeded DB.
    Any comments?
    Regards,
    Maurício Américo Vernaschi.

    I do not use MDW, rather a mix of java and the final publish step you use, but
    Adding new PIs should be easy, just add them and re-publish (no need to drop anything)
    for changes, if you just have new columns and the sql statement is 'select * from' then you should just need to make the changes in the base schema objects, and run the publish with no changes and the updates should be picked up. If selecting specific columns, then update and re-publish.
    When using MDW at the end you can save the application as a jar file, and then use this jar file to publish in the mobile manager - this is the best wayto publish.
    Have a look at this jar file in winzip, and you will find it contains a web.xml file. This is the xml definition of the publication items, and for simple changes it is possible to just edit this file and republish via the mobile manager

  • Add new Column to existing Primary Key

    Hi,
    I have a Primary key consisting of 6 columns. Now i want to add new 7th column to that existing key.
    Do i need to drop the existing primary key and then recreate agian with 7th field or is there any other way?
    Regards,
    Jayesh

    I think what Joel was really saying is that dropping/recreating a PK is the only way to change the PK column list in version 6 - 9. Who knows about in 10g? Though I doubt that this has changed.
    If the table only has one or two more columns that are not part of the key you might consider converting the table to being an IOT (indexed organized table).
    HTH -- Mark D Powell --

  • Best way to give a default value to a New Column with existing rows

    Adding some columns to SQL tables with existing data rows. There are also views created from these tables. The views are used in some report/query software so NULL values are not good. Interested in learning about the best way to set a default value. 
    These are the ways that I can think of
    1) ALTER TABLE using the DEFAULT to add the column and set the default value
    ++ Adds a constraint which is not terrible. Constraints are just not used much in this shop.
    2) ALTER TABLE to add the column then do an UPDATE statement to update the values
    ++ might be an issue for tables with millions of rows
    3) ALTER TABLE to add the column then use ISNULL in the CREATE VIEW

    It is a large table with 444 columns and max row size of 2268. 907k records took 1 minute 38 seconds to UPDATE the column. I have about 12 fields to add to this table and about 44 tables (not all this large of course) so it will take some time to
    UPDATE.  Although ... i just tried updating 3 columns in a single UPDATE and it took 1 minute 36 seconds. So If I did all 12 fields in a single UPDATE it would be about the same time as a single Field.  I will think about it.

  • Regarding addition of new column in existing  appraisal templates

    hi gurus,
    i m working on the existing appraisal templates in which i have to add one more column named "Avereage Rating"
           in which the average of "MID YEAR ACHIEVEMENT COLUMN TOTAL VALUE" & "FINAL APPRAISAL RATING COLUMN TOTAL VALUE"
           for eg:"(3.5+4.0)/2 = 3.75" i.e the value 3.75 will come in the average rating column,plz help me to sort out
           this column,for this,no doubt i have added the column for this but for the  value "3.75" what "value list",
           "value class" & "value determination" sud i use against this column plz help me....

    solved

  • How to add a new column to existing Asset history sheet version

    Hi Experts,
    I would like to one more column in the asset history sheet version for displaying ordinary depreciation and value adjustment in the standard report RAGITT_ALV01 (S_ALR_87011990).
    Could you please let me the know the steps to perform this requirement.
    Thanks in Advance...
    Best Regards,
    Chandra.

    Hi,
    Thanks for your reply.
    I have got any help like customizg path in asset history sheet.
    I have copied the standard SAP asset history sheet version and trying to add to new fileds according to the requirement.
    But it's not saving at all.
    Could you Please let me know is there any other method to do this.
    Thanks in Advance..
    Best Regards,
    Chandra.

  • 2 NEW ERRORS: New Version BREAKS Existing Sites

    ERROR #1: "Specified Host Directory does not map to your site (URL)"
    Went to set up a new site today as I may actually have another person (guinnae pig) willing to try this out.
    Here's the steps:
    Admin Panel--> Add Site
    Entered site info, FTP info
    Entered Host Directory... I used "/" as usual
    I got this message:
    ERROR #2
    Then I go to an existing site, (here's the steps)
    I was able to login to the Home Page to edit it via the Admin Panel...
    Clicked "EDIT"
    Got this Message:
    MORE INFO:
    I see in the release notes that ICE now reads all sites www.mysite.com as mysite.com
    PROBLEM.... here's what we use in ALL our htaccess files
    RewriteEngine on
    rewritecond %{http_host} ^mysite.com
    rewriteRule ^(.*) http://www.mysite.com/$1 [R=301,L]
    Changing this is NOT an option!!!

    Hello Tommy,
    Your links to the includes/ice/ice.js on the site subpages are incorrect.
    <script src="includes/ice/ice.js" type="text/javascript"></script>
    Should be:
    <script src="../includes/ice/ice.js" type="text/javascript"></script>
    ...since your includes files are off of the root directory.
    So, say for instance you have a subdirectory off of another subdirectory (e.g., subdir/anothersubdir/) the link to the includes for that page would need to read as such:
    <script src="../../includes/ice/ice.js" type="text/javascript"></script>
    Best regards,
    Corey

  • How to add new column in screen painter

    Hi
             I have try to add new column on existing screen and test screen in se51, the column is added in position correctly. But when I run program call this screen, the added column is placed as the last column.
    Please help.
    Thanks

    Thank for your replied.
              I have check the table control, it has fix column. So, I set fix column to 0 at table control but when execution by program call it's still not update what I have changed. (On test screen in se51, it come out correctly and updated)
    So, I don't know why I use program call this screen, the screen is not updated what I have try to change but, when execute in test screen it come out correctly
    PS. I have check attribute, it's numbered right.
    Please help !!
    Edited by: VerdamFK on Oct 4, 2010 8:11 AM

  • Add new column

    Hi All,
    I am new to OA framework. Can somebody advise that can we add some column without doing changing in program/source code.
    Thanks
    N :)

    By doing personalization on the page. You can create new Column hide existing column and do many things.
    I advise you to read more in old thread or in OA Framework Personalization Guide.
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • New column add in supplemental log group

    Hi All,
    How to add the new column in existing supplemental log group.
    Ex.
    SQL> desc scott.emp
    Name Null? Type
    EMPNO NOT NULL NUMBER(4)
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    And the existing supplemental group is
    Alter table emp add supplemental log group emp_log_grp (empno,ename,sal) always;
    Now I want to add comm column in log group.
    Pls. help.
    Thanks
    Naresh

    did you try..
    ALTER TABLE hr.departments ADD SUPPLEMENTAL LOG GROUP log_group_dep_pk
    (comm) ALWAYS;

  • New Column

    Dear Experts,
                       i want to adding  a one new column in existing reports. plz  help me
    regards
    raj

    Hi
    If it is customized report then tell your ABAP ers to add the particular column...if it is sap standard report then you have to for user-exit and BADI for that particular transaction....
    Arunima

  • How to add new price break lines to existing PO quotations?

    Hi,
    I am using a custom interface (to insert quotations data into PO headers/lines interface tables) and PO documents open interface to create PO Quotations in Oracle.
    I need to modify this interface to:
    1. Update existing price break lines for a quotation line.
    2. Add new price break lines to existing quotation line(which may/may not have exsiting price break lines).
    Please let me know:
    1. What modifications need to be done to the existing code.
    2. What values needs to be passed to the action columns in PO_HEADERS_INTERFACE and PO_LINES_INTERFACE for above scenarios?
    Any ideas/help will be appreciated.
    Thanks
    Imran

    Hi Imran,
    I have done a similar exercise for BPA price breakup.. Let me know if you need that as reference. I can share that :).. Please provide your personal mail id..
    Regards,
    S.P DASH

Maybe you are looking for

  • Do i need a new charger in the UK?

    hello i have just moved from Australia to the UK, and I am wondering if I need a new charger for my PowerBook G4 given that the UK has a different voltage to Australia. I have the adapter for the power point, but do I need a voltage converter too? Co

  • Currency display in report

    Hi , I have two Keyfigures created as Amount with Ocurrency ref. In report when i display its also showing the currency near the Keyfigure value.I dont need that , for example 1500 Euros 200 euros I dont need euros.I need only 1500 200 Regards, Logu.

  • File format drop down menu does not appear in the export dialogue box

    I am trying to export a book project as individual jpeg files and I can't see the drop down menu to choose what file format I want to export the file as. All I can do is export it as a .pdf which does not help me.

  • Shopping cart Converted to Purchase order directly.

    Hello Experts,        I have a question on what settings to check if the shopping cart created in a system is creating Purchase order directly as Follow-on document. The scenario we are using is SRM 5.0 (Standalone) for Strategic procurement. I check

  • Voiceover compact voices

    Hallo, I wrote an application that can read multiple text files and converts them into audio-files. Unfortunately italian voices (premium version) are not accurate as the english verisions, while the compact version are good enough. The problem I'm f