View is Created with the Wrong Datatype

Hello All,
One of the rows I select while creating a view is a number.
Oracle Creates the view with the selected field as a varchar.
Why would oracle change a datatype of a selected column in the expressed view?
Here is the code:
CREATE OR REPLACE VIEW CC_V
(CO_ON_DATE, NAME, EMP_NO, CC_NUMBER, EXPENSE_DT,
CC_AMT, CC_PROC_DT, EXPORT_DT, CURR_COMPANY, EXPORT_HDR_STATUS)
AS
(select
sl_emp_utility_pkg.company_on_date(a.er_employee_number,b.EXLI_EXPENSE_ITEM_DATE),
c.USER_LAST_NAME||','||c.USER_FIRST_NAME name,
a.er_employee_number emp_no,
'** '||substr(b.exli_cc_card_number,13,4) cc_number,
b.EXLI_EXPENSE_ITEM_DATE expense_dt,
b.exli_alloc_base_amt cc_amt,
new_time(a.export_hdr_status_datetime,'GMT','CDT') cc_proc_dt,
new_time(a.export_create_date,'GMT','CDT') export_dt,
a.export_hdr_status, --this is the column
c.system_code_1 curr_company
from
aler_expense_export_header a,
aler_expense_export_line b,
alco_user c
where
a.export_er_hdr_id = b.export_er_hdr_id and
a.export_hdr_status in (0,2,4) and
c.user_login = a.er_user_login and
b.exli_line_is_personal_flag = 0 and
b.exli_payment_type_label = 'Corporate Charge Card' and
er_corp_charge_total <> 0)
Thanks for any help,
Bradley

sorry I did not see the comment but look at this .your sequence is not correct
CREATE OR REPLACE VIEW cc_v (co_on_date,
                             NAME,
                             emp_no,
                             cc_number,
                             expense_dt,
                             cc_amt,
                             cc_proc_dt,
                             export_dt,
                            curr_company,
                            export_hdr_status
AS
   (SELECT sl_emp_utility_pkg.company_on_date (a.er_employee_number,
                                               b.exli_expense_item_date
           c.user_last_name || ',' || c.user_first_name NAME,
           a.er_employee_number emp_no,
           '** ' || SUBSTR (b.exli_cc_card_number, 13, 4) cc_number,
           b.exli_expense_item_date expense_dt, b.exli_alloc_base_amt cc_amt,
           NEW_TIME (a.export_hdr_status_datetime, 'GMT', 'CDT') cc_proc_dt,
           NEW_TIME (a.export_create_date, 'GMT', 'CDT') export_dt,
         a.export_hdr_status, --this is the column
                               c.system_code_1 curr_company
      FROM aler_expense_export_header a,
           aler_expense_export_line b,
           alco_user c
     WHERE a.export_er_hdr_id = b.export_er_hdr_id
       AND a.export_hdr_status IN (0, 2, 4)
       AND c.user_login = a.er_user_login
       AND b.exli_line_is_personal_flag = 0
       AND b.exli_payment_type_label = 'Corporate Charge Card'
       AND er_corp_charge_total <> 0)

Similar Messages

  • Client wanted  to delete the document created with the wrong GL with the WB

    Dear All,
    The user had by mistake posted the the document in a wrong GL with with WBS element under the Project.
    We have tried to reverse it through a reversal posting. But it could not be done.
    Client wanted  to delete the document created with the wrong GL with the WBS element.
    How this can be set right?
    Please advice.
    Regards
    Bijudas

    document cannot be deleted in SAP
    reverse the document and then report

  • Client wanted to delete the document created with the wrong GL with the WBS

    Dear All,
    The user had by mistake posted the the document in a wrong GL with with WBS element under the Project.
    We have tried to reverse it through a reversal posting. But it could not be done.
    Client wanted to delete the document created with the wrong GL with the WBS element.
    How this can be set right?
    Please advice.
    Regards

    document cannot be deleted in SAP
    reverse the document and then report

  • Is there anything that you can do to fix a pdf that was created with the wrong orientation?

    Someone sent me 40-page pdf created from a document with landscape orientation that was output with portrait orientation. The pages are clipped off on the right and left. There is no way that I can see that you can change the orientation in Acrobat Pro and if it is converted into a Word document you can see most of the text, but there is still some missing, especially where there are tables. I don't have access to the original document. I was just curious if there was a way around this?

    Thanks, that is what I figured. Just thought I would ask. Some of the text that was clipped off did appear when the pdf was converted into a word file, but not all of it.
    Mary Jane

  • Issues with the SQL wrapper scripts created with the DB adapter

    Hi All,
    We have the wrapper sql scripts created with the DB adapter configurations which are being used to invoke the stored procedures.
    To give you a background on the wrapper sql scripts-The Adapter Configuration wizard generates a wrapper API when a PL/SQL API has arguments of data types, such as PL/SQL Boolean, PL/SQL Table, or PL/SQL Record.
    These two SQL files are saved in the same directory where the WSDL and XSD files are stored, and are available in the Project view.
    The issue we are facing now is that whenever the associated package or the procedure structure undergoes a change we see an error as given below:
    An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: esb:///ESB_Projects/Application1_ABC_ESB/DBADP_Update_Out.wsdl [ DBADP_Update_Out_ptt::DBADP_Update_Out(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'DBADP_Update_Out' failed due to: Error while trying to prepare and execute an API. An error occurred while preparing and executing the APPS.XXIRIS_SOA_R_WRAPPER.XXIRIS_AR_CUST_K$ API. Cause: java.sql.SQLException: ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body "APPS.XXIRIS_AR_CUST_K" has been invalidated ORA-04065: not executed, altered or dropped package body "APPS.XXIRIS_AR_CUST_K" ORA-06508: PL/SQL: could not find program unit being called: "APPS.XXIRIS_AR_CUST_K" ORA-06512: at "APPS.XXIRIS_SOA_R_WRAPPER", line 1 ORA-06512: at line 1 [Caused by: ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body
    In such cases we need to either execute the wrapper scripts again or refresh the connection pool in case the wrapper sql scripts for that procedure are not available.
    In some cases we see that the first instance errors out.However the second request and the subsequent requests after that goes through successfully.
    Please do let me know if anyone has faced such issues before.
    Any inputs in this regard would be of great help.
    Thanks in advance!
    Deepthi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I stumbled on a link in the oracle forum which says that the "create or replace package XXX" at the start of the PL/SQL procedure when run seems to intermittently cause the ORA-04068: existing state of packages has been discarded problem.
    As per the solution suggested an “alter package XXX compile" can be executed after the changes are made and then we would no longer get the error in BPEL/ESB and dont have to bounce the server too.
    __http://forums.oracle.com/forums/thread.jspa?threadID=185762_
    However the above solution does not seem to resolve the issue.
    Any help in this regard would be highly appreciated.
    Thanks,
    Deepthi

  • How to compare the date value with the date datatype column?

    Hi,
    I am executed a query to get output for the particular date in two different database.
    I got output in one db environment, but in the another environment i didnt get the output.
    APP_DECISION_DATE column contains date datatype
    ex:
    SQL> select DECISIONED_STAGE_ID,DECISIONED_STAGE_USER_ID from naap10_application where APP_DECISION_DATE = TO_DATE('23-JAN-07',
    'DD-MON-YY'); 2
    DECISIONED_STAGE_ID DECISIONED_STAG
    2006060106 SYSTEM
    DATABASE - II
    SQL> select DECISIONED_STAGE_ID,DECISIONED_STAGE_USER_ID from naap10_application where APP_DECISION_DATE=
    TO_DATE('31-JAN-2007','DD-MON-RRRR') and application_id=2007010028552;
    no rows selected
    in the same db i got the output while i used the TO_DATE(APP_DECISION_DATE)
    SQL> select DECISIONED_STAGE_ID,DECISIONED_STAGE_USER_ID from naap10_application where TO_DATE(APP_DECISION_DATE)=
    TO_DATE('31-JAN-2007','DD-MON-YYYY') and application_id=2007010028552; 2
    DECISIONED_STAGE_ID DECISIONED_STAG
    2006060113 SYSTEM
    is it necessary to use TO_DATE function while i am using the data datatype column in the WHERE CLAUSE?
    Thanks in advance.
    siva

    Sorry & thanks sathish,
    Now i got the result.
    SQL> select DECISIONED_STAGE_ID,DECISIONED_STAGE_USER_ID from naap10_application where APP_DECISION_DATE BETWEEN TO_DATE ('31.01.2007 00:00:00', 'DD.MM.YYYY HH24:MI:SS') AND TO_DATE ('31.01.2007 23:59:59', 'DD.MM.YYYY HH24:MI:SS')
    2 and application_id=2007010028552;
    DECISIONED_STAGE_ID DECISIONED_STAG
    2006060113 SYSTEM
    ================================
    But one doubt,
    When i created the column with the date datatype how it gets the time value,
    And in one environment db i got the result but in another environment i dont get,
    Shall i want to change any session status of date?

  • DM Syncs Appointmen​ts with the Wrong Times

    I have seen numerous posts in the forums about my problem. However, there is always a general statement of "I have never seen this" that is included with any technical support. I know there are numerous others who have the same problem. There are dozens in my company alone.
    When I use Desktop Manager versions 4.2.2, 4.5, 4.6, or 4.7 to sync with an Outook 2007 calendar to either a Blackberry 8830WE or 9530 Storm from Verizion, many of the calendar appointments are sync'd with the wrong time. It seems to be isolated to reoccuring appointments and especially those planned by others that I have accepted. The offset is not consistent. It ranges between 3 and 6 hours, but there are always sync'd too early. My reoccuring 8am appointment shows up at 3am right now!
    All of the time zones are correct and the same on all devices and in all software. This is a frustating and yet rampant problem. 
    I am using Google Calendar wireless sync to get around my problem, but it is simply a work around. I would prefer the BB software work correctly. It is troublesome to have to do this. I had a Motorola Q before, and I have had no problems with the same Outlook and Windows install.
    PLEASE HELP!

    OK, I'll admit I'm a newbee, but I have been dealing with this issue since getting my Storm approx. 2 months ago and it's driving me nuts!  I've been through as many posts as I can find and have turned off 'update device time' in DM and made sure all my times and time zones are set correctly in Outlook and BB... I work for a US company and live in the UK, so I am constantly getting appointments with US TZ settings.  At first they appear to be handled correctly and appear at the correct UK time and TZ in my Outlook and BB calendars.  HOWEVER, when I sync with DM somewhere along the line the TZ (and actual timing of the meetings) is getting adjusted to the local time/TZ. 
    As an example - I receive a meeting that was natively created for 09:30 Mountain time (GMT-7).  I accept this in my local Outlook an it appears correctly.  When I sync with DM, however, it gets changed to a 16:30 start and GMT TZ.  When I sync again, DM indicates a change to the appointment and forces an update in Outlook - after which the meeting appears in Outlook with a 16:30 start and GMT TZ.
    Now, in absolute terms this is OK since the 'local' time of the meeting start is the same with both combinations.  But things get completely screwed up when the originator changes the meeting time - causing it to shift all over the place.  This is futher complicated since I travel to Europe (and the US) on a regular basis and am thus changing TZs often.
    Since the BB calendar allows you to associate a TZ with a meeting when you enter it in the device, WHY does a DM sync result in a forced change in meeting time / TZ and not use the original meeting's?? 
    Surely this is a BUG? Surely DM should not be messing with these attributes at all??

  • How do I update the iCloud ID on my phone?  I changed my ID on my laptop, but my iphone still has "sign in to iCloud" with the wrong ID and I cant figure out how to change it.

    How do I update the iCloud ID on my phone?  I changed my ID on my laptop, but my iphone still has "sign in to iCloud" with the wrong ID and I cant figure out how to change it.

    I have same question

  • I upgraded my Itunes to the latest version and now it won't let me view my library with the column browser. Can i get that back?

    i upgraded my Itunes to the latest version and now it won't let me view my library with the column browser. Can i get that back? I tried using the shortcut for it and nothing happens. When I try to do it from the view menu, it shows up as something I can't click on. The new library format is driving me crazy and I just want to get back to the old library view.

    We need to sort out some facts here first:
    •  You cannot be running Mt. Lion on your iMac G5.  What Mac is it?  What is the Model Identifier listed in About This Mac; More Info; Hardware Overview
    •  What is the model of your Epson Scanner?
    •  Have you attempted to scan using Image Capture, located in your Applications folder?
    •  Your Palm Pilot software will only run in Snow Leopard; so depending upon which Mac you have, you will either have to:
    1)  partition your hard drive or add an external hard drive and install Snow Leopard into it to "dual-boot" when you want to access you Palm software, or
    2)  install Snow Leopard Server (now available from Apple for $20 telephone orders USA & Canda only) into Parallels 8 to run your Palm software in Mt. Lion:
                                  [click on image to enlarge]

  • I setup my iCloud account on my iPhone 5 with the wrong e mail address, and I don't remmber the password, I reset my tel and erase all the information on my iPhone in order to try to set up a new iCloud account but when I restart I have a problem aga

    I setup my iCloud account on my iPhone 5 with the wrong e mail address, and I don't remmber the password, I reset my tel and erase all the information on my iPhone in order to try to set up a new iCloud account but when I restart I have a problem agaIn , they ask me to put again the old iCloud user account and password, what I can do in order to start the phone when I don't have the correct e mail and I don't remmber the passcode.?

    I have the same problem as the emails go to my iCloud account that I cannot access!!! I cannot answer the security questions as someone else must have set up my iCloud account. Nothing seems to work. It would be great if someone has some ideas as what can be done to recover the situation?

  • HT2513 my iCal calendar that I created with the color green keeps changing to purple.  no matter how many times I change it to green, it turns it back to purple.  Of course this only happens with iCloud and not "from my Mac".  Any ideas?

    my iCal calendar that I created with the color green keeps changing to purple.  no matter how many times I change it to green, it turns it back to purple.  Of course this only happens with iCloud and not "from my Mac".  Any ideas on how to correct this?  This seems like a trivial error, but it's super annoying.

    I called Apple and they said that they know about this problem.  It's a problem with iCloud which their Engineers know about.  (there was a new iCloud release, hence...)  No ETA for a fix yet.  I asked that this be escalated so Engineering doesn't put it at the bottom of their fix list.  I talked to a Senior Advisor and mentioned to them to have QA check their regression tests as this has happened before to me (the problem just didn't take this long to resolve).  I like to use green too for important stuff, so I've resorted to creating a new calendar using the normal calendar green for events going forward.  They could have picked another color besides green to have this problem with and I wouldn't have been so upset.  ;-)

  • I am totally frustrated by the fact that now i have gone to iCloud and after a few synchs, my contacts are all mixed up with the wrong information.  For instance, my email and phone number comes up under someone else's name (a thousand contacts)

    I am totally frustrated by the fact that now i have gone to iCloud and after a few synchs, my contacts are all mixed up with the wrong information.  For instance, my email and phone number comes up under someone else's name (a thousand contacts).  I dont know how to repair this.  what a nightmare

    An icloud account is designed to be used by just one user.  If you have given your ID or set up your account on someone else's device, then their data will be mingled with your or worse.

  • The Web Dynpro application was called up with the wrong URL parameters

    Hi all,
    I am using the systems below:
    ERP STACK :16
    EHP : 4
    EHP SP Stack :4
    EA-HR * : 604(SP12)
    SAP-HR * :604(SP12)
    XSS JAVA components : SAP ESS 603 SP05
    SAP MSS 600 SP16
    PCUI_GP 603 SP05
    Business Package : BP ERP05 ESS 1.41 SP04
    BP ERP05 MSS 1.41 SP04
    BP ERP05 COMMON PARTS 1.41 SP04
    I am getting below error after clicking on the appraisal document:
    App. Called Up Incorrectly
    The Web Dynpro application was called up with the wrong URL parameters.
    Note
    Enter the URL parameters and their use.
    You can find more information on the functions that you can perform in the catalog for appraisal templates in the Implementation Guide (IMG) for Objective Setting and Appraisals under Edit Forms.
    I already applied the below notes also:
    1468466 Performance Management Launchpad Configuration
    1463821 Performance Management Portal Configuration
    1416756 OBN Configuration in Performance Management
    1408243 Configuration for object-based navigation
    Plz advise me??
    Thanks,
    Anumit

    can you paste the exact error. also you can take a HTTP trace and see which resourse or UWL is being launched!

  • When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    Hi, thanks for the answer, I did that already. Unfortunatly this doesn't help me at all, as I often forget to check the menu. For me composing the message is writing the text, the subject, the person to who is addressed and than press "send".
    I often forget to check the "from", and this is a problem because the software select itself one of the accounts.
    Isn't there a way at least to put as a default a blank field instead of one of the accounts? or an account which doesn't work so if I forget to specify the "from" I will be rnotofied that the message can't be sent.
    I guess this could be a rather common problem for many people!
    Thanks
    Sergio

  • What is the user scope when created with the API?

    I noticed that users created with the Adobe Connect API for my meeting/account are always listed in the Administration -> Users and Groups area.  Which probably means that a user's login is only valid for my meetings.  So if they wanted to register or join a meeting controlled by someone else, they would have to re-register or be re-created by that admin.  Is this correct?
    I'm trying to confirm this so that I know how to register a user on my website.  It would be ideal if my website would register the user and also log the user in without the user having to enter a separate password (my website would generate and store the password).  If the API creates a user only for my meetings then this is not a problem.  The user will just always have to go through my website to get to the meeting.  However, if the user created by my Adobe API account can be used to access/register in another person's meetings on Adobe then this approach is not so good because the user would need to know their password.

    yea, guest registration is not an option as I need to restrict access to the meeting.
    My main concern is that another Connect account holder can change the user's password.  If this ever happens, my website would have an old password and would be broken because it wouldn't be able to log the user into their meeting.  This may be a rare case, but the website will be charging for these meetings/webinars.  If the user can't get in at the time of the meeting....  i'll have a lot more problems.
    I guess I'll just need to provide a way for the user to change or enter their own password. 
    Thanks for the info!

Maybe you are looking for

  • On how many mac's can I install Lion

    I purchased Lion on my mac mini which I use as media center with Philips LCD (at the moment lot of problems as 10.7 has a bug with HDMI output to LCD TV's but assume that will be fixed soon). Now I also would like to install Lion on my MAc Pro, if I

  • Firefox always shows text fields in light blue. Can't fix it. Help plz. Hate using IE.

    Some web text fields I can type in and I don't see the text just a light blue bar in the field. Other text fields I can see the text I type into them but all the text fields are always light blue. I tried un-installing and re-installing many times. O

  • Where can I buy a wall charger for a third generation iPod Touch?

    Does anyone know where I can buy a wall charger for a third generation iPod Touch?  I am giving this iPod to my father because I want to buy myself a fifth generation iPod Touch for my birthday.  Could I just get an iPhone 3GS or iPhone 4 or 4S wall

  • Help with recursive function to print number patterns

    I'm sorry for having to ask for homework help - I'm badly stuck on this! Can someone give me a kick in the right direction with this? need a recursive function with a single positive int parameter n. the function should write (2^n - 1) integers and s

  • I need a web server, what software do i need to dowload?

    I need to install arcIMS 4.0.1 (GIS) in win2000. This software requires a web server. I am confuse, there are lot OAS products. Could you please tell me what do I need to install? I requieres: web server (could be oracle Application server using apac