implementation error when setting a date field. MinValue.

Hi Experts ADF,

JDeveloper 11.1.1.4.0

I have an OT attribute like below

< attribute

Name = "LineItemEndDate".

ColumnName = "LINE_ITEM_END_DATE."

SQLType = 'TIMESTAMP '.

Type = "Java.Sql.date"

ColumnType = "DATE".

TableName = "LOAN_FEE_SUMMARY" >

< DesignTime >

< name Attr = "_DisplaySize" Value = "7" / >

< / DesignTime >

< / attribute >

I have a date. MinValue field in the user interface. All that the user selects and click on save, it must be registered in the database.

I tried the code below but make exception

SimpleDateFormat parseFormat = new SimpleDateFormat ("EEE MMM dd hh z yyyy");

parseFormat.parse (this.startDateBinding.getValue () m:System.NET.SocketAddress.ToString ());

java.util.Date utilDate = parseFormat.parse (this.startDateBinding.getValue () m:System.NET.SocketAddress.ToString ());

loanFeeRow.setAttribute ("LineItemStartDate",

utilDate);

date of entry in the user interface

< af:inputDate label = "Start Date" id = "id1".

visible = "#{viewScope.addFeeBean.dateIndicator} '"

Binding="#{viewScope.addFeeBean.startDateBinding}"/ >

Thank you

AR

The date type is java.sql.Date and you try to put it together with java.util.Date. I think that you need to convert java.util.Date, java.sql.Date, then set the attribute as:

loanFeeRow.setAttribute("LineItemStartDate", convertJavaUtilDateToJavaSqlDate(utilDate));

public java.sql.Date convertJavaUtilDateToJavaSqlDate(java.util.Date javaUtilDate)
  {
    if(javaUtilDate == null)
      return null;

    long javaMilliseconds = javaUtilDate.getTime();
    return new java.sql.Date(javaMilliseconds);
  }

You can check this URL for date operations more

Sameh Nassar: Treatment of Dates in Java

Tags: Java

Similar Questions

  • error when setting a date after the reinstallation of photoshop elements 9

    After having reactivated Photoshop Elements 9, updates not possible not of are: every time on indicates to me that there was a mistake and fur but the itself chose then. Yet before you reinstall my software, I had first disabled and I reactivated it after reinstalling. I reinstalled it on the same PC do I just back up the system after having reformatted the drive hard because I want to give this PC to a member of my family. Help would be siltl. Thank you!

    Photoshop elements 9 cannot e b updated no more, you can just install, activate & work on it. The latest version is PSE 14.

    Concerning

    Stéphane

  • Error when setting the parameters on the tool

    Hi experts,

    I want to use ODIsqlunload, but it still gives the error. My win7 OS

    error:

    oracle.odi.oditools.OdiToolInvalidParameterException: error when setting the parameters on the tool
    at com.sunopsis.dwg.function.SnpsFunctionBase.getCoreOdiTool(SnpsFunctionBase.java:620)
    at com.sunopsis.dwg.function.SnpsFunctionBase.getSunopsisApi(SnpsFunctionBase.java:494)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeOdiCommand(SnpSessTaskSql.java:1415)
    at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:32)
    at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:1)
    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:338)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:263)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:822)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:83)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.Exception: ODI-30044: invalid parameter:-file
    at com.sunopsis.dwg.function.SnpsFunctionBase.actionSetParameters(SnpsFunctionBase.java:251)
    at com.sunopsis.dwg.function.SnpsFunctionBase.setParameters(SnpsFunctionBase.java:799)
    at com.sunopsis.dwg.function.SnpsFunctionBase.getCoreOdiTool(SnpsFunctionBase.java:616)
    ... 18 more

    and the code is:

    "SnpsSqlUnload «-file=F:\temp/data_6001_1001.dat" "-driver oracle.jdbc.OracleDriver =" «-URL=jdbc:oracle:thin:@musty-Pc:1521:XE "-user = system-pass = < @= snpRef.getInfo ("SRC_ENCODED_PASS") @ > - file_format variable = - charset_encoding = UTF8 '-row_sep = \n" "-date_format = YYYY-MM-DD '-fetch_size = 1000 '-field_sep = #
    Select / * + * /.

    columns...
    table...
    where (1 = 1)

    I have try this - settings file:

    F:\data_6001_1001.dat
    F:\test.txt
    C:\Test\test.txt
    C:/data_6001_1001.dat
    C:\test/data_6001_1001.txt
    c:/test/data_6001_1001.txt
    C:\test/data_6001_1001.dat

    all of them same result :(

    Please help me experts :(

    Hi experts, I have solved my problem :))

    my code like this:

    "SnpsSqlUnload «-file=F:\temp/data_6001_1001.dat" "-driver oracle.jdbc.OracleDriver =" «-URL=jdbc:oracle:thin:@musty-Pc:1521:XE "- user = system-pass =<@=snpRef.getInfo("SRC_ENCODED_PASS") @=""> - file_format variable = - charset_encoding = UTF - 8 '-row_sep = \n" "-date_format = YYYY-MM-DD '-fetch_size = 1000 '-field_sep = #
    Select / * + * /.

    But it's really strange! I change only the file--> FILE and driver---> DRIVER and row_sep--> ROW_SEP and etc...

    I don't know why, but they should be higher. I did on linux OS 64 bit and no mistake.
    But win7 it gave me error.

    I thik it's a bug...

  • Disabled-Adobe Acrobat 9 Pro on old PC. Implementation error when you try to install the new PC. "Invalid serial number."

    Disabled-Adobe Acrobat 9 Pro on old PC. Implementation error when you try to install the new PC. "Invalid serial number."

    Please see the following documents.

    1. Error "invalid serial number". Acrobat 9 | CS4
    2. Invalid serial number error

    Let us know if that helps.

  • Setting a date field automatically filled for Javascript

    I have a date field, I automatically fill the area to be aware of the date of days with the following code:

    var date=new Date();
    var month=date.getMonth()+1;
    this.rawValue=month+"/"+date.getDate()+"/"+(date.getYear()-100);
    

    It works very well, but it comes out as 07/20/12 instead of 20/07/2012 as my model sets.

    If I write my code to be in the correct format, I always get an error "Invalid Format". How can I fix?

    The solution is to format date YYYY-MM-DD, when gross value setting.

    var date=new Date();
    var month=date.getMonth()+1;

    var day=date.getDate();

    if(month<10){ month="0"+month; }

    if(day<10) {day="0"+day; }
    this.rawValue=date.getFullYear()+"-"+month+"-"+day;

     

  • "Security error" when setting 'Microsoft Exchange Hosted Services' Exchange account (user in company)

    I am a user in a company with a very large company that actually uses Microsoft Hosted Exchange services hosted by Microsoft employees in their facilities.  I called Palm support and they were clueless and zero help.  The lady pointed me to some Palm article I had already read and only remotely had nothing to do with my problem.  I don't see anything about this error message in the forums and google searches. Sprint has even replaced my other reasons palm pre, and the same error occurs once I configured the exchange account. I also see the error when I set up my account on my pixi nine wives. Our pre and pixi have already exchange accounts set up with success on our phones that are hosted by sherweb. Sherweb's exchange accounts work fine. I tried to set up this account of microsoft hosted exchange 5 - 6 times with the same result. He accepts my configuration information and adds to the list of email accounts available in the meadow. However, it keeps popping up the message stating "error of security policy:"Exchange..." Tap for details"(with a yellow exclamation point). Then he said "Security policy error" the Exchange (first part of my email address) account is disabled because it is impossible to define security policies. "'Leave this option disabled' or 'delete account '. I know that something does not work because it applied a policy of password or PIN on my phone which is not necessary, unless the account has been added. I can also see it in the "Mobile devices" section of outlook web when I login. This is the place in web outlook where you can see the last time the device synchronized, if remote, you can wipe the phone etc. If anyone has an idea how to solve my problem please post. Any ideas? I'm fresh out of ideas on this issue and very frustrated by the Palm developers. Just another example of evil-development and practical tests by Palm. I hope they correct this problem on later versions, but I'm only slightly optimistic that they will never get this medium of exchange e-mail at the level necessary for the support of large corporations. What I know is that my Microsoft Hosted Exchange account works fine on a Windows Mobile phone and an iPhone 3GS (confirmed by the other coworks who have set up their phones using our Exchange services). Accordingly, I have no choice but Palm to blame for this problem instead of Microsoft. Please, Palm fully support microsoft exchange e-mail users!

    After a lot of research on the subject, here is my point of view on the State of support for MS Exchange @ Palm and other companies.

    Unfortunately, Palm Pre and Pixi, WebOS is not fully supported Microsoft Exchange.  This has led to numerous reports of frustrated customers and countless hours of time wasted by consumers and technical support trying to figure out how to connect these Palm devices to the MS Exchange e-mail servers.  Way to go Palm!  Provide support for all the free email accounts worldwide and decide not to develop a product that is able to support your most rich and more influential-based email clients.  These are the people who are most likely able to spend more money on your mobile products or make decisions for companies that are able to buy huge amounts of smart phones.  Way to go guys!  Penny wise and dollar foolish if you ask me!  Palm supports only partially a handful of MS Exchange security policies.  They document what they take in charge, but they do a very poor job of documenting or even explain the limitations of the software.  Their States of documentation that the security policies that are not supported will not be applied and that users will still be able to connect to the exchange server.  This is certainly not true based on the reported error and other similar user reports.  Here is how iPhone and Palm compare in regards to the support of MS exchange security policy.  Notice in the quotes below the iPhone supports the policy of 'require the encryption of devices' which is very probably used by your greater and more security conscious companies or Government institutions.  I'm sure that Palm's inability to support "device encryption" is why I get this error, even if I have really no way to prove it at the present time.  Come on Palm, if you go to support full POP3 and IMAP, you must provide the full support of the binding protocol and political security by Microsoft Exchange product.  Here is the comparison between iPhone and Palm WebOS:

    ' Said the site of Apple, the iPhone supports the camera allow, password enabled, allow a Simple password, alphanumeric password, Password Expiration, history of password, Maximum password attempts failed, minimum password length, maximum idle lock, policy, Minimum refresh interval complex character devices. ", require manual synchronization while roaming and - in iPhone OS 3.1 only - require Device Encryption". (13 security policies)

    "Palm Web site says its WebOS 1.1 and later support active password, alphanumeric password, password history, Maximum password attempts failed, maximum length password, lock of inactivity maximum, Minimum peripheral characters complex and Password Recovery." (8 security policies)

     

    Windows Mobile 6.1 supports all THE policies.

    BlackBerry does not support the EAS (MS Exchange)

    Google's Android is not compatible EAS (they may have recently released some support but not full)

    Conclusion: If you want a mobile device that fully supports MS Exchange, buy something that is running Windows Mobile 6.1 (or higher) or even an iPhone 3 g (or more).  At least, until Palm decides they want to throw a development more $$ to support Microsoft Exchange E-mail to enhance their level of support.

    Reference: "how to avoid the lie of the foreign exchange policy by smartphone' http://www.infoworld.com/d/mobilize/how-avoid-smartphone-exchange-policy-lie-004?page=0, 1

    Message edited by morgan1112 on 12/01/2010 15:00
  • Implementation error when you call the native application to view Document.

    Hi all

    I have a list of documents that are in my server. Now, I want to open these documents as pdf, txt, doc, ppt, etc..

    For this I do it like this:

    When the user will trigger a line any list I download the particular document in my camera, and when it downloads successfully I'm passing it's respective device path to the app to view native document as pdf Adobe Reader and the other DocToGo.

    For the pdf files, it works fine, but for all the rest files that is showing the error that is fixed in the screenshots.

    Then please tell me why this error is coming.

    Thanks in advance.

    I found the solution.

    I did mistake when setting the target.

  • Implementation error when executing load interface to Essbase data.

    When executing an interface to Essbase data loading I get this error:
    rg.apache.bsf.BSFException: exception of Jython:
    Traceback (most recent call changed):
    File "< string >", line 26, < module >
    at com.hyperion.odi.essbase.ODIEssbaseDataWriter.loadData (unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)


    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: invalid column type specified for the column of data [ActivityPurpose]

    The data store is reversed using the RKM Hyperion Essbase, I did not any changes in the data store.
    I'm loading from an identical to the tabel of target array.
    I use the IKM SQL for Hyperion Essbase (DATA).

    Does anyone have any idea what this might be?

    Concerning
    Hans-Petter

    Might be useful to have a read of the following doc Oracle Support - "how to avoid signs of ' ODIEssbaseException: invalid column type specified for the data column" Message When loading Essbase models ODI? ". [ID 885608.1] »

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Error when setting the minimum value of entry number Spin Box...

    Hai
    I drag and drop a VO and created a table. In this table, I cast a column that contains an InputText field to entry number Spin Box. During loading of the page, the table retrieves data from the database and display of numerical values in the SpinBox.After who, when I scroll the table through vertical scroll bar, the table * "data extract" * and error began as * "the value must be the number" *... In the original Version, this attribute is a number.
    THIS ERROR will PRODUCT ONLY when I put the minimum value of the counter... The purpose of minimum value, I want only the user to select the value of ve only... How can I prevent the user to select only values of ve... ? (IE, * how to set the minimum value of counter?) *

    Try changing the data type of your attribute in the EO to be Double instead of number.

  • root properties in the connected data store: error when accessing the date/time storage

    When you browse the properties my connected data store I get an error message when you try to read the value of the property of 'storage date/time': object doesn't support this property or method.

    Here is a minimal example:

    Dim oMyDataStore, MyProperty, oMyProperties
    Set oMyDataStore = Navigator.ConnectDataStoreByParameter ("TOC", "" & "C:\Program Files (x 86) \National 2012\Examples\Data\Example_data.tdm" & "" ')
    Set oMyProperties = oMyDataStore.RootElements (1). Properties
    For each MyProperty in oMyProperties
    Call MsgBoxDisp ("property name:" & MyProperty.Name & + "\n"&"property value:" & MyProperty.Value "")
    Next

    Why can I not access this particular property by default?

    Hi Phex,

    for the date/time properties, an object called UsiTimeDisp is returned. This object allows to that extend features of service as access to each part separately (day, year, hour, seconds,...) of your date/time value. If you want to print the value of time with MessageBoxDisp, you can use the VariantDate this object property.

    Your code might look like this then:

    Dim oMyDataStore, MyProperty, oMyProperties
    Set oMyDataStore = Navigator.ConnectDataStoreByParameter ("TOC", "" & "C:\Program Files (x 86) \National 2012\Examples\Data\Example_data.tdm" & "" ')
    Set oMyProperties = oMyDataStore.RootElements (1). Properties
    For each MyProperty in oMyProperties
    MyProperty.DataType = eTime Then
    Call MsgBoxDisp ("property name:" & MyProperty.Name & + "\n"&"property value:" & MyProperty.Value. ' ") VariantDate)
    On the other
    Call MsgBoxDisp ("property name:" & MyProperty.Name & + "\n"&"property value:" & MyProperty.Value "")
    End If
    Next

    I hope this helps.

    Good day

    Eva

  • error when opening application data\microsoft\help\qyevopl.dll.

    Original title: I get a window rundll on opening how do SFC?

    Be very specific when telling me how to do this.  the box says application data\microsoft\help\qyevopl.dll

    You also have to be precise!

    If you receive an error rundll in opening, exactly what what would you say (be specific, not paraphrase).

    It is extremely unlikely that SFC will help you, but you can if you want to get frustrated time and waste.  If you have a genuine XP installation CD bootable which has the same Service Pack as your installed version (most people don't) SFC will complain - a lot and you will be in for a frustrating waste of time.  Suggestin SFC is akin to saying "I don't know what the problem is or how to fix it.

    There is no XP file called qyevopl.dll, so if that's what you're seeing, it sounds like your system is currently or has been affected by malicious software.

    You should tell us about your system and then run some known for malware scanners.

    It makes no sense to try to repair a system that is afflicted with malicious software, so if you still have the problem after scans run clean, then we can solve your problem.

    Since the implementation of the Microsoft Answers forum does not ask for any kind of information system when a new question is asked, we know absolutely nothing about your system.  Not knowing the basic information a problem prolongs the frustration and the agony of these issues.

    Thank you MS Answers, allowing the resolution of simple problems as frustrating and a lot of time as possible.

    Provide information on your system, the better you can:

    What is your system brand and model?

    What is your Version of XP and the Service Pack?

    Do you have the Windows Desktop Search installed issue?

    Describe your current antivirus and software anti malware situation: McAfee, Symantec, Norton, Spybot, AVG, Avira!, MSE, Panda, Trend Micro, CA, Defender, ZoneAlarm, PC Tools, Comodo, etc..

    The afflicted system has a working CD/DVD (internal or external) drive?

    You have a genuine XP installation CD bootable, which is the same Service as your installed Service Pack (this is not the same as any recovery CD provided with your system)?

    What do you see (exactly) that you don't think you should see, and when you see it?

    If the system works, what do you think might have changed since the last time it did not work properly?

    Download, install, update and do a quick scan with these free malware detection programs (not at the same time):

    Malwarebytes (MMFA): http://www.malwarebytes.org/products/malwarebytes_free
    SUPERAntiSpyware: (SAS): http://www.superantispyware.com/

    SAS will probably report a lot of tracking cookies and you can just let him delete them.

    They can be uninstalled later if you wish.

    The scans by operating clean, restart, and then fix any problems.

  • C4580 - error when setting up connect through WiFi w / Time Capsule

    I used my C4580 to print and scann with wireless in the past, a Netgear WiFi router with a DLink WiFi router.  I recently started using a Time Capsule from Apple as my WiFi router.  I have two active groups, so I have a 2.4 GHz signal and a 5 GHz signal available for my wireless products to connect to.  All the other products I use (a MacBook Pro running OS X Lion, an iMac running OS X Lion, a CPU HP running Windows XP, a CPU Dell running Windows 7, a Fujitsu laptop running Windows Vista, Apple TV, an iPhone, and an HTC Evo a TiVo set - top box) are able to connect to one or the other of these signals of network without problem.

    Here's what's happening with the C4580:

    1. I plug my C4580 on my MacBook Pro via USB.

    2. I open the HP installation wizard.

    3. in the first part of the "Setup" section, I select my "Photosmart C4500 series", which shows as connected via 'USB '.

    4. in the second part of the topic "Setup", I check the box "configure yoru device to a wireless network.

    5. in the third part of the "Setup" section, my 5 GHz network is not displayed.  My 2.4 GHz network appears, by dint of complete signal, showing the encryption 'WPA_PSK' and 'Infrastructure' mode  I select this option.

    6. After about two minutes, during which the Setup Wizard probably tries to connect the C4580 to the WiFi network, I get the following error message: "* device not connected * to configure the network settings for the selected device, please temporarily connect it via the USB port.  The device can be disconnected from the USB once the network settings are transferred. »

    Note: Throughout this process, my C4500 WAS connected to my MacBook Pro via USB.

    Question: What other steps should I take to solve this problem?

    Thanks for your time.

    First time that I posted on a forum techy, bt I get a lot of help from them, then it's time to spread the love.

    In any case, I was struck by our similar problems were, we have exactly the same set up and the same current. I've been hitting my head against a brick wall for a whole afternoon. Your temporary solution lead me to a very simple implementation and a more permanent solution.

    Your normal home network have an apostrophe or special characters, such as YourName Wi - Fi network?

    I had two networks put in place (already had a network of comments) called W - Fi Latitude and comments Latitude travel network travel network.

    On your advice I tried to use my Gust netowrk. Oddly, when he showed up on the list, it lacked the apostrophe (the other network was not missing the apostrophe). When I tried to click on it, it said that there was not. I tried to type the name in its entirety in the box 'Other networks' and I was able to connect, but the software insisted that even if the printer is now connected, the MacBook was not (even though it was clearly).

    The anomaly has led me to believe that the HP Softare along with apostrophes, I went to the airport and renamed the two networks with apostrophes. I gave the private network a go, and voila, everything went well.

    It is a lesson in how to make a long story short. Basically, to remove the apostrophes in your network name in the airport and then try again.

  • Error when setting up the calendar blackBerry Smartphones

    I am running XP, DM4.5 with a BB8310. I am trying to set up outlook express on the BB calendar. I'm going to 'configure sync on my office program settings' choose "calendar" and then select microsoft outlook (outlook express is not an option in the list), then I click on "next". I get a micorsoft outlook connector error window that says: "a default profile could not be found" I can't find where to set up this profile. Without this, the calendar does not work. How can I configure this profile he's looking?

    Well, I feel like a noob. I've recently switched to Mozilla Thunderbird. So I saved the data in a comma-delimited file. Then, I was able at the SNYC and import the file. It took the updated file, but there were a few errors in the log. It does not recognize the format of the time. Here is an example of the error.

    READ "" the "Start Time" field has a value not valid '09:30 '. ""
    A default value will be substituted.
    The time field 'End Time' has a value not valid '18:00 '.
    A default value will be substituted.

    Updates are not displayed in the BB. I'll browse the forum to see if this applies. Sorry to be a noob, lol.

  • Implementation error when creating new version BPA.

    Hi all

    When I try to create new version against BPA I get the error message below. The PAID field is defined as 'RÉCEPTION' at the EPS level. Please let us know why this error is coming and what should be done to remove this.

    Error.jpg

    Thank you

    GHG

    Hello

    This just a pop up message information that is intended to inform the user PAY field is null now and not as "RECEPTION", which corresponds to the value set at this level of BPA.

    If you want to PAY ON the field as 'Reception', please refresh the code ON PAY as 'Back' to the supplier site level, and then try and create a new version against BPA, you won't get this error.

    Waiting for your response.

    Kind regards

    Piyush Kudawale


  • Error when filling out data

    Hello

    Here, I give DDLS and inserts data base I receive the error message when data extraction in outlist.
    and the error is err_msg = ORA-00932: inconsistent data types: expected - was -.

    I've also posted the same as in my previous post, but I do not got a satisfactory answer. Please help me. It is urgent...

    CREATE TABLE ip_lov_hdr
    (table_id VARCHAR2 (50) NOT NULL,)
    table-name VARCHAR2 (30) NOT NULL,
    Column VARCHAR2 (30) NOT NULL,
    CodeType VARCHAR2 (2))
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    /
    ALTER TABLE ip_lov_hdr
    ADD CONSTRAINT pk_lov_hdr PRIMARY KEY (table_id)
    USING INDEX
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    /

    CREATE TABLE ip_lov_dtl
    (table_id VARCHAR2 (50) NOT NULL,)
    Column VARCHAR2 (30) NOT NULL)
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    /

    ALTER TABLE ip_lov_dtl
    ADD CONSTRAINT pk_lov_dtl PRIMARY KEY (table_id, Column)
    USING INDEX
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    /
    ALTER TABLE ip_lov_dtl
    ADD CONSTRAINT fk_lov_hdr FOREIGN KEY (table_id)
    REFERENCES ip_lov_hdr (table_id) ON DELETE SET NULL
    /
    CREATE TABLE emp
    (ename VARCHAR2 (50))
    EmpNo VARCHAR2 (9).
    Dept VARCHAR2 (4))
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    /
    CREATE OR REPLACE
    TYPE out_rec_lov AS the OBJECT (ename VARCHAR2 (50), empno VARCHAR2 (9))
    /
    INSERT INTO emp
    (ENAME, EMPNO, DEPT)
    VALUES
    ("titu", ' 111 ', ' 10')
    /
    INSERT INTO emp
    (ENAME, EMPNO, DEPT)
    VALUES
    ('naria', '222', NULL)
    /
    INSERT INTO emp
    (ENAME, EMPNO, DEPT)
    VALUES
    ('tiks ', '123', 55')
    /
    INSERT INTO emp
    (ENAME, EMPNO, DEPT)
    VALUES
    ('tiki', '221', NULL)
    /
    INSERT INTO emp
    (ENAME, EMPNO, DEPT)
    VALUES
    ('narayan', NULL, NULL)
    /
    INSERT INTO ip_lov_hdr
    (TABLE_ID, TABLE_NAME, COLUMN, CODETYPE)
    VALUES
    ('emp_id', 'emp', 'ename', NULL)
    /
    INSERT INTO ip_lov_dtl
    (TABLE_ID, COLUMN)
    VALUES
    ('emp_id', "empno")
    /
    create or replace PACKAGE PKG_LOV_1
    AS

    TYPE listtable IS the TABLE of out_rec_lov INDEX DIRECTORY.


    PROCEDURE p_getlov)
    tab_id IN VARCHAR2,
    col_value IN VARCHAR2,
    ON LISTTABLE OUTLIST,
    err_msg OUT VARCHAR2);
    END;
    /
    create or replace PACKAGE BODY PKG_LOV_1 AS
    PROCEDURE p_getlov (tab_id IN VARCHAR2,
    col_value IN VARCHAR2,
    ON listtable outlist,
    err_msg OUT VARCHAR2)
    IS
    query_str VARCHAR2 (2000);
    col_str VARCHAR2 (2000);
    type cur_typ IS ref CURSOR;
    c cur_typ;
    I have NUMBER: = 0;
    l_table_name ip_lov_hdr. TABLE_NAME % TYPE;
    l_col_name ip_lov_hdr.col_name%TYPE;
    l_codetype ip_lov_hdr.codetype%TYPE;


    BEGIN

    BEGIN
    SELECT TABLE_NAME,
    CodeType,
    column-name
    BY l_table_name,
    l_codetype,
    l_col_name
    Of ip_lov_hdr
    WHERE UPPER (table_id) = UPPER (tab_id);

    EXCEPTION
    WHEN no_data_found THEN
    NULL;
    END;

    col_str: = l_col_name;

    FOR rec IN
    (SELECT Column
    Of ip_lov_dtl
    WHERE table_id = tab_id)
    LOOP
    col_str: = col_str | ',' || Rec.col_name;
    END LOOP;

    DBMS_OUTPUT. Put_line (col_str);

    IF l_codetype IS NULL THEN
    query_str: = "SELECT" | col_str | 'FROM ' | l_table_name | 'WHERE ' | l_col_name | ' as: col_value';
    ON THE OTHER
    query_str: = "SELECT" | col_str | 'FROM ' | l_table_name | 'WHERE Codetype =' | l_codetype | «And» | l_col_name | ' as: col_value';
    END IF;
    DBMS_OUTPUT. PUT_LINE (QUERY_STR);
    BEGIN

    C OPEN FOR USING col_value query_str;
    LOOP

    Fetch c outlist (i);
    i: = i + 1;
    EXIT WHEN c % NOTFOUND;
    END LOOP;

    C CLOSE;

    EXCEPTION
    WHILE others THEN
    err_msg: = SUBSTR (sqlerrm, 1, 500);
    END;

    EXCEPTION
    WHILE others THEN
    err_msg: = SUBSTR (sqlerrm, 1, 500);

    END p_getlov;
    END PKG_LOV_1;

    Kind regards
    Dhabas

    Published by: Dhabas on December 29, 2008 12:58

    Published by: Dhabas on December 29, 2008 14:43

    Published by: Dhabas on December 29, 2008 14:54

    Just run your code. you have a Panel (output of DBMS) to check the output of the screen. Just turn it on and your output it will be printed.

Maybe you are looking for

  • print get msg "device is not ready or printer is busy you want to wait...". »

    as above I get this msg when I try to print.Do not have the same problem with other browsers

  • VXI-AO-48XDC component question

    I fix my own VXI-AO-48XDC. I've already replaced U87 (voltage regulator). However, I also need to replace R162 and R163. I know what kind of components, they are (and value), but I do not know the tolerance. What is the part number of the manufacture

  • OfficeJet Pro 8600: Print in black ink only

    I don't have an option to print only black ink. The option does not appear on the print screen. I have the ability to print two-sided but not black only. I use OS X Yosemite 10.10.1

  • My PDFs cant open

    Hello everyone, my PDF files changed to Null... For example if the name of my file was e3 is now Null.e3 and adobe reader and Foxit Reader cannot open my files. ?

  • cartridge 122: Incompatible cartridge

    I bought printer deskjet 1050 hp real combo cartridge 122. But when I then load on my pc, I saw a message ' black print cartridge is not compatible, please replace the cartridge "and it does not allow me to print any document. Before buying, I checke