Problem with the clause.

I use WITH clause in one of my request... and instead to choose the table WITH I use for INSERTING records... I can do this...
I write the quesry below and the error message... Will be great if someone can give an idea...


WITH GADGET_MAP AS (SELECT UCP_AWU_PK, PRD_AME_PK FROM FSI_AT_USER_COUNTRY_MAPPING, FSI_AW_PROFILE_DETAILS WHERE UCP_PRF_PK = PRD_PRF_PK AND PRD_AME_PK IN (SELECT AME_PK FROM FSI_AW_MENU WHERE AME_GADGET_TYPE IS NOT NULL) LESS SELECT UGM_AWU_PK, UGM_AME_PK FROM FSI_AW_USER_GADGET_MAPPING) INSERT INTO FSI_AW_USER_GADGET_MAPPING (UGM_PK (, UGM_AWU_PK, UGM_AME_PK, UGM_GADGET_HEIGHT, UGM_GADGET_COL_ID, UGM_GADGET_ROW_ID, UGM_GADGET_MAX_ITEMS, UGM_GADGET_ANIMATION, UGM_GADGET_RELOAD_MIN, UGM_MIN_MAX_CLOSE, UGM_GADGET_TITLE, UGM_GADGET_FORM_VALUES, UGM_GADGET_DB_FILTER, UGM_GADGET_TITLE_KEY, UGM_GADGET_CREATED_BY, UGM_DELETE_ALLOWED, UGM_SHOW_MOBILE, UGM_IS_ACTIVE, UGM_MOB_SEQ, UGM_GADGET_GRAPH_TYPE) SELECT UGM_PK_SEQUENCE. NEXTVAL, UCP_AWU_PK, PRD_AME_PK, AME_GADGET_HEIGHT, AME_GADGET_COL_ID, AME_GADGET_ROW_ID, AME_GADGET_MAX_ITEMS, AME_GADGET_ANIMATION, AME_GADGET_RELOAD_MIN, 'X', AME_NAME, AME_GADGET_FORM_VALUES, AME_GADGET_DB_FILTER, AME_RESOURCE_KEY, 1, "N", "N", AME_IS_ACTIVE, AME_GADGET_MOB_SEQ, NULL FROM FSI_AW_MENU, GADGET_MAP WHERE AME_PK = PRD_AME_PK;

Error: -.
ERROR on line 1:
ORA-00928: lack of SELECT keyword

Thanks in advance...

You must reformat the query.

INSERT INTO FSI_AW_USER_GADGET_MAPPING
 (UGM_PK ,UGM_AWU_PK ,UGM_AME_PK ,UGM_GADGET_HEIGHT ,UGM_GADGET_COL_ID ,UGM_GADGET_ROW_ID ,UGM_GADGET_MAX_ITEMS ,UGM_GADGET_ANIMATION ,UGM_GADGET_RELOAD_MIN ,UGM_MIN_MAX_CLOSE ,UGM_GADGET_TITLE ,UGM_GADGET_FORM_VALUES ,UGM_GADGET_DB_FILTER ,UGM_GADGET_TITLE_KEY ,UGM_GADGET_CREATED_BY ,UGM_DELETE_ALLOWED ,UGM_SHOW_MOBILE ,UGM_IS_ACTIVE ,UGM_MOB_SEQ ,UGM_GADGET_GRAPH_TYPE )
(
SELECT UGM_PK_SEQUENCE.NEXTVAL, UCP_AWU_PK, PRD_AME_PK ,AME_GADGET_HEIGHT ,AME_GADGET_COL_ID ,AME_GADGET_ROW_ID ,AME_GADGET_MAX_ITEMS ,AME_GADGET_ANIMATION ,AME_GADGET_RELOAD_MIN ,'X' ,AME_NAME , AME_GADGET_FORM_VALUES , AME_GADGET_DB_FILTER , AME_RESOURCE_KEY ,1 ,'N' ,'N' ,AME_IS_ACTIVE , AME_GADGET_MOB_SEQ ,NULL
FROM FSI_AW_MENU ,
(SELECT UCP_AWU_PK, PRD_AME_PK FROM FSI_AT_USER_COUNTRY_MAPPING , FSI_AW_PROFILE_DETAILS WHERE UCP_PRF_PK = PRD_PRF_PK AND PRD_AME_PK IN
(SELECT AME_PK FROM FSI_AW_MENU WHERE AME_GADGET_TYPE IS NOT NULL) MINUS
SELECT UGM_AWU_PK,UGM_AME_PK FROM FSI_AW_USER_GADGET_MAPPING )  GADGET_MAP
GADGET_MAP WHERE AME_PK = PRD_AME_PK
);

Tags: Database

Similar Questions

  • problem with the CURSOR and WITH clause

    Hi guys,.

    I have never created a package before. I try to run it, but I get:
    ORA-06550: line 8, column 16:
    PLS-00382: expression is of the wrong type
    ORA-06550: line 8, column 3:
    PL/SQL: Statement ignored

    I know that my problem is in the next section

    OPEN FOR V_io_cursor

    with GOT_R_NUM like)


    Is the above correct?

    When I copy paste the "heart" of the query, it works very well. I really have a problem with the CURSOR and the declaration.

    Here's the code in its entirety. I know that the code is much more then he returned, but ignore this overload that was to do some tests to make sure that I can achieve any query request.

    CREATE OR REPLACE
    PKG_SPF_NATIONALREPORTS PACKAGE BODY IS

    PROCEDURE GET_NATIONAL_TOTAL_RESULTS (P_SelectFields IN varchar2, P_SUMFields IN varchar2, io_cursor IN OUT C_RESULTS)
    IS
    v_io_cursor C_RESULTS;

    BEGIN

    OPEN FOR V_io_cursor

    with GOT_R_NUM like)
    SELECT
    -START P_SelectFields
    r.cli_served,
    r.EIER,
    -END P_SelectFields
    r.RC,
    r.Year_ID,
    r.period_id,
    r.agreement_type_ind,
    CONTRACT_NUMBER. CONTRACT_NUMBER_TEXT,
    YEARS.year_desc,
    RC_CODE.rc_code_id,
    RC_CODE.rc_code,
    AHRDA HOLDERS. AHRDA_ID,
    AHRDA HOLDERS. REGION_ID,
    AHRDA HOLDERS. PROVINCE_ID,
    AGREEMENT_TYPE. AGREEMENT_TYPE_ID,
    AGREEMENT_TYPE. AGREEMENT_TYPE_DESC_EN,
    ROW_NUMBER() over (partition R.YEAR_ID, R.CONTRACT_Number_Text
    order by
    P.PERIOD_desc
    (/ / DESC NULLS LAST) AS r_num
    RESULT r
    JOIN period p ON r.period_id = p.period_id
    JOIN CONTRACT_NUMBER ON r.contract_number_text = CONTRACT_NUMBER. CONTRACT_NUMBER_TEXT
    JOIN RC_CODE ON contract_number.rc_code_id = rc_code.rc_code_id
    JOIN AHRDA holders ON ahrda.ahrda_id = rc_code.ahrda_id
    JOIN AGREEMENT_TYPE WE AHRDAS. AGREEMENT_TYPE_ID = AGREEMENT_TYPE. AGREEMENT_TYPE_id
    JOIN the YEARS WE r.year_id = YEARS.year_id
    )
    SELECT year_desc
    -START P_SUMFields
    SUM (cli_served) AS sum_cli_served
    The SUM (eier) AS sum_eier
    -END P_SUMFields
    OF got_r_num
    GROUP BY year_desc
    ORDER BY year_desc
    ;

    io_cursor: = v_io_cursor;

    END GET_NATIONAL_TOTAL_RESULTS;

    Agree - all this talk of loops FOR is completely irrelvant.
    A refcursor is usually the exact mechanism to return a result set.

    What is C_RESULTS?

    Just use SYS_REFCURSOR.

    No need for local variable.

    OUT why? Not just walk OUT?

    PROCEDURE GET_NATIONAL_TOTAL_RESULTS
    (P_SelectFields IN varchar2, P_SUMFields IN varchar2, io_cursor OUT SYS_REFCURSOR)
    IS
    BEGIN
     OPEN io_cursor FOR ...
    END;
    
  • Problem with the County

    I try to do a report that displays the number of resources that are related to a task (detail) and I seem to have a problem. The report displays the total number of resources in the table (23) for each task (detail). I seem to think there is a problem with the where clause but wish assistance.

    Here's a picture of DR., if needbe
    [http://i35.tinypic.com/emvyv.jpg | http://i35.tinypic.com/emvyv.jpg]
    select distinct
        pd.pk_proj_detail_id    "Task Number",
        pd.task_title           "Task Title",
        pd.detail_status        "Task Status",
        pm.name                 "Associated Project",
        pm.pk_proj_master_id    "Project Number",
        
        (select 
            count(r.pk_resources_id) 
        
        from 
            resources r, 
            protrac_detail pd
        
        where
            pd.pk_proj_detail_id = r.fk_detail_id) as "Number",
        
        pd.trackit_number       "TrackIt! Number", 
        pd.createby_date        "Date Entered",
        pd.date_begin           "Date Began",
        pd.estimated_date       "Estimated Completion Date",
        pd.date_end             "Date Completed"
        
    from
        protrac_detail pd,
        protrac_master pm
            
    where 
        pd.fk_proj_master_id = pm.pk_proj_master_id

    I think you want to see protrac_detail again in your scalar subquery.

    select distinct
        pd.pk_proj_detail_id    "Task Number",
        pd.task_title           "Task Title",
        pd.detail_status        "Task Status",
        pm.name                 "Associated Project",
        pm.pk_proj_master_id    "Project Number",
        (select count(r.pk_resources_id)
         from   resources r
         where  pd.pk_proj_detail_id = r.fk_detail_id
        ) as "Number",
        pd.trackit_number       "TrackIt! Number",
        pd.createby_date        "Date Entered",
        pd.date_begin           "Date Began",
        pd.estimated_date       "Estimated Completion Date",
        pd.date_end             "Date Completed"
    from
        protrac_detail pd,
        protrac_master pm
    where
        pd.fk_proj_master_id = pm.pk_proj_master_id
    
  • Anyone having problems with the new iPhone LTE connection 7 on Verizon?

    I am now on my iPhone second 7 with Verizon. I had four phones for me and my family. I have now had issues where I have no signal in the same areas where my signal allows to be strong. I can't solve the problem with the activation/deactivation of the airplane and then mode again in normal mode. My phone will rest with no signal for 5 minutes, then going to LTE with three bars. I also had the problem where I had only 1 x signal, while my son standing right next to me has LTE. And he had the same questions, where I'm on LTE and it gets no signal. I use to have LTE where I live and work all the time, now it's spotty at best. Apple has replaced me and my sons iPhones but not luck. Still do. Any ideas or an any other suffering?

    (1) go to settings/cell phone/cellular data Options/enable LTE and select ONLY the DATA. This seems to solve the problem (as a temporary solution) for most of the people affected by this problem. The bad part is your request might not be as clear (since they cannot use the highest LTE signals) and you can make calls and data at the same time. But it does not solve the issue.

    (2) there are rumors (but you didn't hear that from me that we only are not supposed to discuss beta software program Apple in this forum) that the new version of Apple Beta for iOS (which also includes an update of the software carrier Verizon to 26.0) seems to solve this problem. So, there's a light at the end of the tunnel.

  • Sierra Siri, «I have some problems with the connection...» »

    Guys,

    I just installed Sierra on my MacBook Pro (retina, 13 inches, early 2015) version 10.12. I can't get Siri at work, the app tracks, he hears what I'm saying, but after awhile, he returns with two messages, both on the screen and verbally "I have some problems with the internet connection. Please try again in a moment. "&"Sorry, I'm having problems with the connection. Please try again in a moment. »

    Any ideas?

    Thank you

    N

    It's a network problem.

    Check the proxy settings that blocks maybe, or a firewall.

    System Preferences > network > Advanced (for your current connection) > Proxies

    Something there?

  • Siri does not (problems with the connection)

    Hello

    I installed macOS Sierra yesterday. Everything seems to work fine, except Siri. With Siri I always get an error message "I am having some problems with the connection. Please try again in a moment. ». But this seems to appear every time. The network connection works fine, I can't access the Internet without problem.

    No idea how solve the problem?

    I use an iMac (27 inch, mid-2011). Internal microphone is connected, I also see the 'waves' change while I am speaking.

    Concerning

    Thomas

    Hey, thochstrasser. Thank you for using communities of Apple Support.

    It seems that Siri is reluctant to make his debut on your iMac after upgrade to Mac OS Sierra. I want to make sure that you get the benefit of this new feature on a Mac.

    1 try safe mode if your Mac does not start -even if your iMac to market, safe mode makes sure it starts successfully.

    2. How to test a question in an another user account on your Mac - since this is most likely a software problem, test to another user will indicate if it is right to your user account or throughout your system.

    3. use Time Machine to back up or restore your Mac - if it seems to be systemic, the next step should not cause problems. But it is always better "to have" a backup to the "need".

    4. on OS X Recovery - the issue as part of the operating system, reinstall should do.

    Have a great weekend!

  • iOS 10 problems with the Mail application

    Dear Apple and community support,

    Here's my problem:

    I have upgraded to iOS 10 on my iPhone 5s this afternoon (September 13), and now I'm not able to open e-mail - Yahoo!, and Gmail. I can receive emails, I'm not able to view the body of these emails. When I press on them, all I see is a blank white page. I can't answer emails either. I can only their flag or remove them. However, I am able to compose new e-mail messages.

    Here are the steps that I've taken to try to solve my problem:

    1. Restarted my phone
    2. Remove and re-add my Mail accounts
    3. Made a backup and a restore full while that plugged into my laptop with the latest version of iTunes.

    I should be grateful if you would help or more information on this issue.

    Thank you

    Emily

    I also have problems with the Mail application.  On my iphone, ipad, and Mac Pro.  I have several addresses, a MSN, another on Go Daddy and Gmail.  I have various weird problems with threads and every day he re-charge my emails, like if I have never read before.  Something is really problematic with Mail.

    Can the people of APPLE, you help me?

  • Problem with the installation of iOS 10

    I tried to install iOS 10 earlier but it did not work, so now that I'm trying to reinstall iOS 9 if my phone will work again, if this does not work I have to reset my phone (but I am a fool and did not a back-up because I never had a problem with the software updates in the past if all data will be lost).

    < published by host >

    The same problem with me too. After installing ios 10 nuer OTA my iphone brick! I'm trying to re - install ios 9 i-Tunes, but 2 hours now always stop installation... what happent?

  • Hello! Someone has some problem with the haptic on Macbook 12 "2016 function? It does not work on my Mackbook.

    I'm trying to figure if someone has my problem with the haptic on Macbook 12 "2016 function. The option is checked in the preferences system, but it does not work.

    Thank you

    Hello luigi10m,

    Thanks for posting on the Community Support from Apple. From your post, it looks like your haptic feedback does not work when you click using your trackpad and the setting is enabled. I know that this is a great feature and it is important to make it work. I'll be happy to help you.

    First of all, I would like to assure you that in system preferences > Trackpad > clicking silencer is not checked, that might help. In addition, it would be useful to reset the settings of the SCM. You can find instructions here: reset the management system (SCM) controller on your Mac - Apple Support

    I'll also include those for you here:

    1. Stop the Mac.
    2. Plug the MagSafe or USB - C adapter to a power source and to your Mac.
    3. Use the built-in keyboard, press shift-control-Option on the left side of the keyboard, then press the power button at the same time.
    4. All the keys to unlock, then press the power button to turn on your Mac

    Take care!

  • I have a problem with the content of spam. Somewhere in the Fox appeared script that's choking me audio spam. Every 30 minutes he's playing an audio clip that is malicious.

    Hello.
    I have a problem with the content of spam. Somewhere in the Fox appeared script that's choking me audio spam. Every 30 minutes he's playing an audio clip that is malicious. I can't find the settings as it eliminated. Now, I don't have any plug-ins and Add-ons strange that were not initially in the Fox, but the problem is there.
    I use the Fox years. The problem, he had 1.5 months after Fox cleaning. If the problem can't win, I'll be forced to give up the browser, and I wouldn't.

    Could test you mode without failure of Firefox? It is a standard diagnostic tool to disable some advanced features of Firefox and extensions. More info: questions to troubleshoot Firefox in Safe Mode.

    Does not work if Firefox: Hold down the SHIFT key when you start Firefox.

    If Firefox is running: You can restart Firefox in Mode safe mode using either:

    • button "3-bar" menu > "?" button > restart with disabled modules
    • Help menu > restart with disabled modules

    and OK reboot.

    Two scenarios: A small dialog box should appear. Click on 'Start mode safe' (not update).

    Any improvement?

    If the problem persists in Mode without failure, could reinstall you Firefox in this way:

    Clean reinstall it

    We use this name, but it isn't about deleting your settings, this is to ensure that the program, files are clean (not incompatible, corrupt or exotic code files). As described below, this process does not disrupt your existing settings. Don't uninstall NOT Firefox, that does not need.

    (1) download a fresh Installer for Firefox 38.0.5 of https://www.mozilla.org/firefox/all/ in an ideal location. (Scroll down your preferred language).

    (2) close Firefox (if applicable).

    (3) to rename the program folder, either:

    (Windows 64-bit folder names)

    C:\Program Files (x86)\Mozilla Firefox
    

    TO

    C:\Program Files (x86)\OldFirefox
    

    (Windows 32-bit folder names)

    C:\Program Files\Mozilla Firefox
    

    TO

    C:\Program Files\OldFirefox
    

    (4) run the installer you downloaded in the #1. It should automatically connect to your existing settings.

    Any improvement?

    Note: Some plugins can only exist in this OldFirefox file. If it is missing something essential, present in these files:

    • \OldFirefox\Plugins
    • \OldFirefox\browser\plugins
  • Siri having problems with the connection.

    Hello

    I have an iPhone 6 Plus, 64 GB with IOS version 9.3.3 (G 13, 34) and the carrier is Vodafone.

    I have problems with Siri, feel when I asked her a task (research or appeal), after a few seconds of waiting, the answer is always "sorry, I have a problem with the connection. Please try again in a moment. »

    I have the right connection with Internet with WIFI and 4G data stream.

    I did reset network settinjg, but I don't see any improvement.

    Please indicate what I can do and if it's a common problem with the iphone 6.

    Thank you!

    CC

    After the reset of the iPhone ("home" button and close button for 10 seconds, with the iPhone connected to the computer), Siri works!

    I am concern I have to do this reset every 2-3 weeks if I need services of Siri...

    Good luck to all of you who have the same problems with their iPhone of hares!

    CC

  • I'm having a problem with the pictures on some pagies partially of fully duplacating other tiles nearby. Only occurs with Firefox.

    I'm having a problem with the photos on some pages partially to duplicate completely other tiles nearby. Only occurs with Firefox. The thumbnails are refreshed when I move the cursor over them, but again distort when you scroll the page. I have a few images, but cannot up-load them on this page of support for some reason any. Maybe I can email you if you need?

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe

    You can check the preferences of network.http. * on the topic: config page and make sure that they have the default value.
    You can restore the default user set prefs ("BOLD") via the context menu.

  • I had a few problems with the search engines and history

    My default search warning back to Yahoo after a reset on my computer. Close Firefox keep one to change but by restarting the computer, it takes.

    I can't open the sidebar history. The option "view the history of your" opens its tab fine (the drop-down menu that says 'Show History Sidebar', 'clear recent history... ("ect.). But, when you click on the "Show History Sidebar", nothing comes. Can I use the "Show history" option, but the sidebar does not open for some reason any.

    I just finished with a complete analysis of the Microsoft Safety Scanner and it said not that there is anything wrong. I have not reset the computer again to see if something has changed although after the factory reset (see the 2nd paragraph) it seems returned to Yahoo (search engine he kept going to happen).

    I open the history tab in the menu of the toolbar, and everything seems fine here. I also had him always use private off all first browsing mode. After activating the option clear history when Firefox closes, I ended up having to reset to factory settings (things he saves were saved isn't really a problem) that doesn't seem to fix the problem with the sidebar of history not to come.

  • Problems with the battery drain on iPhone 6

    Hello! This is my first time posting but I had some problems lately with my iPhone while keeping a charge.

    So, this has started to happen a month ago (exactly one year after I bought my iPhone) and my battery drains just exponentially and evacuates it sometimes when I'm not using it and the internet is not on. For example I'll fully my phone until I fall asleep and I'll put it on airplane mode before going to sleep. By the time I wake up, the battery will be down to 60%. I do not use it during this time, I don't get notifications because all data and the internet is disabled. I do not understand why it is empty.

    Anyway, I've taken to the Apple store Genius bar twice now and they have not been able to fix it. They have tried to restore it... I did that before I went to the Apple store, but they decided to do it again and the second time the guy just told me to turn off all the background app refresh or anything I did but it we continue to attract.

    When I was at the Apple store, they also checked my battery and everything was normal. I got 100 below the number of average cycles since the age of my phone and the battery was in the green at 94%.

    I am really frustrated after two trips to the store person has managed to fix my phone and I have the impression that they will try to coax me to pay for something that won't fix my phone. Also if there is a problem with Apple hardware and nothing of what I've done so why should I pay for it when it started to happen at the level of the one-year mark. It's so boring, but if anyone else has had a similar situation for advice or assistance would be greatly appreciated.

    a4annalisa wrote:

    When I was at the Apple store, they also checked my battery and everything was normal. I got 100 below the number of average cycles since the age of my phone and the battery was in the green at 94%.

    I am really frustrated after two trips to the store person has managed to fix my phone and I have the impression that they will try to coax me to pay for something that won't fix my phone. Also if there is a problem with Apple hardware and nothing of what I've done so why should I pay for it when it started to happen at the level of the one-year mark.

    Yes that is exactly what they are trying to avoid. As you explained that you have visited it there twice to attempt to solve this problem, they could have offered to replace your battery for $79 that with your current battery showing 94% of its original capacity, that would not have done much for you at all.

    Have you been having problems with the reception of your carrier recently, when all this started happening? Were you see 1 or 2 points of service when you used to see 3 or 4? When you have restored your iPhone, you restore it as a new iPhone or restore a backup top later? Just try to refine some possibilities for the continuous emission.

  • I have a mac book pro 2009 model, now when I try to load it, there is no green light on the adapter and the laptop does not charge. Not sure if there is a problem with the card or the battery or the laptop. Kindly help

    I have a Mac book pro 2009 model, when I try to load it it not there no green light on the adapter and he is in charge. Not sure if there is a problem with the adapter or the battery or the laptop. Kindly help... Thank you

    Have you tried:

    Portable Apple computers: Troubleshooting MagSafe adapters - Apple Support

    This is the Office Mac Pro forum. I asked that your post be moved to the MacBook Pro laptop forum.

Maybe you are looking for

  • With the help of 4 k on macbook pro 2014 retina

    I shoot with a professional 3 Ghost and wondering how to see 4 k on the mac (Macbook Pro retina 15', mi 2014) and love at first sight?  Do I need to calibrate the screen?  Or can someone tell me best practices for videographers again using Final Cut.

  • Video of mark as favorite in the AppleTV Youtube app

    How to mark a video as a favorite in the Youtube on the AppleTV app 4 (with the remote Siri)?

  • Longevity of ink CLI-251XL (drying)?

    Hi all!  I am new to this forum (as you can see). Background for my question: I am very new to inkjet printers - all my printers have been and are, lasers except one.  This one is a dedicated disc printer that uses a motor Lexmark and ink cartridges.

  • Download of attachments to e-mail

    error reads c:\users\brenda\appdata\local\temp\kstotnin.pdf.part could not be saved because the source file could not be read.

  • How to restore factory settings when Windows does not load?

    I'm recovering from the laptop (Dell Inspiron N5010) friend who has been infected with a malware ransom (ICE Cyber Crime Center Backdoor.Win32.ZAccess.erds). I used the Kapersky rescue disc to remove the virus from the ransom but now Windows will not