column of question: query customerID sqlplus appear twice

I tried several ways to view a query where indicates the client who made more than 3 rentals from 01 Nov to 31 Dec. However, for some reason any the customerID column appear twice.

* I use 3 tables to get this result:

Select RentalAgreement.membershipcardid as "MCardID."
Customer.CustomerID, Customer.CNAME, Customer.Address,
membershipcard. CustomerID, Invoice.rentc, RentalAgreement.DateAndTimeOfIssue,
Count (RentalAgreement.membershipcardid) as 'NOfRents' RentalAgreement, customer, membershipcard, Bill
where rentalAgreement.membershipcardid = MembershipCard.membershipcardid
and customer.customerid = membershipcard.customerid
"and RentalAgreement.DateAndTimeOfIssue between November 1, 2012' and 31 December 2012"
RentalAgreement.membershipcardid group, MembershipCard.
CustomerID, Customer.CNAME, Customer.Address, Invoice.rentc, Customer.CustomerID, RentalAgreement.DateAndTimeOfIssue;


MCardID CUSTOMERID CNAME ADDRESS CUSTOMERID RENTC DATEANDTI
---------- ---------- ---------- ------ ---------- ---------- ---------
NOfRents
----------
107 N151AS of EDuois 27 27 60 11 November 12
5

108 28 WDuois N151AS 28 60 19 November 12
5

101 N193AS of ALuois 22 22 60 22 November 12
5


MCardID CUSTOMERID CNAME ADDRESS CUSTOMERID RENTC DATEANDTI
---------- ---------- ---------- ------ ---------- ---------- ---------
NOfRents
----------
101 N193AS ALuois 22 22 60 21 of November 12
5

101 N193AS of ALuois 22 22 60 20 November 12
5

101 N193AS of ALuois 22 22 60 24 November 12
5


MCardID CUSTOMERID CNAME ADDRESS CUSTOMERID RENTC DATEANDTI
---------- ---------- ---------- ------ ---------- ---------- ---------
NOfRents
----------
109 N151AS of ADDuis 30 30 60 3 December 12
5
Thanks for your time.
I'm not sure if this request seems to be logical, I would be grateful to any online guide to pl/sql

Hello

978308 wrote:
Hi to you for your help, I have another question about pl/sql.

When you have a new, separate question, then you should start a new and separate thread. This thread has 4 replies and is marked as 'response '. most of the people who have not participated in this thread (and in this case, it's just you and me) are not going to start watching now. You will get much better response if you start a new thread.

I use oracle 11.2.0. I'm trying to get a report of repairs, so I put a condition if:
3. WHERE RETURNED > 1; - then it will only show the repair costs

I got an error after exec report_cursor

SQL > exec report_cursor;

ERROR on line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'REPORT_CURSOR' must be declared.
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

---------PL/PSQL-----------------------------

The line above shows what is simply boredom!
What follows is not just the PL/SQL code. Like many scripts, it's a mixture of SQL * more and PL/SQL (and, unwittingly, pure SQL, too).
'SET SERVEROUTPUT ON' is a SQL * Plus command. Like all SQL * most orders, be completed before the end of the line. In this case, it means "DECLARE CURSOR report_cursor IS" is taken as part of the SET command. When I run it, I get a SQL * Plus error message "SP2-0158: unknown SET"declare"option

SQL >
1 set serveroutput on DECLARE CURSOR report_cursor IS

If the first line is ignored. Since you have not started a block PL/SQL, lines 2 and 3 are considered as being a pure SQL query.

2. SELECT INVID REFERRED, INVOICEDA, REPAIRDETAIL OF THE INVOICE
3. WHERE RETURNED > 1;
4 I_INVID INVOICE. INVID % TYPE;
5 I_REPAIRFEE INVOICE. SENT % TYPE;
6 I_DATE INVOICE. TYPE % INVOICEDA;
7 I_DETAIL INVOICE. TYPE % REPAIRDETAIL;

I know not why the lines 4-7 do not cause any errors, because the DECLARE has been ignored.
From line 8, the script is interpreted as PL/SQL: it looks like an anonymous block that does not have the optional DECLARE section.

BEGIN 8
9 DBMS_OUTPUT. Put_line ('ID, cost and Scooter fixed Details'); ...

Please formatting your code. It will help you as well as others.

All you have to do is to start the DECLARE statement on a charge line:

set serveroutput on 

DECLARE
    CURSOR report_cursor IS
            SELECT  INVID
        ,         REPAIRFEE
        ,        INVOICEDA
...

Tags: Database

Similar Questions

  • OfficeJet Pro 8600 appears twice in the selection of drop down menu printer with each of the different names.

    Hello!

    I recently acquired an Officejet Pro 8600 and immediately connected to my network wireless as stated in the manual. No other type of connection has been used beforehand and the operating system is Windows 7 64 bit.

    After that the installation of the printer driver appears twice each time that a program asks me to select a printer from the drop of the printing devices in the typical menu of preparation of printing.

    There is an entry for "Officejet Pro 8600 (network)" and something in the sense of 'HP95CDN' (Officejet Pro 8600). I can't remember the exact names off the top of my head, but it is the name of the printer with the 'network' in brackets in one case and a kind of shortcut ID printer with full name in parentheses in the other case.

    According to the program, one of the options gives the desired impression while the other simply causes a queue of indelible impression for the name of the unit in question that is stuck to a few KB of data transmission.

    Usually printing works with the device with the identification of the printer in its name, but I recently had a case where with LibreOffice printing only works with the other choice.

    Can someone explain to me exactly means?

    See you soon,.

    Pete

    Direct entry Wireless will be visible under menu so direct wireless is on... However, since you are able to print another icon (not the network icon) I assume direct wireless is off coz you will not be able to print from wireless directly on the printer if you are connected to the router.

    I believe that the icon of the printer (not the network icon) has a port WSD assigned and is automatically detected by the operating system and installed.

    Go to service window and check if you have any input that says function Discovery Provider Host and see if it is started. Try to stop the service, and remove the icon of the printer (not the network icon) in the print server properties.

    Restart the PC and check if the icon comes back or try to uninstall and reinstall

    Let us know the result

  • PFX ceritifcate with the same alias in the keystore appears twice with different certificates

    Hi all

    I want to install Certificate .pfx using the installation wizard. 1 the key encryption certificate and 1 certificate for digital signature.
    I see my shop with the keytool in the windows command - 1 key certificate to encrypt lying appears twice and the 2nd certificate does not appear
    Not at all.
    Could you be it someone please let me know the model of behavior and how keystore alias are determined by default etc. ?
    Also let me know the root cause of this behavior.
    Any help will be appreciated.
    Concerning
    Jony Khatri
    Hello Jony,
    I understand that you do not want to install Certificate .pfx using the installation wizard. Let me know if this isn't the issue.

    It is better suited for the IT audience Pro on MSDN. Please ask your question in the MSDN Support Forum. You can follow the link to your question:
    http://social.msdn.Microsoft.com/forums/en-us/category/netdevelopment
    For reference:
    I hope it helps. If you have problems in the future, please let us know. We will be happy to help you.
  • Why the same ad does not appear twice in the Analytics Beta?

    I have a few announcements appear twice. But also, these ads are ads that are listed as free content.

    Are the numbers that I'm looking at reflective free views and views in the downloaded folio? That's my assumption. I am not mistaken or something else going on?

    When readers download the folio, they can display ads in your folio. If you have Web / Article Viewer enabled in your publication, so your readers can display ads in Web / Article Viewer. These ads will trigger an Ad event as soon as a player allows to reverse the advertising (Article reported as Ad) to see. If you have any questions, you can reach me directly ([email protected]). Please attach the screenshot of how demonstrate announcements up to two times.

  • format code appears twice in error is

    Hi all

    I get the error like "formar code appears twice" during the execution of this query.



    Select to_timestamp (sysdate-4 |) ("10:00","DD/MM/Aaaahh AM') of dwh.dim_time

    Requirement is:-days number Rollback is coming.so first, I need to restore the number of days with system day after that I need to add time and time AM Pm(these are coming from Different String).

    Could someone help me.

    Thanks and greetings
    Swetha.

    user12087180 wrote:
    Select to_timestamp (sysdate-4 |) ("10:00","DD/MM/Aaaahh AM') of dwh.dim_time

    You MM two times in your format mask...

    Is MM month
    MI is minute

  • Why my sent mail appears twice in hotmail

    I have hotmail and google mail accounts, but when I send an email from hotmail on my mac mail application it appears twice in the sent folder. This happens with my gmail, however. Any ideas please?

    Hello...

    See if a reconstruction (Hotmail account) helps > Mail (El Capitan): rebuild the mailbox

  • Wallet appears twice in location services

    On my iPhone running iOS 9.3.1 portfolio 6 appears twice under settings > privacy > location services.  You never have or when you use the options and the other has never and always.

    One else you have this?  Seems strange.

    Post edited by: Match144

    I have only portfolio once with ever and while using options

    Try a forced reboot - after open applications using the app Chooser - invoked by fast double pressing the home button and drag upwards on each app until it disappears from the screen.

    Meet the sleep/wake and home buttons down until you see the logo  - then release and allow normal start upward

  • When I press the home button my home page tabs appear twice

    I use several tabs as my home page. When I start Firefox, everything is fine - all tabs appear as expected. But, at any time after that, if I push the home button, all tabs on the homepage (except the first) will appear twice.

    Make sure that you have not set multiple home pages.

  • Why did Adobe Flash Player 10 Activex appear twice in Add/Remove programs?

    I tried this request in an Adobe forum but got no answer. I use Windows XP SP3. When I go into Control Panel Add / Remove Programs, I see that Adobe Flash Player 10 Activex appears twice. Same name and both show the last time that I acceded to them was 14/08/2010. The second one is slightly different because it shoes 2.42 MB in size. Why the duplication? Can I delete one? Besides, if it has not been used since August of last year, do I need at all?

    Information on "Last use" and "size" in Add/Remove programs are notoriously inaccurate.

    Each of the Adobe Flash Player uninstaller from Add/Remove Programs entries.

    Open Windows Explorer and go to C:\Windows\system32\Macromed\Flash

    The current Flash ActiveX control is Flash10s.ocx.  There are several other auxiliary files as well.  If there are any files with the previous letters after 10 (e.g., Flash10p.ocx), delete them.

    Go to http://get.adobe.com/flashplayer/ to download the current version.

  • How to get the value of a column in sql query?

    Hi, anyone knows how to get the value of a column in sql query?

    Here is my code, the value must be 1350079224397 in my PB, but I get 0

    QString query ("SELECT version FROM db_version");

    QVariant result = sda.execute (query);
    QVariantMap versionMap = result.toList () such () .toMap ();
    If (! versionMap.IsEmpty ())
    {
    qDebug()<"Version: "=""><>
    }

    OK, I have the solution

    QString query ("SELECT version as version FROM db_version");

  • Cover page appears twice in exported ePub

    Tried all the settings I could find anything not made, cover page appears twice when I discover the ePub exported in Adobe Digital Editions.

    I am a newbie to sort of thing.

    I use InDesign CC 2015.

    I tried my documents on a 'book', with separate documents of 'Cover', 'TOC' and 'Chapters' of the building.

    I tried to build my document to a "single" InDesign document

    In both cases, I get the same result.

    When I open the ePub for display, the cover page is displayed alone, because I selected the option 'rasterize '.

    but the same page then follows even once, but not pixelated this time. I can say that the title which is in separate text blocks floating on the background image.

    Beats me why this is happening.

    May not be a bug. I'm sure.

    Hi Roger,

    best practice is to export your coverage to an image (jpg). You could then remove the cover of your InDesign page (or keep a version of InDesign a part where you have to make a change). The ePub export, select the option "cover > choose the Image ' and add the path to the exported image. Fact! Now you should see a cover page.

    (There are these two behaviors in InDesign, as advanced users will have to choose between one of two situations, according to project specifications. In most cases, adding the cover of an external image brings the best result for the cover.)

    Kind regards

    Yves

  • Topics appear twice in the list of topics, however, each does exist only once in the project.

    Some subjects appear twice in the list of topics, but each exists only once in the project files. What are the causes for this and what can do to prevent it? I am using HR 11.0.4.291. I deleted the CPD file.

    Here is an example:

    Change in all files in a folder specific to say the first element. There may be two files in the same folder that Windows does not allow that. My guess is that the duplicates are in different folders and change the folder will help you find the original and the duplicate.

    Also open both the list of topics. Should be the red squares in it? If Yes, you have sort of a release in the source.

    Post back with what you find.

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • Hot Sync hangs at the agenda, agenda appears twice on the list

    I'm trying to migrate my Palm desktop to my new 64 bit Windows 7 PC.  The PDA is a Z22.  I've updated desktop to v6.2.2 and synchronization via infrared, as Win 7 64 bit does not support the Z22.

    When I try to do my first sync, Hot Sync hangs up on the Agenda (the only application that I checked for synchronization in the hot sync settings).  I ran DbFixIt2, who did find some files corrupted and deleted, but this has no effect on the next synchronization attempt, despite my once you have selected the setting "Pocket replaces Desktop.  I note that Agenda, address book, task list and Notepad appear twice on the list of State during the attempt to synchronize, but only once on the Hot Sync settings-Applications list.  During synchronization, the first quotation of Agenda indicates a successful synchronization (check mark), but it crashes on the second book to Date.  Tried to uninstall and reinstall office, without effect.

    Help!

    Thank you

    Jim

    Update... I didn't give it enough time.  Even on my PC new, great power, the initial synchronization (Agenda only) took 10-15 minutes.

    Jim

  • Payroll Run query does not appear on the payroll LOV

    Hi all

    Am on 12.1.3
    DB - 11 GR 1 material

    Wen, trying to run on PAYROLL:
    FACE below error:
    Payroll Run query does not appear on the payroll LOV


    Thank you

    Please post the exact name of the simultaneous program you want to submit as well as all the parameters.

    I understand that you get an error when you try to select the LOV to pass parameters, right?

    If the program has not yet been presented, then it is an expected behavior not to find any file of log/output.

    Please see if these MOS Docs Help.

    Simultaneous request for payroll, payroll name Lov for payroll run Erros: APP-FND-1436: the list of values can not find all the values for you to choose [333524.1 ID]
    Payroll run parameter list of values (LOV) in the process "Retry Payroll Run" does not display any values [1368390.1 ID]

    Thank you
    Hussein

  • horizontal sweep doing a few pages appear twice

    I have problems with a biggish - about 350 MB - lots of photos app. Each of the 4 sections of 12 image gallery is followed by three 'characteristics', all the separate articles. Functions have a non first screen, followed a slide show of the OSM and in some cases, another screen is a video, or pan and zoom.

    The problem I have is that when the value of a horizontal sweep, the first page of characteristics did not appear, but the slide show appears twice! If you select a vertical shot, everything is displayed correctly and works fine.

    What to do about this?

    Hope that works for you. Had me me for weeks climbing the walls! Has turned out, I had a cabbage white madly shine on an object that is part of a MSO. But I couldn't see him because he was white!

Maybe you are looking for

  • HP 15-ac125TU (N8M38PA): Wifi Lan driver need

    Hi guys, I recently bought a laptop HP [HP 15-ac125TU (N8M38PA)]. I tried many things for divers, but couldn't. Please suggest me how can I get drivers LAN WIFI for WIN8, 64 bit. Now, it's very urgent. Thank you.

  • Maximum screen resolution of Tecra A2

    Hi, can someone let me know how to increase the sceen on Tecra A2 above 1024 x 768 Res? Also the quality is not very good, as pixelated and DVD movies appear a little grainy. Any ideas?

  • Pavilion dv4-1540us: No Sound from speakers - Pavilion dv4-1540us

    On this laptop's built-in speakers do not seem to work. I suspect that it's a hardware problem and not a Windows/driver setting as the sound is fine with headphones or external speakers, but of course I could be wrong on this matter. All the obvious

  • HP Envy 15-j002eg mSATA SSD update

    Hello people I'm planing to buy this beautiful model, it has a nice card but lacks in the part of the HARD drive.It comes with 12 GB of RAM. Now, I am planning to buy an mSATA SSD of 24 GB or more and put it in the slot mSATA for thing Intel Rapid St

  • QUERY CONTACTS

    I have a lot of contacts that I have to constantly - but individually by e-mail. When I hold in the start menu of n in name of the person "regularly" 'CREATE a MESSAGE' box, it is not automatically enter; I have to go to the CONTACT, click on the nam