change the type of a column in a view column

Hi all

I have a visibility.

CREATE or REPLACE FORCE VIEW veh (wine,
last_nm,
first_nm,
city_nm,
model_yr,
veh_indctr
)
AS
SELECT vs.vin, p.last_nm, p.first_nm, p.city_nm, vs.model_yr,
(CASE
WHEN vs. TYPE IN ('TEST', 'RECYCLE')
THEN 'Y '.
ANOTHER "N".
Veh_indctr END)
VEHICLE vs, person p
WHERE vs.vin = p.vin;

Here veh_indctr is not any table, so I want to set the data type for this column.
Type column must be VARCHAR2 (1)
How can we do that... Please advise on this


Thanks in advance

Published by: user1692585 on April 15, 2013 06:19

What is the current of this column data type when you create the view...

In any case, you could use CAST

cast
     (
  CASE WHEN vs.TYPE IN ('TEST', 'RECYCLE')
          THEN 'Y'
          ELSE 'N'
  END as varchar2(1)
     ) veh_indctr

Tags: Database

Similar Questions

  • Cannot change the type of data in the columns referenced by foreign keys

    Hello:

    I'm using Version 3.1.0.691 and change the types of data in many columns of data derived from the field types. If a column is referenced by a foreign key, however, the data type radio buttons are grayed out. I suppose that if I deleted the foreign key, that I would be able to change the data type of the column to a field, but that would be tedious. Is there another way to go about this?

    Any help would be greatly appreciated.

    Thank you

    Doc

    Hi Doc,

    If a column is referenced by a foreign key, however, the data type radio buttons are grayed out.

    It is not good - if you have the PK column, and it is called by another FK column you can change the data type of column PK and FK column data type will follow the change. You cannot manually change the data type of column FK. Good column PK itself could relate to another column, and in this case you cannot change the data type of column PK.
    In your case - you need to find the first PK/Uk column that is not the column FK itself and change its data type. FK columns in the chain will follow.

    Philippe

  • Change the Type of the attribute at the request of the View object

    Hi all

    I use JDeveloper 11.1.1.6. I am trying to achieve the following problem.

    My Table has a column of type VARCHAR2, but this field is to store, say, displayed in canonical format "YYYY/MM/DD hh '. I want to show the date in a nice format, as October 30, 12 ' and be able to use the datePicker adf (date. MinValue) on the attribute.

    So I created an entity object, and I changed the type of the attribute of Date String.

    I also created a ViewObject and the test on request module retrieves a date but seems to not understand the canonical format and date it recovers is wrong (something like 5049-02-20 12:45:30.45).

    Since then, I work on EBS I oracle API access and so on, so I changed my query View object;

    SELECT St St myEO.ExpiryDate-> FND_DATE.canonical_to_date (myEO.ExpiryDate) SELECT as displayed in St St. (FND_DATE.canonical_to_date would be the same thing as to_date (date, format))

    When I run AppModule, NICE! It works, it retrieves the date without time and if simple format to give the attribute I can even get the format I wanted.

    The problem is that when I try to update and validate changes to DB, (I replace the doDML so I can analyze my Date to a string with the format YYYY/MM/DD hh: mm: as is supposed to be) I can't even the part update. Complains in the framework;

    Invalid state, another user has changed the line and blah blah blah and the problem is here:

    (oracle.jbo.RowInconsistentException) Houston-25014: another user has modified the line containing oracle.jbo.Key [592674 primary key].


    [178] compare entity did not attribute display
    [179] original value: 2013-06-28 (that I ran with my FND_DATE.) Procedure CANONICAL_TO_DATE)
    [180] target value: 5048-02-21 22:47:53.0 (I guess that the automatic distribution or conversion of the original string)
    OracleSQLBuilder [181]: ROLLBACK WORK point registration "BO_SP".
    [182] DCBindingContainer.reportException: oracle.jbo.RowInconsistentException

    Any suggestion? I'd really appreciate it.

    Edited by: Alejandro T. Lanz on 1st November 2012 06:34

    Well, in short :):
    When you try to update the line, frame checks the data in db and cached (from the entity object) value is different from the db value (because you Date and String objects), so that it will throw oracle.jbo.RowInconsistentException exception.

    Dario

  • How to change the type of object?

    I have an object type, as shown below:

    Here are the object and its type

    create or replace type test_object1 as an object
    (
    val1 varchar2 (50).
    val2 varchar2 (50).
    VARCHAR2 (50) val3
    );

    create or replace type test_type1 is table of the test_object1;


    Now I want to change the type of object. I want to increase the size of val1 to varchar2 (100).

    Any body could help for the alter script.

    Thank you
    Lavan

    >
    SQL > alter type test_object1 change attribute (varchar2 (100)) val1;
    >
    Which won't work OPs example. Your example does not include the second type of object that depends on the first type.

    You cannot change the underlying type unless you use the CASCADe or INVALIDATE option.
    >
    change the type of test_object1 change attribute (val1 varchar2 (100)) waterfall;
    >
    See the CASCADE clause in the link provided by Osame
    >
    CASCADE clause

    Specify the CASCADE clause if you want to propagate the type change to the tables and dependent types. Oracle database abandons the statement if errors are found in the dependent types or tables, unless you also specify the FORCE.

    If you change the property of the type between FINAL and NON-FINAL, you must specify this clause to convert data in the tables and dependent columns. Please refer to [NOT] FINAL.

  • Can we change the type of field dynamically in the Apex

    Hi all

    Using Apex 4.0;
    Is it possible to dynamically change the type of field from one to the other? I have a list of selection; If the user selects a particular value, I need to display the next filed a tabled text, and if a different value that he chose the need to view it as a selection list.

    Please guide me,

    Thank you

    If these two form elements are two different columns in your table, just use the regular treatment.
    Otherwise, you can either
    -Create a view on top of your table that contains two columns (thus duplicate), use the regular treatment of APEX and doing the real work to instead - relaxing on your view or
    -Choose elements to map to your table.column and (when the other field is shown and modified) copy the value to the first element with dynamic Action.

  • Change the default value of column NOT NULL to NULL

    Hi all
    How can I change the default value of column not NULL to NULL?
    Suppose I have run the following commands:
    SQL> alter table hr.test modify temp_num2 default null;
    
    Table altered.
    
    SQL> desc hr.test;
     Name                            Null?    Type
     ----------------------------------------- -------- ----------------------------
     TEMP_NUM                             NUMBER
     TEMP_NUM2                       NOT NULL NUMBER
    Why forced temp_num2 has not changed with the NULL value? I'm under 11.g rel2

    Best regards
    Valerie

    You can NOT change the column constraint NULL to contain NULL values by:

    alter table table_name modify column_name null; 
    

    After this change, the column can contain null values. In Oracle, not null constraints are created automatically when not null is specified for a column. Similarly, they are deleted automatically when the column is changed to allow NULL values.

  • Qosmio F10 - cannot change the type of HARD drive in the BIOS

    I want to change my hard drive, but the category in the BIOS is not editable.

    I can not change the type of hard drive in the BIOS on my desktop PC.

    Hello

    And you want to change in the BIOS now?
    I put t know which option you mean exactly

    The drive in the BIOS, you can change t. That's why you should buy a new

  • Change the type of sensor pressure strain for SCXI-1314

    Hello!

    I would like to ask how to change the type of strain sensor.

    I use SCXI-1314 and one of my pressure sensor is a type of 4-wire. (Output 100mV, excitement: 10vdc)

    , but I want to replace the sensor by another type of current output type. (Output 4 ~ 20mV, excitement: 12-30Vdc)

    I checked the output voltage cable 4. (Defined as full-bridge OR max)

    Power + = Ex +.

    Food - = Ex-

    CH+        =  S+

    CH-         =  S-

    However, I don't know how to connect the type 2-wire with SCXI-1314.

    In addition, I don't have enough experience on the types of bridge (bridges and whole, quarter half)

    Can you explain what I need to do?

    One thing you migth try is to put a 5 Ohm resistor in the current loop. causing a drop in voltage 100mV on resistance, however check the soil conditions.  Since you will need a new calculation of sensitivty sensor anyway you can use a resistor 4.7 Ohm or 2 10 ohms in parallel... just find a good match between your 1314 input voltage range and the 4-20mA.

    And you will have an external power supply for the sensor.

  • Can you change the type of device to 'USB Raw resource' to GPIB controller?

    I'm trying to configure a GPIB FL Contec GP - IB (USB) controller in MAX.  I could so he can register through the creation of a pilot of the Assistant driver VISA, but it fits as a "gross resource USB" rather than as a GPIB controller.  I can send and receive information from the controller, but it does give me an option to search for connected devices of GPIB communicate with them.  Is it possible to change the type of the device, maybe by manually changing the driver created by the wizard of the NI-VISA driver?  Thank you for your time.

    N ° do not use MAX at all. You can just create a GPIB-USB controller on your own. You should contact the seller.

  • Change the type of serial number of UUT

    Hello

    I am a new user of Teststand and I would like to change the type of serial number to USE.

    or add condition number of the operator to write in the information of the object to measure dialog box.

    I want the serial number that have just number 20 and no letters.

    If the serial number is different, the dialog box should reappear as at the beginning.

    Hope that I was clear.

    Thank you

    You will need to replace the PreUUT callback and then build some sort of algorithm to verify the serial number desired.

    I've attached an example of how do.

  • Update of cases in the structure of the case after having changed the 'Type of case.

    Hello

    After you change the "Type of business" (only one case has been deleted), I discovered that in cases of strcuture cases has become "damaged": case "named" have been changed to digital small (that is, 0, 1, 2, 3).

    Is there a way to den strcuture case?

    Thank you

    Pavel

    Right click on one of the enums greyed out and choose 'review and update of Type Def.  That should allow you to solve problems.

  • How to change the type of insurance policy indicator on front panel

    Hello

    I want to change the type of digital indicator police led style. I have the police. But, how can I change the type of indicator of independent policy and not only not by changing the type of policy application. I checked the property node available are only color, size, justification, but type.

    Yoppy.

    Go

     

    LED > right mouse click > Create > property Node > Label > police > name

     

    then use (or)

     

    Digital > right mouse click > Create > property Node > digital text > police > name

    Kind regards.

     

  • Change the Type of Interpolation of waveform graphic part

    Hello dear colleagues,

    How can I change the type of interpolation to a graph of waveform in part? Check the attached photo.

    I don't want yellow interpolation to the beginning of the measure.

    I know that the interpolation can be modified with the property node, but this has an influence on all points.

    Any idea?

    Thank you very much.

    Hi maximint,

    -NaN values used to hide unwanted in the plot points

    -use separate plots when you do not want the "edges" in land line

  • How can I change the type of chassis in an existing CompactRIO project?

    Hello

    I have a built in LabView 8.2 for a chassis 9101 cRIO. Now, I want to bring to LabView 2009 and use it on a chassis of 9104. I would have thought this should be simple, but there is a VI on the FPGA itself. When you compile, I get the error "the device type that has been set up in this function does not match the actual type of the device. I don't want to have to remove the frame of the project & add it back (losing all the settings it can have) - is there a way just to change the type of target, but keeping the relevant parameters?

    Thanks for any help!

    Dave

    Hi Dave,.

    Once you've practiced it several times it is actually a piece of cake.

    Right click on the project select new target or device

    Rember just to specify rather than the current goal.

    Otherwise, you will have a conflict.

    The new target is initialized to the Ip (0,0,0,0) then re address assignment standard.

    Copy (drag) all the components for the new device (RT & FPGA if included)

    Note it's manual labor rather than you have to 'say' labview what material he must understand!

    concerning

    Xseadog

  • Is possible to change the type of node WINS with cmd command on a windows operating system that is not joined to the domain?

    Is possible to change the type of node WINS with cmd command on a windows operating system that is not joined to the domain?

    Hello

    The question you posted would be better suited to the TechNet community. Please visit the link below to find a community that will provide the support you want.

     
     

    Hope this information is useful.

Maybe you are looking for

  • p6720f HP: upgrade graphics card

    upgrade windows 7 to windows 10.  that pc had problems windows updates do (going to try to update 1 and 4 hours later was still trying to install the update). set up own pc works great boots in 30 seconds.  However, the video card that came with a pc

  • Typedef reference FPGA not updated in the private class data

    I have a FPGA reference related to a typedef that is passed in a LVOOP object. If I change the FPGA of computer simulation of dev to the use of the actual hardware, all references to the typedef are updated which are controls on a diagram. But the ty

  • Measure the time between the ridges of the periodic input signal

    We have built a circuit which is supposed to mimic an Exercycle.  We have an IR switch and a spinning wheel, the rccb meets a comparator circuit and the output of the element of comparison, we have running in LabView.  We successfully were able to me

  • Error running on the SIMS 2 and need for Speed Carbon with WIN7 Ultimate 32 bit

    Error running with the SIMS 2 The error that says: the DVD error running is not found I tried to fix it: with XP SP3, VISTA SP2 compatibility mode (I installed the game and I want to play with the compatibility mode for XP with Vista, now I installed

  • SWF Converter

    Where can I find a free, (Windows XP compatible) SWF file converter?