Plsql record question

I have The following cursor
prod_cursor IS
SELECT DISTINCT(pname) from products;
Now i have a Record which is of Product%ROWTYPE.
pd_rec products%ROWTYPE;
Now i have to insert the values to pd_rec depending on the value of prod_cursor.
How can i do it?

This?:
michaels>  declare
   cursor prod_cursor
   is
      select distinct (ename) from emp;
   pd_rec   emp%rowtype;
begin
   open prod_cursor;
   loop
      fetch prod_cursor into pd_rec.ename;
      exit when prod_cursor%notfound;
      dbms_output.put_line (pd_rec.ename);
   end loop;
   close prod_cursor;
end;
ALLEN
JONES
FORD
CLARK
MILLER
SMITH
WARD
MARTIN
SCOTT
TURNER
ADAMS
BLAKE
KING
JAMES

Similar Messages

  • BPEL - Provide Input to dbadapter proc that has plsql record as input param

    Hi,
    I have a bpel process where i have defined a DB adapter to execute a db pkg/procedure. the procedure takes a plsql record as a input parameter (as detailed below)
    ie Package has the following defined -
    TYPE rec_in_params IS RECORD(
    p_param_name VARCHAR2(30),
    p_param_value VARCHAR2(30)
    TYPE t_params IS TABLE OF rec_in_params
    INDEX BY BINARY_INTEGER;
    and the procedure has a IN variable of type t_params
    so Procedure param_proc(p_params IN t_params).......
    Question - In the BPEL process, how do i iteratively populate the input variable with the name/value pairs (in the assign activity) before invoking the db adapter ?
    Thanks.

    Use a while loop, in that loop, write your business logic ...actually created a tempVariable of the input record type for the stored procedure...in the while loop you need to write the logic in such a way that you need to assign the first record to the tempVariable, then append this tempVariable data to the invokeInputVariable. so the record gets appended to the last place if there are already some records in the invokeInputVariable or will be in the first place if there are no records. Iterate the while loop based on how many records you want to assign let's say 5. In while loop, in order to access the correct record, you need to do indexing in the XPATH and assign the same to the tempVariable. So first while loop, 1st record gets assigned, then that record in tempVariable gets appended to the invokeInputVariable. This procedure continues for n iterations. After this while loop, invoke the stored procedure...
    Hope this helps...
    Thanks,
    N

  • Difference between empty plsql record and null plsql record

    Hi there,
    I am kinda getting confused with empty plsql record and null plsql record.
    How do I assign plsql record to be empty and to be null?
    create type emp_obj as object (enum number, ename varchar2);
    CREATE OR REPLACE TYPE emp_type AS TABLE OF emp_obj;
    Thanks

    First of all, do not use term PL/SQL record in this context. Record type in PL/SQL is completely different from object type. Secondly, there are 2 states of a nested table:
    1. Unintialized:
    SQL> create or replace
      2    type emp_obj_type as object(enum number, ename varchar2(10));
      3  /
    Type created.
    SQL> create or replace
      2    type emp_tbl_type as table of emp_obj_type
      3  /
    Type created.
    SQL> declare
      2      v_emp_tbl emp_tbl_type;
      3  begin
      4      v_emp_tbl.extend;
      5  end;
      6  /
    declare
    ERROR at line 1:
    ORA-06531: Reference to uninitialized collection
    ORA-06512: at line 4
    SQL> 2 Empty:
    SQL> set serveroutput on
    SQL> declare
      2      v_emp_tbl emp_tbl_type := emp_tbl_type();
      3  begin
      4      dbms_output.put_line('Nested table v_emp_tbl has ' || v_emp_tbl.count || ' element(s).');
      5  end;
      6  /
    Nested table v_emp_tbl has 0 element(s).
    PL/SQL procedure successfully completed.
    SQL> NULL aplies to nested table element, not to nested table itself:
    SQL> declare
      2      v_emp_tbl emp_tbl_type := emp_tbl_type();
      3  begin
      4      v_emp_tbl.extend;
      5      if v_emp_tbl(1) is null
      6        then
      7          dbms_output.put_line('Nested table v_emp_tbl first element is NULL.');
      8      end if;
      9  end;
    10  /
    Nested table v_emp_tbl first element is NULL.
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Multi-track recording question

    Multi-track recording question
    Hey, just need some help on multi tracking using audition, hope this is the right forum?
    Wanted to know if anyone has a clue about assigning inputs from an audio interface to separate tracks on a recording program (ie: Adobe audition)
    I record live with my band alot, and have every amp and the kit mic'd up, but how do i make it so that each microphone is recording to a different track on the PC?
    My interface is an M audio fast track ultra, if that is of any use.
    Any advice appreciated! Thanks!

    FreeCT wrote:
    Wanted to know if anyone has a clue about assigning inputs from an audio interface to separate tracks on a recording program (ie: Adobe audition). I record live with my band alot, and have every amp and the kit mic'd up, but how do i make it so that each microphone is recording to a different track on the PC?
    In Audition, assuming that you can see all of the inputs available in the Hardware Setup, you find the right-facing arrow (input assign) on each track in MV's Main view, and you click on the box it's pointing to, go to Mono, and select the input you want for that particular track. The mono ones say [01M], [02M], etc. If you want to record a stereo track, then select the Stereo option where the inputs are paired and say [01S] et seq. This would have input 1 as left, input 2 as right.
    If you can't see all of the inputs available, try selecting the ASIO driver in Hardware Setup...

  • PLSQL Interview Questions

    Hi
    I recently faced an interview below are some of the questions I was unable to answer confidently.
    Please can you answer these:
    1. In an Explain plan, what does the columns "Time" and "Rows" suggest? Is it the actual time the query should take and the actual number of rows it should return? Or something else?
    2. I have a Select, Insert, Update and Delete grants on a table. Which of these I can do:
    a. Create a trigger for (Insert or Update or delete) on that table.
    b. Create a trigger on view of that tabe.
    3. There are 2 triggers on a table (before Insert on that table). The only difference between 2 triggers is - one is row level, other is statement level.
    Now If i try to insert data in that table, which of these triggers will be fired?
    4. I have a table with 90 million records. I want to delete some 60 million records randomly. What is the most efficient way to do this? [Can use PLSQL as well]
    Thanks
    AB

    first Thanks you for your reply
    1. You do not explain what CTAS means, Hoek does. For anyone that is unfamiliar with that acronym they won't be able to understand what you mean. And if someone does know what CTAS means they may still not know how creating a new table will result in data being deleted from the original table.yes i does not explain, because Hoek already explained and i do not fit sochel
    2. You stated 'ctas method will be best' almost as if it were a fact and there couldn't be any doubt about it. Hoek hinted that there might be another way that 'could' be faster. Many things Oracle are not so cut & dried and often part of the answer will be 'it depends'. All anyone needs to do is find ONE exception to the rule to disapprove it.yes you are right, I just did not put it quite clear
    3. You do not provide ANY explanation as to how a CTAS solution, which creates a new table, would end up DELETING data in the orginal table as OP asked. Hoek provided two links to an authoritive source that provides an explanation and example. in the topic was not a specific question about how to remove data from a large table, I just gave direction, sometimes the for topic creators , that it is always better to seek and find ownself to be more useful than giving an ready answer
    I'm only saying the above to make a point to try to help you provide even better, and more complete, answers in the future. Thank you
    People that are familiar with CTAS and have used it to effect a DELETE of rows from a table (including yourself) will understand what you probably meant just because you said 'CTAS'.
    But your answer won't be much help to anyone else. They will need to search 'CTAS' on the net. And that alone won't help them get an understanding of the many other issues that need to be taken into account if you choose to use ctas to effect a delete by actually using the new table that you create:
    1. the data may wind up in a different tablespace
    2. the resulting table may not wind up being identical to the original table
    3. issues with constraints on the existing table that either can't be created on the new table or can't be created with the same name
    4. issues with grants on the existing table that will need to be recreated on the new table
    5. issues with code references on the existing table - that code will be invalid if the existing table is dropped and will need to be recompiled if the new table is renamed to use the original name.
    For some use cases the effects of one or more of those issues above will outweigh the speed improvements that CTAS might provide.Again, I believe that, in such matters is always better to redirect people than explain all things, because when people searching and finding own problem ownself, he/she will understand solution better than we explain him/her.
    Thanks again

  • Nokia Lumia 1020 Recording Questions

    I'm planning on recording a show that I am involved in with a Nokia Lumia 1020 (which I haven't actually got yet), but was wondering whether it's possible to use the 1020 as just a camcorder and live capture/save the video file to a laptop?
    I've heard ways of doing it with a camcorder and live capturing it straight into Sony Vegas.
    But getting a new phone sounds much better than getting a new camcorder or camera.
    Also, one other reason for me thinking of using the 1020 is because the previous cameras we've used to record shows haven't been great at recording in a theatre and seem to get a bit drowned in light, since the theatre itself is dark (especially at the back where the camera will be) and the stage is flooded with bright stage lights, it often makes the dances and dancers look bad.
    Do you think the Lumia 1020 would be alright with this situation?
    So, two questions there!
    Thanks,
    Joe!

    I would be sure that you have nothing on your device memory to ensure that you have enough memory. it is going to record in 1080p unless you choose otherwise. so the file is going to be big.
    I do not believe there is a way to record using your 1020 and have it live save to a memory outside of the device memory. at least, I have not heard of or seen anything to say this is possible.
    coloring, imo, should be pretty good. so long as there isn't any lights aimed directly at the camera. I have been very happy with its videos that it creates.

  • DNS Records Questions - TXT Files

    Hello everyone,   I would like to preface this post with, this is my first time dealing with DNS records.  However, the instructions seem a little confusing, so i would like your professional feedback.  
    Currently using Godaddy for hosting.  Ill start with the instructions, then my set up, my result and my questions. 
    Instructions:
    You will be adding two separate TXT entries to your DNS record - note - be sure that you do not add any carriage returns when copying the key, below:
    First Entry (This is called the DKIM policy record):
    Name:  _domainkeyTXT:   "t=y; o=~;"If your domain is 'foo.com', then the 'name' entry will look like this when it is displayed as: "_domainkey.foo.com" 
    Second Entry: (This is called the 'selector record' and includes a public crypto key):
    Name: key1._domainkeyTXT: "k=rsa\; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKQrQeUnNX/CQBIXWqeHc8lKl+EwhGKzPuDRbDjnN2Xzl8N4Fc2oQ6R+opnEM6U4x4p
    3NggEyNg8Mp2W6oUYpAECAwEAAQ=="
    If your domain is 'foo.com', then the 'name' entry for this will look like this when it is displayed: "key1._domainkey.foo.com"
    That's it!
    You can send a test message to a yahoo email address, then select Actions->View Full Headers in Yahoo
    when you view the email.  If you have configured DKIM correctly, the header information for the email will include a line similar to:
    Authentication-Results: mta1084.mail.mud.yahoo.com  from=mypinpointe.com; domainkeys=pass (ok)
    Fisrt Entrey
    Hostname: @
    TXT Value: _domainkey.mydomain.com:   t=y; o=~;
    TTL: 1/2 hour
    Second Entry:
    Hostname: @
    TXT Value: key1._domainkey.mydomain.com: k=rsa; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKQrQeUnNX/CQBIXWqeHc8lKl+EwhGKzPuDRbDjnN2Xzl8N4Fc2oQ6R+opnEM6U4x4p3NggEyNg8Mp2W6oUYpAECAwEAAQ==
    TTL: 1/2 hour
    Results
    1. a really long string of code, but when you search for it here is the result  Doesnt say domainkeys=pass (ok): 
          Authentication-Results: mta1466.mail.gq1.yahoo.com  from=giglinxusa.com; domainkeys=neutral (no sig);  from=crapemyrtle.mypinpointe.com; dkim=pass (ok)
    Questions
    1. Should the TXT value include "", like they have it in the instructions?
    2. In the first entry, should there be so many spaces after the .com:    t=y
    3. What are carriage returns? (assuming spaces)

    Hello,
    but I don't understand anything else then you will use Godaddy.
    What is the aim of this? Connecting an email domain to your internal network or about web services? Please be more specific in your description what you are trying to achieve.
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://msmvps.com/blogs/mweber/
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.

  • Just a Few Recording Questions

    Hey everyone,
    I have a few questions about how garageband works...
    Do you have the ability to record multiple tracks at the same time using firewire and keep them as separate tracks?
    Can you then play back those tracks all at once and simultaneously record another track?
    As stated, I would be using firewire to record and the headphones jack for monitoring.
    Thank you very much!

    Tom Bacho wrote:
    Do you have the ability to record multiple tracks at the same time using firewire and keep them as separate tracks?
    http://www.bulletsandbones.com/GB/GBFAQ.html#recordmultipletracks
    (Let the page FULLY load. The link to your answer is at the top of your screen)
    Can you then play back those tracks all at once and simultaneously record another track?
    yes

  • Write sql for plsql record

    im trying to builde plsql table like given below
    ids               nme
    1     ICOL$
    2     CON$
    3     UNDO$
    4     PROXY_ROLE_DATA$
    5     FILE$
    6     UET$
    7     IND$
    8     SEG$
    9     COL$
    10     CLU$then trying to get value for ids 5 is FILE$ but it's not working as expected. please find the code below.
    declare
    type v_ty is record
    ( ids  array,
      nme array_char);
    v_r  v_ty;
    v_ids number;
    begin
    select rownum idx ,table_name tnme
    bulk collect into v_r
    from user_tables
    where rownum < 11;
    select b.column_value into v_ids
    from table(v_r.ids) a , table(v_r.nme) b
    where a.column_value = 5;
    end;thanks
    Raj
    Edited by: user13397097 on Jan 2, 2013 12:46 AM

    user13397097 wrote:
    dose it not bring down the context switch between plsql and sql engine ?Well if you manage to do the data modification in a single SQL query, that would be 1 context switch.
    In your case there is at least 2 of them.
    Moreover : You seems to be fighting against context switch. Did you identify that as being the bottleneck in your processing ?
    The basic example of costly context switch is calling a PLL/SQL function in a where clause when you could do it purely in SQL. In that cas the main SQL does a context switch on each row tested, and if the PL/SQL function is actually doing SQL inside, that is another "nested" context switch.
    Doing so on a million rows would "hurt" performance wise.

  • Please help - what do I need? Recording questions

    We do not have digital cable but do NOT need a converter box because we have comcast basic cable.  (I did buy one anyway with the coupon).  We will switch to digital eventually but right now the budget doesn't allow the extra monthly charges.   I am purchasing a new TV for one of the rooms but want to still be able to record programs while watching another channel, which I can currently do with my VCR/DVD combo.  I also need to buy a new recorder (combo perhaps?) because this one is on the way out but still want to be able to do what I'm currently doing.  (I still tape programs in another room on an old VCR and can watch them in the other room).  However, my question is what equipment do I buy? With what I've been reading, I'm guessing a dual tuner DVD/DVR/VCR combo?  Is that correct?  I'm totally confused at this point.  However, I also want to be able to still use this equipment (recording one channel while watching another) when we switch to digital cable.  I don't want to spend the money on equipment that won't be usable when we upgrade to digital.  Any advice?? Your help would be appreciated.
    Thank you.

    I would suggest a Tivo to meet your needs.  There is a montly service fee involved to the Tivo service, cost depending on what type of plan you get but no more then about $15 a month.  With Tivo you can set it to record your fravorite shows once, choose if you want it to record all showings or just new eps.  Then you never have to worry about missing your favorite shows.  It has a dual tuner that can record 2 shows at once and you can watch a previously recorded show at the same time. 
     I had comcast DVR for a long time but had to pay for the digital service on top of that even though I never watched channels over 75.  So i made the switch to Tivo and love it.  If you already have Netflix then you get a major bonus.  You can watch instant queue movies on your TV.  And if you have broadband internet access some movies are sent in HD format as long as you have the TivoHD DVR model.

  • Newbie home recording questions

    Heyas,
    I just got audition 3, ive used cool edit pro alot - the old versions 2.0 etc.. I always just used this to laydown something in my head to work out parts or show bandmates. So the quality really hasnt mattered that much before Audition 3 has tons of new stuff in it.
    Im trying to make the recordings sound good though now, I have two questions:
    1. What is the best export format when you do a "save as" out of your mastering track? I saved as a constant highest quality drop down, and it still sounds really cheap. The volume seems low and its not a very dynamic, full sounding recording. Anyone have a basic guide for mastering out of audition3 ?
    2.I am recording all my tracks to the peak before clipping and I know the inputs are clean and loud. Basically looking for a guide, tutorial, or tips on how to mixdown and master a typical 4 piece bands, guit, vocal, drums, bass etc.with adobe audition. Guides or links for panning tricks, or something to bring out that "full sound" . Dont get me wrong, the tracks are very clean, and mixed well, just low volumes, and not that awesome "big, full" sounds that I have heard other people make on the same basic setup..
    thanks everyone!
    Alex
    Gear currently using:
    Line 6 lineport UX2 for inputs - Adobe audition 3 - Shure SM58s for vocals - Reason 4 for sound effects, drums loops.  Alesis SR 16 for basic drums as well

    Best thing to do is do a search on this forum for mastering or across on AdobeMasters forum eg http://www.audiomastersforum.net/amforum/index.php/topic,4933.0.html as an example only

  • Basic voice recording question

    Sorry for the basic question. I'm using a Plantronics headphone and an early Powerbook G4 laptop running 10.3.9. I just want to do some voice recording on Garageband 3.
    My system preference for sound is audio line-in port (I don't see a microphone jack on this G4 laptop).
    My system preference for Garageband only gives me the built-in audio option for audio input.
    I don't seem to be able to figure out how to record my voice. Can anybody help with the settings or procedures. Thanks much!

    Hi charles,
    Not familiar with that version of the iBook, but if there is a headphone jack, the line-in would be the same size plug as that (i think it wil have to arrows pointing towards a dot).
    Recording voice has alot of options. If we knew what you were trying to record (singing, podcast, voice over) we could be more specific. Budget is a huge factor as well.
    Just a couple of quick suggestions,
    Podcasting, can't go wrong with a USB mic (Sampson and Blue both make good ones) and you don't have to buy anything else to work with them.
    Vocals (singing), you should get a digital interface, a good pre amp and a good mic. In this catagory, the more money you spend (usually) the better quality you will have.
    lets start here and you can get back to us....
    good luck Charles and welcome to the forum!
    xs4is

  • Mac Speech Dictate and other Audio Recording Questions

    Thanks again for this great resource. I have a Macbook Pro, my first issue is I want to record audio from my stereo system, through the headphone output. I can't use the cables because I have an AV splitter, I have a DVD, Satellite, TV, all going through the splitter and to the stereo system, so I need to record stuff to my Macbook Pro from the stereo headphone output.
    How is this accomplished?
    My second question, is it possible to use Mac Speech Dictate to pull segments of audio from a radio talk show into typed text? I sometimes write transcripts of talk radio segments for a blog and it takes such a long time to pause, type, pause, etc. I am looking for the best solution to just play the audio and have the program type it out.
    Once I have the best program, how would I get the audio in, would the internal mic pick it up if I played the audio through my stereo system at a loud volume?
    Thanks for your time and any assitance you can give me.

    Hi there,
    I'm having issues understanding what you want to do with the cables from your stereo. Do you want to record the talk show from the stereo into your MBP? If so, then you can use a simple Y-adaptor (Stereo RCA -> 1/8" minijack) to connect your stereo's audio output to the MBP's line-in jack. Or, are you trying to go the opposite direction? MBP to stereo? Sorry for my confusion.
    Edit: I'm sorry, I completely misread your first post. If you want to go from the stereo's headphone jack to the line-in on the MBP, you only need a 1/8" to 1/8" male-male cable. Is that what you were looking to do?
    --Travis
    Message was edited by: Travis A. (Thanks)

  • DDNS ownership of record question

    We have two Window 2012 r2 DHCP servers (no other function)
    IPv4 is set to "Dynamically update DNS A and PTR records only if requested by the DHCP clients"
    Scopes are configured to "Always dynamically update DNS A and PTR records"
    "Discard A and PTR records when lease is deleted are set on both"
    The servers don't use DHCP credentials and no servers are in DNSUpdateProxy group
    With all this I would expect DHCP clients to have A and PTR records to be owned by a DHCP server but the records are owned by the computer accounts.
    These particular clients are unique in that they are DHCP reservations whose IP addresses are in the same subnet as the scope but are not part of the scope Address Pool. This was doable in w2k3 dhcp, wasn't doable in W2k8 r2
    dhcp and is again doable in w2k12 r2 dhcp
    My question is - based on this configuration - do the scope option 81 settings apply to these clients with reservations - in which case I don't understand why the computer accounts own the A and PTR records
    Or, do the IPv4 option 81 settings apply to the clients since the addresses are not part of the scope address pool - in which case I understand why the computer accounts own the A and PTR records
    Thanks

    Hi,
    Before going further, thanks for coming back and letting me know that my first reply didn’t help
    resolve our problem.
    The reason why I provided the above suggestion is:
    The priority for DHCP settings is
    reservation >
    scope policy >
    server policy >
    scope-level >
    server-level.
    If the setting of reservation is different from the setting of scope, the setting of scope will not take effect.
    Therefore, if we select the
    Dynamically update DNS records only if requested by the DNS clients
    in the Properties dialog box of the reservation, DHCP server will not register the DNS recorder until clients request.
    For fully patched, I mean to get the system updated to the latest. However, for this is a production environment, it’s really up to you to make the call.
    Now, in order to further troubleshoot the issue, we can enable the DNS debug log, and if necessary, you may upload the log to Onedrive and provide us the download link.
    Best Regards.
    Steven Lee
    TechNet Community Support

  • Broadcast Recording Question

    OK, sorry if this is off topic, but technically I am using FCP to put this current project together. (that counts right??)
    Anyway, my question stems from a client about the possibility of getting a broadcast of a town-hall meeting on their local television station recorded, then digitized and edited for the web in FCP. I would assume you could do this with a capture card, which I personally would do, but the client is far away and wants to record the broadcast themselves - needless to say, they aren't very tech savvy. They are wondering if it would be prudent to purchase a DVR, record to that and then find a way to send me the files for editing in FCP. Or perhaps just record to a VHS and then send me the tape. I told them that I don't think that is possible/legal to go this route.
    Can anyone give some advice here? If a client asked you if they could record a government town hall meeting on their local cable channel so that it could be edited into a non-profit production to be put on their website, what would you say? I have very little experience with this um.....workflow. Once again, sorry if this is too far off topic, but I am getting desperate for at least some starting guidance. Thanks.

    Before using this material in any way that might be deemed commercial use, your client should seek permission to use it from the copyright holder and the broadcaster.
    Whatever you do, don't record it off air and just put it on the web without asking.
    Who knows, the broadcaster might even give you a good quality tape to work from.

Maybe you are looking for

  • Problem with "Uncommited changes" when viewing certain rows in detail group

    Hi Guys, When I try to view an row in a detail group I get a popup box saying that there's uncommitted changes. This will happen even when there's no changes in the master group. It will also happen for all rows in the detail group except for the fir

  • Help! My display driver is no longer compatible with Adobe software!

    Help!  I rely on Adobe CC and my iMac to earn my living. My display driver is no longer compatible with Adobe software! What should I do? (most affordably because I dont have enough money for even basic living expenses right now.) Detailed notes are

  • 10.5.8 update corrupted the Volume Structure of my MacBook Pro and iMac

    After installing the 10.5.8 update on my Macbook Pro AND my iMac, BOTH computers refuse to boot up. If I boot from a TechTool Deluxe DVD and run the system scan, It fails both the Directory Scan and the Volume Structure test. The only common applicat

  • Bug in JRE 1.4.0

    Hello, My applet doesn't display properly with Sun's JRE 1.4.0. It doesn't properly repaint the applet area, so my applet appears frozen. The applet: http://www.mandelmania.net/mandelmania.html Is there a fix for this, or a workaround? For now I've u

  • Printer prints when it feels like it

    I have a Photosmart C7280 all in one which I bought maybe close to two years ago. Running XP on a two PC home network through a Linksys cable/dsl router. For the most part, happy with it. Problem is, when I click the print button I can never be sure