to use with sql in the record clause

Hi friends

I have a folder with only a few id and I need to use with select in
as
Select * AAAA where id in the file
How can do us?

You can simply use it as rec1.id

declare
  type rec is record(id number);
  rec1 rec;
  i char;
begin
  rec1.id := 1;
  select * into i from dual where 1 in (rec1.id);
  dbms_output.put_line(i);
end;

Tags: Database

Similar Questions

  • How to set the value of the point of application using pl/sql in the application process

    Hi guys,.

    I want a global variable (application point) whose value will be set to start when a user logs on to the application. The value will be retrieved from the database by using a sql query. I don't exactly know the syntax to set the value of the point of application in the application process. Also, I want to know what type of enforcement process should I use to set the value of the point of application, when a user starts a session. The value of the point of application varies from one user to the user.

    Help, please.

    I use apex 4.2

    Kind regards

    Waqas

    You can use the application element as a link with his name. That is to say. your point of application is named G_MY_APPLICATION_ITEM, then you can / set of access using: G_MY_APPLICATION_ITEM.

    For example

    BEGIN

    -assign as a variable

    : G_MY_APPLICATION_ITEM: = 'LARRY ';

    --

    -use in a SQL statement

    SELECT WHATEVER_COLUMN

    IN: G_MY_APPLICATION_ITEM

    FROM MY_TABLE

    WHERE USERNAME =: APP_USER

    ;

    END;

    Peter

  • Problems with playback and the recording of the sessions

    Hi, covered!

    I met two annoying problems:

    (1) for some unknown reason, reading in new sessions is limited to-3db. So when I start a new session 16/41000 and import an mp3 commercial track just to check its spectrum or the tone, it's only hit - 3d on a meter, but it should be as 0db and cutting. Follow-up volume = 0, master volume = 0. I've never seen before, it happened to my Audition for a week or two, and I'm pretty shure I wouldn't change a thing.

    (2) for the recording of the huge sessions with titles of 35-45 or more, sometimes it suggests to save without modifying the audio files, too (so I find myself with fresh, fresh generals (2), (3), (4), etc.) It's the most annoying thing, baaargh!

    All of the pieces of advice?

    Potapka wrote:

    (1) for some unknown reason, reading in new sessions is limited to-3db. So when I start a new session 16/41000 and import an mp3 commercial track just to check its spectrum or the tone, it's only hit - 3d on a meter, but it should be as 0db and cutting. Follow-up volume = 0, master volume = 0. I've never seen before, it happened to my Audition for a week or two, and I'm pretty shure I wouldn't change a thing.

    Hmm... go to Preferences > multitrack and reset the stereo panning mode to l/r cut logarithmic and no - 3dB Center. This will not happen then.

    (2) for the recording of the huge sessions with titles of 35-45 or more, sometimes it suggests to save without modifying the audio files, too (so I find myself with fresh, fresh generals (2), (3), (4), etc.) It's the most annoying thing, baaargh!

    Yes, it's boring. If you are absolutely sure that they are not modified, then remove additional ones. You can take a look at Mediasweeper too.

    Hi, covered!

    All of the pieces of advice?

    Please use English spelling normal - this way, I don't feel as if I want to run...

  • Trouble using a function in the where clause

    Hello

    I use a function that is located at ask.tom.oracle.com, which converts a long data type in a character. The function returns an error when it is placed in the where clause. The sql statement, the error message and the function of asking tom are listed below. Does anyone know how to fix this?


    < pre >

    SELECT A.FLDPHYSICAL,
    A.FLDEXPOSURE,
    A.FLDDATEDUE,
    A.FLDDATELAST,
    A.FLDEMPLOYEE,
    B.FLDBDATE,
    B.FLDMAILSTOP,
    B.FLDREC_NUM,
    B.FLDLNAME,
    B.FLDMI,
    B.FLDFNAME,
    B.FLDBDATE,
    B.FLDDEPT,
    B.FLDSTATUS,
    B.FLDSSN,
    B.FLDHOMEPHON,
    B.FLDWORKPHON,
    B.FLDID,
    B.FLDDIVISION

    OF REQEXAM,.
    B OF THE EMPLOYEE,
    C EMPLOYEE_MEMO
    WHERE A.FLDEMPLOYEE = B.FLDREC_NUM
    AND b.flduserstr = c.fldrec_num
    AND OHM_PKG. GET_LONG ('EMPLOYEE_MEMO', 'FLDDATA', C.ROWID) AS ' % CDL YES % '.
    "AND A.FLDDATEDUE > 1 January 1900"
    AND A.FLDPHYSICAL = 'COP '.
    ORDER OF B.FLDDIVISION,
    B.FLDLNAME,
    B.FLDFNAME,
    B.FLDMI,
    A.FLDDATEDUE

    -------------------------------------------------------------------------
    The error message

    Error in the command line: 26 column: 4
    Error report:
    SQL error: ORA-00904: "OHM_PKG." "" GET_LONG ": invalid identifier
    00904, 00000 - '% s: invalid identifier '.



    -------------------------------------------------------

    create or replace
    PACKAGE OHM_PKG AS

    / * TODO type (types, exceptions, methods etc.) package declarations here * /.
    getlong function (p_tname in varchar2, p_cname in varchar2, p_rowid in rowid) return varchar2;

    END OHM_PKG;

    create or replace
    PACKAGE BODY OHM_PKG AS

    getlong function (p_tname in varchar2, p_cname in varchar2, p_rowid in rowid) return varchar2 as
    whole l_cursor default dbms_sql.open_cursor;
    number of l_n;
    l_long_val varchar2 (4000);
    number of l_long_len;
    number of l_buflen: = 4000;
    l_curpos number: = 0;
    Start
    DBMS_SQL. Parse (l_cursor,
    "select" | p_cname | 'from ' | p_tname |
    ' where rowid =: x',.
    DBMS_SQL.native);
    DBMS_SQL.bind_variable (l_cursor, ': x', p_rowid);

    DBMS_SQL.define_column_long (l_cursor, 1);
    l_n: = dbms_sql.execute (l_cursor);

    If (dbms_sql.fetch_rows (l_cursor) > 0)
    then
    DBMS_SQL.column_value_long (l_cursor, 1, l_buflen, l_curpos,)
    (l_long_val, l_long_len);
    end if;
    DBMS_SQL.close_cursor (l_cursor);
    Return l_long_val;
    getLong end;

    END OHM_PKG;

    < / prev >

    Remove the '_' in the name of the function as below:

    AND OHM_PKG. GETLONG('EMPLOYEE_MEMO', 'FLDDATA', C.ROWID) AS "CDL % YES % '.

  • Remote index not used with INSERT in the local table on dblink

    Hi all

    I don't know if anyone has come across this problem before, but for some reason any the remote index remains unused ONLY* in the insertion on the local database operation. Let me explain this pseudo-device code

    insert into LOCAL_TABLE
    Select / * + index_combine (alias_remote_tab IDX_LOG_DATE) * /.
    trunc (log_datetime),
    Count (*)
    of REMOTE_TABLE@DBLINK alias_remote_tab
    When trunc (log_datetime) = trunc(sysdate-1)
    Trunc Group (log_datetime);

    where:
    REMOTE_TABLE is a table partitioned on log_datetime (monthly)
    IDX_LOG_DATE is an index of bitmap of based on a valid function on log_datetime created in the trunc (log_datetime)
    local database: 10 gr 2
    remote database: 11 GR 1 material
    OS: windows (both)

    More funny thing is when I just run the select query independently on the only both local and remote, the index is used. I checked by printing the command explain for the select query plan. But when I prefix the query with the insert lose all hell breaks and local database plays the ignorance about the index. The command for the insert query explain plan has no mention of the index even when I explicitly place the index indicator in the select part of the query.

    If this should not be simple enough for ORACLE? Am I missing something here?

    Jonathan describes the details and the reasons for the behavior you see in following blog post http://jonathanlewis.wordpress.com/2008/12/05/distributed-dml/
    Your SELECTION is performed remotely (filtering and grouping) and sends only the (relatively) small results via dblink local database while the in an INSERTION, filtering only occurs at the remote and data site (relatively) important are sent via dblink to the local database, the consolidation takes place.
    You can give a try to the approach proposed by michaels2. If the approach from the view result grouping and filtering which will take place in the remote database, you will see improved performance.

    PS BTW, if the sql code that I suggested to check the plane, in my previous post using an index, then the cause of your performance issue is certainly not due to the index not used and is due to the amount of data transferred to dblink.

  • problem with access to the records of oracle on windows 7?

    I use windows 7 and after that I installed oracle 11g in my PC, I created a database (DBCA). After that I tried to open my file (SPFILE) server named SPFILEORCL settings. ORA
    located in oracle\product\11.1.0\db_1\database... But when I try to open the file it gives me a prompt window ("access denied"), and the only way I could open it is thanks to my administrator account.

    My question: it means that it is better to do my job and coding on oracle through the administrator account? or it's always better to use my limited user account, although it does not access to all records of oracle? What is the Advisor for a better future use of the product?

    Note: I use 64-bit oracle 11g release 1 on Windows 7 ultimate 64 bit


    Published by: user12238193 on December 6, 2009 01:39

    user12238193,

    The spfile is a binary file - edit the file with Notepad/Wordpad or another text editor will corrupt the file. Use the ALTER SYSTEM command to change the values in the spfile. If you want to use a text editor, create a the spfile init.ora, open the file init.ora (in the database folder), change the file init.ora with a text editor, close the database, rename the spfile, the startup of the database. You can then create a new spfile from pfile (init.ora).

    The following command will create a the current spfile init.ora:
    CREATE PFILE FROM SPFILE;

    Once Oracle is installed, you should be able to use your limited account. The instance of database (Windows service) must default to run with permissions of the SYSTEM account, so you will always be able to modify the spfile with ALTER SYSTEM command when logged in with your limited account.

    UAC (User Access Control) in Windows 7 seems to work a little better than the same functionality in Windows Vista, and if this feature is enabled, even an account to the local administrator group does not work with permissions of administrator permanently. This means that you will not use the limited account to prevent the unexpected drive - by spyware infections.

    Charles Hooper
    Co-author of "Expert Oracle practices: Oracle Database Administration of the Oak Table.
    http://hoopercharles.WordPress.com/
    IT Manager/Oracle DBA
    K & M-making Machine, Inc.

  • error in pl/sql of the CASE clause.

    Hello
    I m not a sql progremmer. an interior according to the database worked for previous but not mentioned dates and may be for dates too.
    Error is given after the following code.

    We have 4 store-ID, that ID is to have values rest three IDs have values 0. Gets the ID having missed in FUND and error values. The cursor query works fine when executed alone.

    kindly advice!

    declare
    ip_date varchar2 (30): =' 27-AUG-2011.
    cursor dwn_cnt (param_date varchar2, param_hr number), select store b.aw_store_id, count (*) bv1to1.aw_user_dwnld_cnt count_dwn, b bv1to1.bv_user_profile where a.date_download between to_date(param_date||) e '|| param_hr |': 0 0:00 ', "HH24:MI:SS of MON-DD-YYYY") and to_date(param_date||) e '|| param_hr | (": 59: 59 ',' MON-DD-YYYY HH24:MI:SS') and a.user_id = b.user_id group by b.aw_store_id;
    dwn_cnt_var dwn_cnt % rowtype;
    type dwn_cnt_hr is table of number of pls_integer indexes;
    dwn_cnt_hr_var dwn_cnt_hr;
    Start
    dbms_output.put_line ('US' |) ',' ||' DE'||','||' UK'||','||' FR'||','||' TIME ');
    dbms_output.put_line(' ');
    I'm in 0.23
    loop
    dwn_cnt_hr_var (0): = 0;
    dwn_cnt_hr_var (103): = 0;
    dwn_cnt_hr_var (104): = 0;
    dwn_cnt_hr_var (105): = 0;
    dwn_cnt_hr_var (200): = 0;
    Open dwn_cnt (ip_date, i);
    extract the dwn_cnt in dwn_cnt_var;
    loop
    box (dwn_cnt_var. Store)
    When 0 then
    dwn_cnt_hr_var (0): = dwn_cnt_var.count_dwn;
    When there are 103 then
    dwn_cnt_hr_var (103): = dwn_cnt_var.count_dwn;
    When there are 104 then
    dwn_cnt_hr_var (104): = dwn_cnt_var.count_dwn;
    When 105 then
    dwn_cnt_hr_var (105): = dwn_cnt_var.count_dwn;
    When 200 then
    dwn_cnt_hr_var (200): = dwn_cnt_var.count_dwn;
    end case;
    extract the dwn_cnt in dwn_cnt_var;
    When the output dwn_cnt % notfound;
    end loop;
    dbms_output.put_line (dwn_cnt_hr_var (0) + dwn_cnt_hr_var (200) |) «, » || dwn_cnt_hr_var (103) | «, » || dwn_cnt_hr_var (105) | «, » || dwn_cnt_hr_var (104) | «, » || (i);
    close dwn_cnt;
    end loop;
    end;
    /

    OUTPUT:-

    US, UK, FR, HOUR
    declare
    *
    ERROR on line 1:
    ORA-06592: not found CASE when executing CASE statement
    ORA-06512: at line 20
    Elapsed time: 00:00:00.90

    Rgds,
    Abdallah.

    You need an ELSE clause:

    ...
    when 200 then
       dwn_cnt_hr_var(200):=dwn_cnt_var.count_dwn;
    else
       /* code here for what to do if none of the WHEN clauses are true */
    end case;
    ...
    
  • Is it possible to save a PDF file in a variable to be used later, rather than the record in a file?

    I am contiuing to a thread unresolved I made ages ago @.

    http://forums.Adobe.com/thread/574764?decorator=print & displayFullThread = true

    The interesting point is the following:

    People, I do not see anyone suggesting a feature that can help here. You don't really need to create files with these CFPDF tags * if you do not want.

    For example, as is the problem of Paule, if a tag is creating something that the other uses (as its result CFPDFFORM then flattened), you can use the NAME attribute (the destination) to indicate a variable to contain the output of a previous step and then use this variable in the SOURCE of a later stage.

    It's a tag, not an attribute.

  • Is it possible to get the new Google "I'm not a robot" tick box captcha to use with forms of the created muse?

    Hi did anyone know if it is possible to get and to integrate the new google "I'm not a robot" tick box captcha with forms of the Muse?

    Hello Thrust2014,

    As this feature is not not available in Muse contact forms. Feel free to add this suggestion on the page of the idea of the Muse.

    Click on the link below and click on Actions > idea create .

    Ideas for features in Adobe Muse

    Kind regards

    Vivek

  • What Destination name to use with DataServiceTransaction in the Model Driven approach

    Hello

    I use the model approach where no destinations are configured in the data-management - config.xml, it happens automatically. In my backend webapp, I want to keep some data and push the changes to customers. While I can use DataServiceTransaction.createItem () but should which destination name I use? What is the default name of the destination created by model assembler?

    Thank you

    RK

    As Don mentioned in the other thread, you can use the ServerGeneratedEntities annotation to control this. For more information, see this documentation:

    http://help.Adobe.com/en_US/LiveCycleDataServicesES/3.1/developing/WS4976f0ec3ef482461096f 38112701857408 - 8000.html

  • just curious, using pl.sql for the site

    Hello all;

    I have a small question, I made it using other tools, but I'm just trying to learn a few things again associated with pl/sql. If I have a site similar to below.

    http://www.BBC.co.UK/news/

    and I want to extract only the date of this site which is July 5, 2012 update at 14:38 HE and record that information in a table. Is this possible with pl/sql

    http://www.morganslibrary.org/reference/pkgs/utl_http.html

    If you use 11 GR 1 material or above you will also need this:
    http://www.morganslibrary.org/reference/pkgs/DBMS_NETWORK_ACL_ADMIN.html

  • The problem with SQL after the migration of the database to another machine

    Having a SQL strange problem trying to extract a database being moved from one machine to the other.  Both machines are running SQL 2008 32-bit and are both Windows 2008 servers.  When I try to backup the database using the SQL tools and restore the. BAK file on the new SQL Server, I get the following error:

    Restore failed for server 'servername' (Microsoft.SqlServer.Smo)
    Additional information:
    System.Data.SqlClient.SqlError: RESTORE detected an error on the page (44:2097184) in database 'RestoreDBName' read from the backup set.

    Similarly, when I am trying to copy the. MDF and. LDF files to the new server and tie them, I get the following error:

    Attach the database failed for the server 'servername '.
    Additional information:
    An exception occurred during the execution of a Transact-SQL statement or batch.
    A system assertion failed.  An assertion failure is usually caused by a corruption of data or software bug.  To check the database, consider running DBCC CHECKDB.  If you have agreed to send images to Microsoft during installation, a mini dump will be sent to Microsoft.  An update can be an available from Microsoft in the latest Service Pack or a QFE from Technical Support.
    Could not open new database 'NewDatabaseName' create a DATABASE is dropped.
    "" Location: "logmgr.cpp": 3277
    Expression: lfh-> lfh_startOffset is startOffset
    SPID:55
    PID: 292876 (Microsoft SQL Server, error: 3624)

    Everything I've read, these errors usually indicate some sort of database corruption.  However when I run DBCC CHECKDB on the database on the source server, it is up to perfectly don't own... None detected corruption.  In fact, this server hosts 8 different databases.  Departure from all the correct DB on the source server, none of them will restore however to a new server using one of the methods above.  I'm having a hard time to believe that each of them could be corrupted when they show absolutely no indication of a problem.

    Anyone have any ideas?

    Try to make the backup and restore via SQLCMD (or via a query in SQL Server MS window).

    The backup will be the following (obviously, change "MaBase" and "D:\BACKUPS" to some database and the location you wish to save - just using for example):

    BACKUP DATABASE MyDatabase

    TO DISK = 'D:\BACKUPS\MyDatabase.bak. '

    WITH NOFORMAT, NOINIT,.

    NAME = 'Database MyDatabase - Full Backup',

    NOREWIND, NOUNLOAD, STATS = 10, SKIP

    Copy your backup to the other server and file make:

    RESTORE the DATABASE to MyDatabase

    FROM DISK = 'E:\Backups\MyDatabase.bak' WITH FILE = 1,

    GO to "MyDatabase_Data" to "E:\SQLDATA\MyDatabase_Data.mdf,"

    GO to "MyDatabase_Log" to "E:\SQLLOG\MyDatabase_Data.ldf,"

    NOUNLOAD, STATS = 10 REPLACE

    Again, change your names and locations in function.

    If this does not work, try to restore a database by third-party tools. You can find them in Google. If you don't want to spend the time to research, you can try a tool SQL Server Recovery Toolbox. All the details about this program on the link. http://www.oemailrecovery.com/sql_repair.html

  • "Scanner in use" with nothing in the process

    Printer HP Officejet Pro 8600 Plus, wireless, Windows 7 laptop

    Just receive and put in place yesterday.  Scanner has worked a few times, but then got an error message "the scanner is currently in use.  Wait until your previous task is completed, and then try to scan the image. "Problem is that there is no a process task.  Tried to cancel all the projects of the printer and tried unplugging the printer to reset.  Still the same message.

    Success!  Downloaded the print and Scan of the doctor and he revealed that my scanning driver did not communicate with the printer, but the resolution has not corrected the problem.  I was directed to the HP site customer service, where I downloaded a new driver package and the problem has been fixed in the end.  Scanner works now.  Thank you!

  • block the fnd_request.submit_request return 0 Using pl/sql in the trigger

    Hi all

    I put a trigger on table AFTER the UPDATE ON WSH_DELIVERY_DETAILS in which I fire one program simultaneously but custom fnd_request.submit_request 0 block pl/sql Using back of front end, while it is excellent work of backend. Please help me solve the problem.

    Thank you and best regards,

    Haresh

    Haresh,

    I'm glad to hear that it worked.

    Please close the thread by checking the useful and correct answer.

    See you soon

    AJ

  • Drop-down menu used with anchor on the long table of data links

    Hello

    I have a page on our site where we used a drop shape with anchor tags to let the visitor easy access to specific locations within a long table of data on the same page. Recently, I noticed that the anchors are walking around is no longer the tags in the page but only the beginning of the table anyway. I don't know if over time a few additional codes may have been added to the page that is not in conflict with the form of drop down menu, or if it's something else. I've been agonizing about this for awhile now and unable to fix. I'm hoping a new set of eyes will revisit the issue. the url is http://www.vectron.com/products/saw/saw.htm

    Thank you

    Looks like there are a good number of errors html on this page, some of them have to do with using the code of the named anchor.

    Looks like you have placed the anchors between the openingand the child of the opening. Content cannot go there, move them in theTags and see if that helps.

    It could be something else however, html errors are one of the main causes of the problems of display/functionality. Visit the validator to http://validator.w3.org to clean up your errors. If you work with the code clean and correctly positioned anchors, after return and we can take a closer look.

Maybe you are looking for

  • Marked opening folder 'exec '.

    I tried to open an old file (February, 2013) Information Panel is "app Document Pages '; the case is black with the word "exec" print green. Nothing that I want to open; Any Suggestions? Looking into the files more old I find now that many are now si

  • ITunes does not detect Ipad 2 or Ipod 5 g

    Hello I have an Ipad 2 and a 5 G Ipod and Itunes still detected the two devices. There is no if long I started having problems with Itunes as well of detection devices. 1. open Itunes 2 connect the device (Ipad or Ipod) via USB (PC - Windows 10 detec

  • Yoga 2 Pro

    Yoga 2 Pro features the same price for the following 2 options: 1 I5-4200 with 8 GB of memory 2 I7-4500 with 4 GB of memory What you think are the best choice?

  • suddenly more elements network named WCIVANT04 now gone

    Never had this in the column before network.  Clicking on it opens a box that included "scan with Norton" (Norton failed to find all the files inside) and "connect to remote computer."  Anyway another box opens with a subject top left appearing as "W

  • Smartphone blackBerry Bold 9900 - Modem

    Can I use my Bold 9900 as a modem attached with other phones (android or iOs)?