A really WEIRD thing!! Maybe you could give me a suggest.... :-(

Hello everyone... I'm trying to create this as follow:
CREATE TABLE OFFICE_DATI_TEST
ID NUMBER NOT NULL,
FIELD1 NUMBER,
FIELD2 NUMBER,
FIELD3 NUMBER,
CONSTRAINT PK_ID_DATI PRIMARY KEY (ID)
USING INDEX TABLESPACE test_indexes
CREATE SEQUENCE SEQ_OFFICE_DATI_TEST
INCREMENT BY 1
START WITH 1
MAXVALUE 1E27
MINVALUE 1
NOCYCLE
NOCACHE
NOORDER;
CREATE TRIGGER TRG_OFFICE_DATI_TEST BEFORE INSERT ON MCROFFICE.OFFICE_DATI_TEST
REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
BEGIN
SELECT seq_office_dati_test.NEXTVAL INTO :NEW.ID FROM dual;
END;
CREATE OR REPLACE TYPE T_OFFICE_DATI_TEST IS OBJECT
ID NUMBER,
FIELD1 NUMBER,
FIELD2 NUMBER,
FIELD3 NUMBER,
CONSTRUCTOR FUNCTION T_OFFICE_DATI_TEST(SELF IN OUT NOCOPY T_OFFICE_DATI_TEST)
RETURN SELF AS RESULT
CREATE OR REPLACE TYPE BODY T_OFFICE_DATI_TEST IS
CONSTRUCTOR FUNCTION T_OFFICE_DATI_TEST(SELF IN OUT NOCOPY T_OFFICE_DATI_TEST)
RETURN SELF AS RESULT IS
BEGIN
RETURN;
END;
END;
CREATE OR REPLACE TYPE t_t_office_dati_test AS TABLE OF T_OFFICE_DATI_TEST;
CREATE OR REPLACE FUNCTION FUN_OFFICE_DATI_TEST
RETURN T_T_OFFICE_DATI_TEST PIPELINED PARALLEL_ENABLE IS
BEGIN
DECLARE
TYPE c_office_dati_test IS REF CURSOR;
c1 c_office_dati_test;
out_rec T_OFFICE_DATI_TEST;
BEGIN
OPEN c1 FOR SELECT ID, FIELD1, FIELD2, FIELD3
FROM OFFICE_DATI_TEST;
LOOP
FETCH c1 INTO out_rec;
EXIT WHEN c1%NOTFOUND;
PIPE ROW (out_rec);
END LOOP;
CLOSE c1;
RETURN;
END;
END;
then I do just:
SELECT * FROM TABLE(FUN_OFFICE_DATI_TEST);
and I get an error as this:
ORA-06504: PL/SQL: Return types of Result Set variables or query do not match
ORA-06512: a "FUN_OFFICE_DATI_TEST", line 11
Why?...it's really simple and looks really ok looking at table structure and objects...
even compiling each object no errors appears....
Thanks
Luigi

Why are you making your thing utterly complicated? :(
Luigino wrote:
Hello everyone... I'm trying to create this as follow:
CREATE TRIGGER TRG_OFFICE_DATI_TEST BEFORE INSERT ON MCROFFICE.OFFICE_DATI_TEST
REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
BEGIN
SELECT seq_office_dati_test.NEXTVAL INTO :NEW.ID FROM dual;
END;
What the hell is this? Why do you need this trigger when you are just fetching sequence value?
Please explain.
CREATE OR REPLACE TYPE T_OFFICE_DATI_TEST IS OBJECT
ID NUMBER,
FIELD1 NUMBER,
FIELD2 NUMBER,
FIELD3 NUMBER,
CONSTRUCTOR FUNCTION T_OFFICE_DATI_TEST(SELF IN OUT NOCOPY T_OFFICE_DATI_TEST)
RETURN SELF AS RESULT
CREATE OR REPLACE TYPE BODY T_OFFICE_DATI_TEST IS
CONSTRUCTOR FUNCTION T_OFFICE_DATI_TEST(SELF IN OUT NOCOPY T_OFFICE_DATI_TEST)
RETURN SELF AS RESULT IS
BEGIN
RETURN;
END;
END;You are using NO_COPY. Why? Please explain.
>
CREATE OR REPLACE TYPE t_t_office_dati_test AS TABLE OF T_OFFICE_DATI_TEST;
CREATE OR REPLACE FUNCTION FUN_OFFICE_DATI_TEST
RETURN T_T_OFFICE_DATI_TEST PIPELINED PARALLEL_ENABLE IS
BEGINWhat is the function of this begin, when you are not using or writing any code in this outer begin block?
DECLARE
TYPE c_office_dati_test IS REF CURSOR;You want to create a type like this? Why?
c1 c_office_dati_test;
out_rec T_OFFICE_DATI_TEST;
BEGIN
OPEN c1 FOR SELECT ID, FIELD1, FIELD2, FIELD3
FROM OFFICE_DATI_TEST;
LOOP
FETCH c1 INTO out_rec;
EXIT WHEN c1%NOTFOUND;
PIPE ROW (out_rec);
END LOOP;
CLOSE c1;
RETURN;
END;
END;
then I do just:
SELECT * FROM TABLE(FUN_OFFICE_DATI_TEST);
and I get an error as this:
ORA-06504: PL/SQL: Return types of Result Set variables or query do not match
ORA-06512: a "FUN_OFFICE_DATI_TEST", line 11
Why?...it's really simple and looks really ok looking at table structure and objects...Is it? Is it a simple looking structure?
even compiling each object no errors appears....
If it is syntactically correct - then it won't show any compilation errors.
Thanks
LuigiWelcome.
My dear friend, please don't take my words personally. If you have any alternative easy process then you should go for that. Always try to achieve this with a Single SQL. If you cannot then only you should go for PL/SQL and if you are restricted there due to some non availability feature then you can go for Java Based Procedure.
Even if you are using PL/SQL, don't make simple thing complicated. Because, that may hamper your performance, too.
And, finally it will be wise to decide and design your PL/SQL solution in a simpler manner rather than making things more complicated way. Results may not only increase the overhead but also create a maintenance problem in future of that coding.
Hope you get my idea.
My best wishes. :)
Regards.
Satyaki De.

Similar Messages

  • I've bought 640 rubies pack and have used it. But the day after, my pack ran out. I'd appreciate if you could give me back my pack or help me in any way possible.

    I've bought 640 rubies pack and have used it.
    But the day after, my pack ran out.
    I'd appreciate if you could give me back my pack or
    help me in any way possible.
    The Glu Customer Care answer my question;
    Hello, and thank you for contacting Glu Mobile Customer Care
    The game you mentioned does not save online. If you have made a backup using "iCloud" or "iTunes backup" then you may be able to restore to that last save point on your device which will include whatever you had for currency at the time when the save was created.
    Unfortunately, we do not have a way to restore game progress, this is done by the user on the device itself using the backup and restore method for the entire device.
    If you have not performed a backup save for your device before this problem happened and you have lost currency from purchases, please contact the iTunes store customer service to inquire about your purchase and request help regarding this loss of currency issue.. Apple does not allow developers to handle billing issues.
    If you get an answer saying that In-App purchases are the responsibility of the developer, please insist that they assist you as we have no way of accessing their purchase records. We are the developer and do not have access to any account or billing information on the iTunes App Store.
    We hope this information assists you and we sincerely apologize for the inconvenience.
    Regards,
    Glu Mobile Customer Care

    We are fellow users here on these forums, you're not talking to iTunes Support. You say that you used the pack that you bought and that it then ran out - does that mean that you used it all up ? If you didn't use it all up but your game lost the purchase then you can try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Mail is suddenly doing really weird things

    Hi, I am starting to have my MAIL program acting very strange.  For one thing, it keeps shutting down for no reason. Either in the process of reading or responding to an email, just sitting idle, or in the process of downloading new mail.  I have read on forums about deleting all 3rd party plug ins (I didn't have any), deleting "things to do" in iCal (again, I lead a boring life so nothing there), relaunching (about a dozen times a day now) and just about everything else suggested short of a complete reset which I am afraid to do as I can't lose any of the emails I have in the storage. I currenty have about 20GB of free space still (and have for years). I have run Onyx and ran permission fixes gallore.  It still shuts down for no apparent reason.
    Now here are some other things it is doing since this started about a month ago.  When I close out the program from the tool bar (Quit Mail), the window closes out but the MAIL remains in the tool bar with a greyed out "QUIT MAIL".  I can not open a new window as long as this is in this way.  I have to force quit mail to get it to relaunch.
    I am also getting a lot, and I mean a lot (about 20+ per day) of my old emails from the past three years popping up in various folders that they don't belong in and indicating that they are "unread" ie: bold lettering. When I say various, I mean they are showing up in folders that have nothing to do with the subject or the client. They are suddenly appearing in other client or project's correspondence.
    So what do I do or should I do.  I have kept these emails in their folders as I do refer back to certain client subjects that are sometimes up to three years ago. One folder is just of emails from my son who passed away in 2011. His emails suddenly show up as new mail in various folders as well. I know tomorrow is Halloween, but this is a bit too spooky (or technical) for me to figure out.
    Any one have any suggestions on what could be going on?  and suggestions to fix it?  Would a complete reset of MAIL erase all my folders and emails? I could probably loose some of my old client/project emails, but I do not want to lose my son's last correspondences to me.
    Thanks
    Lew

    Hi Lew,
    Not certain, but this can fix myriad Mail problems...
    Safe Boot from the HD, (holding Shift key down at bootup),  it will try to repair your Disk Directory while the spinning radian is happening, so let it go, run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move this folder & file to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    Reboot.
    If that doesn't do it and you can afford to redo all your Rules, try these & reboot...
    /Users/YourUserName/Library/Mail/MessageRules.plist
    /Users/YourUserName/Library/Mail/MessageRules.plist.backup
    Note, in 10.5 & up /Users/YourUserName/Library/Caches/Mail/ may or may not exist.
    If it continues to happen...
    Open Console in Utilities & see if there are any clues or repeating messages when this happens.

  • If You Could Give Creative Labs' Developers an Idea For Features

    What feature(s) would you try to talk them into putting into their next player?I'd say keep it around the size of the vision:M, the same look, but include a TV tunor, bluetooth connectivity (for bluetooth wireless headphones), put it in 30 and 60 gig sizes, and call it the "Zen Ultimate"?do you really think ipod could compete with a player like that?

    yeah wireless headphones will be great. I just think creative should implement new features and beat iPod to the punch, have wireless bluetooth technology BUILT INTO the unit, that way, you won't have to worry about that bluetooth adapter hangin off your player.

  • Really weird thing with NAT

    We recently had to change the IP address and subnet mask of our servers. I followed a couple of TIDs showing where all of the changes are to be made. We are now running into a very weird problem on our Border Manger server. We are running version 3.6 and it is on a Netware 6 server. When the server is rebooted, no internet traffic (other than HTTP proxy) can get through. I have checked all of the settings and everything seemed to be fine. Checked INETCFG to make sure that IP Packet Forwarding was enabled and made sure that pass thru was enabled. Ended up checking TCPCON and found that the IP Packet forwarding was disabled. In order to get IP traffic flowing again, we have to disable IP packet forwarding in INETCFG, save the settings, reinitialize the system, go back into INETCFG and reenable IP Packet forwarding, save the settings and reinitialize the system. Once this is done, everything seems to work fine (till the server is rebooted again) I cannot figure out what is causing this. Does any body have any direction to resolve this issue?
    Thanks in advance for any assistance.
    Brian

    In article <A8zLc.8394$[email protected]>, Brian
    wrote:
    > I've seen the same issue just a few weeks ago. It seems that NAT on
    > Bordermanager does not work when supernetting is configured.
    >
    When supernetting is enabled, routing is disabled, not NAT. Though I
    am not clear if there is a NAT issue or not. To get around the
    problem, people have been manually re-enabling routing once
    supernetting is in place.
    Craig Johnson
    Novell Support Connection SysOp
    *** For a current patch list, tips, handy files and books on
    BorderManager, go to http://www.craigjconsulting.com ***

  • Can you please give me the suggested version #s of working DPS software parts?

    My latest app was already at iTunes before all the upgrade snafus started in January, so I held off on doing upgrades then. I'm starting a new app TODAY and would like to make sure I have the upgrades that are working properly installed. In Jan I was told to only upgrade the Folio Builder. Is that still the case?
    Thanks! Beth

    Cloud programs do not use serial numbers... you log in to your paid Cloud account to download & install & activate... you MAY need to log out of the Cloud and restart your computer and log back in to the Cloud for things to work
    Some general information for a Cloud subscription
    Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
    -Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
    http://www.adobe.com/products/creativecloud/faq.html
    http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall
    http://forums.adobe.com/community/download_install_setup/creative_cloud_faq
    What it is http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html
    Cloud Getting Started https://helpx.adobe.com/creative-cloud.html

  • [HELP] Could you please give me a solution to BW reports of ECC purchasing

    Hey, guys,
      I want to do some customized spend analysis reports of MM purchasing.The purchasing data will be retrived from 2 source systems ( 1 is ECC 6.0 and the other is R/3 4.6c ) And these reports should be viewed by "commodity" , however, there is no commodity code maintained in material master data.
      So my solution is :
    1. to find a idle field in material master data to maintain this "commodity", this could be flexible for me, however, it's not easy to push other guys to do this. ( I don't have the authority to do the master data maintainence.)
    2. to maintain a mapping table in BW, and material and commodity(also description)should be the fields of this table. However, I don't think it's a good way. Because, this table is not easy to maintain and synchronized.
    <b>   Could you please give me any suggestion for this situation. Is there any good solution to my question? </b>
       Thanks a lot

    first things first .. if they want a report by commodity .. ask them to maintain it ..
    1. if you can make the guys maintain commodity in a idle field, you can as well make them enhance the material master and add a new field ... its upto the flexibility u have
    2. i dont think thats a bad idea.. but i would prefer somebody maintain the same mapping table in source system and ask them to RFC it to BI .. so that u can use it as a look up table ...

  • My ipod does weird things

    So I have a 30g video ipod that I have had for about a year now. Lately it has been doing so really weird things. It will be fully charged but run out of battery in thirty minutes or less, and it takes it anywhere from ten to fifteen seconds atleast to do anything. Play a song, pause a song, go through menus, everything. I was wondering if anyone could give me any ideas as to what is wrong or what I can do. My last resort would be sending it to apple.

    Well, after getting NOWHERE with online help, I sent in my iPod for repair. After having it out of my possession for about 5 days Apple happily informed me that nothing is wrong.
    Yet, SOMETHING IS WRONG!!!!!!!!!
    It still doesn't "start"* my iTrip. Even though mine works fine on my wife's Nano. And even though hers doesn't work on mine. And even though it doesn't always get recognized by the computer when plugged in. And even though when it does get seen by iTunes, iTunes (about half the time) thinks it is corrupt and needs to be reformatted.
    Oh, and now it doesn't charge through the iTrip port anymore.
    But hey, nothing is wrong.
    Anyone with anything helpful?
    And before anyone suggests it again, I've restored the thing several times.
    *By start I mean that the iTrip (LCD) will turn on and begin transmitting. Most of the time I have to fiddle with turning the iPod off and on and/or resetting it to get it to finally work. That process usually takes about 15 minutes or so.

  • Weird things happen in Edit view...

    Some (but NOT all)of my photos do weird things when you Double-Click them to get into Edit view. Most of my photos zoom in to their appropriate sizes and are viewed 'normally', however, other photos initially come up in their normal zoomed size then in a second of two, zoom in again several times larger than they should be, and the colors will pop your eyes out, like a reverse negative or something and the photos gets all 'chunky' or 'blocky'. Fortunately, only a small number of my photos zoom in wildly like this.
    Anyone seen this, have a clue what causes it and most importantly, can it be fixed to STOP doing this?
    Thanks

    Well, I used to see this problem way back in the v7 days of the purple app. It's not an FCP exclusive problem, though I have seen it happen one time with Final Cut.
    Glad to help you solve this one, Jamie. You can help others who come to this thread later, by marking the Helpful & Solved posts in the thread. That way, when others are searching for solutions to this problem, they can scan down quickly and easily to those posts, and see the yellow and green stars.
    I've posted this request on a number of threads, both those I've helped or solved, and those I had no helpful contributions for. I'm just trying to help make the new forum as usable as ut can be.

  • I have a really old Macbook Pro, and the Wifi is behaving really weirdly... I'm not an expert, so I'll spout all the random information i can, maybe bits are relevant...

    Basically, the internet works in fits and starts - on the other computers it works fine, so its not the actual wifi thats the problem, BUT:
    So when I open a browser, I can type in what to search and hits will show up - thats fine. But as soon as I enter a site, say Amazon or whatever, when i click on something it says 'waiting for....to respond', and although the little circle goes round and round, no matter how long i wait, the page never loads. EVER!!
    I've tried agin and again, even downloading new Airport software etc - nothing doing.
    For some weird reason, youtube seems to work fine (the video loads quickly, though other parts of the page, such as the comments, never load) - proof that the actual internet is okay, just some kind of glitch.
    I connected the ethernet cable and that made the internet work amazingly, but as soon as i disconnected it...boom. It was back to not working.
    If anyone's experieced the same thing or even if not, if you have some sage advice you could share and out me out of my misery....!!
    Here's hoping (fingers crossed)
    Thanks!

    Does anyone thing it's possible that installing the OS without the Airport card working has caused the system to completley ignore it even though it may now have a working card and cable, seems unlikely to me but really struggling to know where to look now.

  • I dropped my ipod in the toilet, I haven't fixed it for months. I didn't know you could put it in rice, or to not open it right away. Is it too late to fix it, or a place? The ipod is really important to me, it has been with me forever.

    I dropped my ipod in the toilet, I haven't fixed it for months. I didn't know you could put it in rice, or to not open it right away. Is it too late to fix it, or is there a place I could bring it to? I don't want to get a new one. The ipod is really important to me, it has been with me forever, and there is important stuff on it. 

    There are companies that specialize in data retrieval but it's costly (probably cheaper to buy a new iPod) and more than likely as Allan said, your circuits are probably damaged beyond all hope of retrieving anything. It's worth calling Apple you maybe able to get a discount or a refurbished iPod. Can't hurt to ask, Good luck. (And in the future... no texting in the john.) Sorry, couldn't resist it.

  • I bought my Iphone 5 a week ago, now suddenly my sound is gone when i play games, i checked everything and the weird thing is that when i put my headphone in i CAN hear the sound when in games, also he just plays music whitout my headphone. What could it

    Hello so as you can see in my question i have troubles with my sound
    I cant hear annything of my sound in game and i did check everything
    The weird thing is that when i put my headphone in i do hear the sound
    Also my music plays without my headphone
    Wat can it be ? Pls help !

    Ok, a little clarification then, you can hear music fine with the speaker and headphone?  You can hear a game's music fine with the headphone but not with the speaker?  Do you get the notification sounds ok with the speaker?
    If the speaker sound is acceptable with everything except the game then there is a problem with that game and its settings.
    If that is the case, you might want to try deleting the game and then downloading and reinstalling the game to see if that helps the problem.

  • The system doesn't recognize or capitalize the word (I) or the first word of every sentence. Another really annoying thing about the integrated mail on your Mac computers is the fact that the system learns the word as you type it more and more instead of

    The system doesn’t recognize or capitalize the word (I) or the first word of every sentence. Another really annoying thing about the integrated mail on your Mac computers is the fact that the system learns the word as you type it more and more instead of highlighting it as incorrectly is this is a word that’s being misspelled. Can Apple fix this bug to make it user friendly as if you were using Office or a Word Document?

    You hit the target CT.
    It’s only fair that if Apple is going to integrate Mail into Mac PCs, it would be nice if the system does it for you like Office or perhaps Outlook. I just don’t to use Outlook although I have it installed and ready to use, but instead use Mail which comes with Mac OS already.
    I hope to make some sense here.

  • I have downloaded DNG Profile Editor 1_0_4 and prepared a profile which I can not see in my Camera Raw 6.0 (I have photoshop CS5). Could you please give me an advice?

    I have downloaded DNG Profile Editor 1_0_4 and prepared a profile which I can not see in my Camera Raw 6.0 (I have photoshop CS5). Could you please give me an advice?

    Uninstall Trusteer software
    http://www.trusteer.com/support/uninstalling-rapport-mac-os-x
    Remove Sophos
    https://discussions.apple.com/message/21069437#21069437

  • Hi, i need ur help. i got my ipad from my school and they formatted it so that many things would not work, one of those things was iCloud, could any of you please help me undo that?

    hi, i need ur help. i got my ipad from my school and they formatted it so that many things would not work, one of those things was iCloud, could any of you please help me undo that?

    Check the settings on your iPad:
    1. "Settings > General > Restrictions"
    and also
    2.  "Settings > General > Accessibility" here Learning/Guided Access

Maybe you are looking for