Meaning about PL/SQL

HI All,
I have some question about PL/SQL Collection like Associative Arrarys is like
Single Dimension
Unbounded
Homogeneous
Can I know the meaning for above terms I may think about Unbounded and Bounded it's like
Associative Arrays have much space at runtime where
Arrays are bounded like CHAR data type I will have limited space correct me if I am wrong. Give some example for between understand.

1007945 wrote:
HI All,
I have some question about PL/SQL Collection like Associative Arrarys is like
Single Dimension
Unbounded
Homogeneous
Can I know the meaning for above terms I may think about Unbounded and Bounded it's like
Associative Arrays have much space at runtime where
Arrays are bounded like CHAR data type I will have limited space correct me if I am wrong. Give some example for between understand.
An associative array is a name-value pair. And is of very little use in 99% of general PL/SQL programming.
Such arrays are one dimensional. You reference the array with a single index value - unlike a 2D (standard non-associative) array where each cell in the array is referenced by an index pair (x,y) for example.
Associative arrays are also homogeneous - it only supports native scalar types (e.g. string, number, date).
And associative arrays are unbounded. You do not place a limit with the definition of the type, on the number of cells it can hold (unlike a VArray type definition for example).
Associative arrays are largely useless in the PL/SQL environment. It is a specialised form of an array. And within PL/SQL and database context, dealing with name-value pairs in a non-scalable program language structure (as oppose to a SQL based table structure) raises all kinds of questions.
Which is also why the majority of PL/SQL  code and samples and examples using associative arrays are wrong.

Similar Messages

  • [ask] about oracle sql injection and escalation

    Hello,i'm student , i'm studying oracle,now i want to research about oracle sql injection,i had read some tuttorial such as *'Hacking Oracle From Web,Advanced SQL Injection In Oracle Databases,Oracle Hacker HandBook ...'* but when i try to demo on localserver (11.0.1.6) but not run,and this is my demo
    -- first,i created table users
    create table users (name nvarchar2(50),pass nvarchar2(50))
    -- then i created procedure with system user
    create or replace procedure system.adduser(u nvarchar2,p nvarchar2)
    as
    begin
      insert into users values(u,p);
    end;
    -- grant execute privilege to oc user
    grant execute on adduser to oc
    -- login with user oc and create a procedure
    create or replace procedure sqli
    as
    begin
      execute immediate 'grant dba to oc';
    end;
    -- and then,i run system's procedure
    declare
    begin
      system.adduser('admin','admin'' ; execute immediate  ''declare begin sqli() end;');
    end;
    i hope oracle master help me to i can understand and improving my knowledge
    Thanks

    The best forum for this is probably Forum Home » Java » SQLJ/JDBC
    Presumably you are refering to oracle.sql.TIMESTAMP. While this is intended to (and does) correspond to java.sql.Timestamp it can't be a subclass because it needs to be a subclass of oracle.sql.Datum.

  • Can you tell me the means about "TWO_TASK"

    Can you tell me the means about "TWO_TASK"

    Which years, which models? There are too many things unknown. If the computer boots then use System Profiler to identify the Machine ID numbers. Or you can go to www.everymac.com and see.

  • About Oracle SQL Certification Details

    Hi All,
    I want to Details About Oracle SQL Certification. How many Type and what are there.
    Thanks & Regards

    You will get better answers in the [Oracle Certification Forum|http://forums.oracle.com/forums/forum.jspa?forumID=459]
    Thanks,
    Karthick.

  • Difference about the SQL Statement

    Hi,
    I have a doubt, It in one of my application i wrote a select query like this
    sql> select * from quartz;
    but my DBA told me not to use the *(star), instead he told me to use the column names. when i asked him, he said there will be performance issues.
    Now my question is can u explain me the difference.
    Thanks in advance,
    Siva

    Did the DBA explain what performance issue he was concerned about? Obviously, Oracle has an extra step to resolve the * to the appropriate column list, but this is likely to be an imperceptibly small portion of the time required to execute the query.
    In an actual application, you would normally want to explicitly list column names so that your code isn't affected when new columns are added to the tables.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • What does the usage of CURSOR word mean in an SQL statement?

    Hey folks,
    Please check out the following query and do please explain me what does the usage of CURSOR keyword in an SQL statement mean.
    select deptno,cursor(select ename from emp a where a.deptno=b.deptno) from dept b;
    well, the output was like this,
    DEPTNO CURSOR(SELECTENAMEFR
    10 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    ENAME
    CLARK
    KING
    20 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    ENAME
    SMITH
    JONES
    SCOTT
    ADAMS
    FORD
    30 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    ENAME
    ALLEN
    WARD
    MARTIN
    BLAKE
    TURNER
    JAMES
    6 rows selected.
    40 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    no rows selected
    Your favour'll be deeply appreciated.
    Cheers,
    PCZ

    This returns a non-square result set. Each row of the result is a deptno and then a result set of the enames in that deptno.
    This can be useful when you need to send a lot of data to a client application in a single query that would otherwise contain a lot of redundancy. It tends to be a relatively unusual construct (I've only found one situation where it was appropriate in my career) and requires some relatively sophisticated understanding on both the database and client sides.
    Justin

  • A silly question about oracle.sql.timestamp and java.sql.timestamp

    Hi,
    I'm looking at a method that takes objects of type Object and does stuff if the object is really a java.sql.timestamp. If it is not then an error is flagged. In my case it flags an error when an object of type oracle.sql.timestamp is passed to it. Not really entirely comfortable with java (i'm still learning it), here's my stupid question :- why isn't oracle.sql.timestamp a subclass of java.sql.timestamp? Also in various books it indicates that java.sql.timestamp maps to oracle.sql.timestamp. Does that mean you have to physically do the mapping:
    i.e.
    java.sql.Timestamp t = new Timestamp( new oracle.sql.Timestamp( CURRENTTIMESTAMP ).timestampValue() );
    or is there something else to it.
    Thanks.
    Harold.

    The best forum for this is probably Forum Home » Java » SQLJ/JDBC
    Presumably you are refering to oracle.sql.TIMESTAMP. While this is intended to (and does) correspond to java.sql.Timestamp it can't be a subclass because it needs to be a subclass of oracle.sql.Datum.

  • Question about PL/SQL Function in report

    Hi all. I have a (basic) question about using a PL/SQL function in a report. In my report page I have an item (PL/SQL function) that has the following syntax:
    return username from t1
    where username like 'Le%'
    I reference this item in an email process. Ideally this function would return all usernames that begin with 'Le' in the drafted email; however, its not looping so I'm only getting a return on the first name.
    I have a few books on PL/SQL but I'm not exactly sure where to start - I imagine there is a loop process I need to integrate into the function but, like I said, I'm not sure.
    I would have posted this to the PL/SQL forum but also wanted some feedback on whether or not using this method is the best way forward. Essentially I have a table with usernames and just want to send email messages based on some simple logic.
    Thanks!
    Len

    Hi Sergio,
    First, it's an honor to have you reply to my post. Thanks!
    To be more specific,
    T1 is a table containing the results from a user security scan. Username is a column in this table containing user names. What I have done is create a page in HTML DB with the following elements:
    1. An 'Item' containing the PL/SQL function that is hidden. The purpose of this Item is to generate information from T1 that meets the simple logic parameters - in this case, the user names that begin with "Le". I have called this Item P145_TT
    2. A 'Process' containing references to HTMLDB_MAIL. The 'Process' looks similar to this:
    HTMLDB_MAIL.SEND(
    P_TO => '[email protected]',
    P_FROM => 'Anon Email Account',
    P_BODY => 'Note: This message was automatically generated. Do not attempt to reply to this email.
    These are the users that begin with Le: '||:P145_TT||' ',
    P_SUBJ => 'Summary');
    3. A 'Button' to submit the process and (hopefully) send the message containing all users that adhere to the logic in the function.
    4. If I use 'return username from t1...' I will get a username generated, but like I said previously, it only gives me the first and does not loop.

  • About PL/SQL usage!!!

    Where do I use PL/SQL procedures for example? Do I put the calls to them in java methods?

    There is no simple answer to such a simple question.
    When I analyze your question I think that you are struggeling with an application architecture matter. Basically, the first answer that springs to mind would be:
    - You should use PL/SQL when you have to implement functionality that is databound.
    In other words: when your process is about manipulating data rather than doing complex arithmetic, you should use PL/SQL.
    When it comes to the question on how to integrate the PL/SQL code with the other components that make up your information system, than the question is raised what type of information system you are building and what the infrastructure is on which it will be running.....
    In all cases, please realise that PL/SQL code is running in the database tier of your application infrastructure!!!
    Hope this helps...
    Message was edited by:
    Toine

  • A problem about Ms Sql 7 - Oracle 8.1.5 ?

    hi
    I used OMWB to migrate MS sql 7 to Oracle 8.1.5, both of our env are on chinese character set,it worked well. Thank OMWB work team. The whole process of migration did't meet any problem. But I met a problem about character set,I don't see right content on CLOB column,all data in CLOB columns are like the following something :
    0F5C3A53A44E1A904575BE8FBF4F776302303052FD56388D01303100380006529F943052B065164E
    I maped text datatype of SQL to CLOB datatype,I can see the right data directly in SQL by select command,but I can't see the right data in SQL*PLUS.
    How can I do? Migration workbanch don't support the multi-bit char set such as chinese?
    null

    I already knew the solution of the problem,but I met another problem.
    I checked my sql 7 database again, I found large columns are ntext datatype. I changed the ntext to text and migrated data again. In SQL*PLUS ,I found the data of clob columns change to '????.?-?'. I know this is caused by NLS_LANG, my NLS_LANG=simplified chinese_china.zhs16gbk. How do i set my nls_lang to get the right data?
    null

  • Information about bde_chk_cbo.sql

    Hi All,
    I want my database to be configiured as per bde_chk_cbo.sql.
    My apps version -12.1.3 and db version is 11.2.0.3
    I have run the bde_chk_cbo.sql.
    Now How i will which parameter is to confiogured as per bde_chk_cbo.sql.
    dentification
    Date:     07-MAR-11 16:13
    Host:     atgsvr11
    Platform:     Linux Production
    Database:     VISR1211(4252206356)
    Instance:     VISR1211(1)
    RDBMS Release:     11.1.0.7.0(11.1.X)
    User:     APPS
    APPS Release:     12.1.3
    CPU Count:     4
    Common database initialization parameters
    Parameter      Current Value      Required Value      CBO      MP      SZ
    db_name     VISR1211     prodr12               
    control_files     /d01/oracle/VISR1211/db/apps_st/data/cntrl01.dbf     three copies of control file               
    control_files     /d01/oracle/VISR1211/db/apps_st/data/cntrl02.dbf     three copies of control file               
    control_files     /d01/oracle/VISR1211/db/apps_st/data/cntrl03.dbf     three copies of control file               
    db_block_size     8192     8192          Y     
    systemtrig_enabled     TRUE     TRUE          Y     
    o7_dictionary_accessibility     FALSE (NOT SET)     FALSE          Y     
    nls_territory     america     AMERICA               
    nls_date_format     DD-MON-RR     DD-MON-RR          Y     
    nls_numeric_characters     .,     ".,"               
    nls_sort     binary     BINARY          Y     
    nls_comp     binary     BINARY          Y     
    nls_length_semantics     BYTE     BYTE          Y     
    audit_trail     NONE (NOT SET)     TRUE (optional)               
    max_dump_file_size     20480     20480               
    tracefiles_public     TRUE     TRUE               
    processes     200     200-2500               Y
    Above is the output of bde_chk_cbo.sql script I can see column the required value , CBO, MP and SZ .
    Required value means i have to set the parameter as per this column for e.g process current value is 200 and required value is 200-2500 which means that the process value parameter should be in between 200-2500. it is showing SZ as y what does that mean can anybody please explain me ?
    Thanks and Regards,

    Hi
    Thanks for the update.
    I am using the same note id . I dont know how to configure the parameter as per script bde_chk_cbo.sql.
    How to check for suggestion from html which is created after running the bde_chk_cbo.sql script.
    Thanks and Regards,

  • What is the rule about installing SQL server 2000

    I'm a bit confused if which of the two is the best that i can  do:
    1. install MS SQL 2000 to R/3 Apllication Box per box
    or
    2. install MS SQL 2000 in 1 box and link the r/3 Applications form it?
    im using SAP 4.6.c. I dont know what should i do... is it REALLY required that the MSSQL 2000 be installed per box (DEV, PRD, DB, etc.)?

    Hi Michael,
    it is possible to have just one DB server with different DBs (DEV, QAS, PRD) on it. You have to decide if you install your DBs in one instance of SQL Server or if you install named instances - e.g. one instance for DEV, one instance for QAS and so on. If you have all DBs in one instance they all share the same ressources like processors, buffers etc. That means that your possibilities to tune such a system are limited. Also if you have to stop the instance (e.g. for Support Packages or patches) all SAP Systems are not available. 
    On a box with named instances you can distribute the server ressources among those instances. For example the DEV instance gets 512 MB of RAM and may use 2 processors. The PRD instance gets 2 GB of RAM and may use 6 processors. You can stop and patch each instance individually.
    But if I understand your post correctly you work in an 32 Bit environment. In such a case I would never recommend putting PRD with DEV and QAS on one database server. For DEV and QAS a Cental System (SQL Server and SAP on the same server) is usually the right choice. For production you might want to install the Database Instance on a separate server and the Central Instance on a separate server. For scalability reasons you can then add as many Dialog Instances as necessary.
    But always keep in mind, you only have ONE Database Instance per SAP system! You can install many Dialog Instances connected to that Database Instance. That means your database is the 'heart' of you SAP system and should be treated that way.
    Regards,
    Sven

  • About embedded SQL in J2ME

    Hi There...
    I am working with the Database project in J2ME.So that i have used java.sql.
    But after build the project J2ME wireless toolkit shows the error that package java.sql.* does not exist.
    Following is the code...
    import java.sql.*;
    public class ModelMIDlet
    private Connection Database;
    private Statement DataRequest;
    public ModelMIDlet()
    String url="jdbc:odbc:CustomerInformation";
    String uid="umesh";
    Stirng password="umeshD";
    try
    }catch(ClassNotFoundException er)
    System.err.println("Unable to load the JDBC/ODBC bridge" +er);
    System.exit(1);
    catch(SQLException er)
    System.err.println("Cannot connect to the database" +er);
    if(Database!=null)
    try
    Database.close();
    }catch(Exception e){}
    System.exit(2);
    try
    {}catch(SQLException er)
    System.err.println("SQL error" +er);
    if(Database!=null)
    try
    Database.close();
    catch(Exception ex){}
    System.exit(3);
    if(Database!=null)
    try
    Database.close();
    catch(SQLException er){}
    public static void main(String args[])
    final ModelMIDlet sql1=new ModelMIDlet();
    System.exit(0);
    error:package java.sql does not exist
    So please give me a guidence.
    also give info about database handling.

    You can't use any JDBC driver to communicate your J2ME application with the Apache or any database on the server side. What maximum you can do is :
    1. Create a Web Service and use it over GPRS to get connencted to your Apache.
    Or,
    2. Create JSP and call it by creating HttpConnection from the J2ME client over GPRS and start talking to your Tomcat.
    Shan!!!

  • Help! problem about jstl sql with "LIKE?" in query

    Hi All,
    I have a problem about getting data by using "LIKE" in my sql statment.
    here is my case:
    <sql:query var="tmp">
    SELECT ...... FROM ...
    WHERE a LIKE ?
    <sql:param value="%${param.a}%"/>
    </sql:query>
    Once I used "LIKE" keyword, the query failed to use this critica.
    and couldn't find any match cases
    thx or help
    Micheal

    besides, i found that:
    this works:
    "AND a.block LIKE '%' + 'a' + '%'"
    but these don't work:
    "AND a.block LIKE '%' + 'a' + '' + '%'"
    or
    "AND a.block LIKE '' + '%' + 'cp' + '%'"
    or
    "AND a.block LIKE '%' + 'cp' + '%' + ''"
    it seems '' is the casue of error... so strange, anyone has idea?
    micheal

  • Questions about downloading SQL Server Compact 3.5

    I want to use SQL Server Compact 3.5 with Microsoft Visual Basic 2008 Express Edition, but when I go to "Get It" it gives me two options: to download Visual Studio 2010, download Microsoft SQL Server Compact 3.5 Service Pack 2 for Windows
    Desktop or download Microsoft SQL Server Compact 3.5 Service Pack 2 Server Tools. Are any of the last two the actual SQL Server Compact 3.5 (or what do they mean with "Service Pack"?) or is there another way to download SQL Server Compact 3.5?

    Are any of the last two the actual SQL Server Compact 3.5 (or what do they mean
    with "Service Pack"?) or is there another way to download SQL Server Compact 3.5?
    Hello,
    This means it's an updated Version = SQL Server Compact 3.5 including Service Pack; you should download that "Microsoft SQL Server Compact 3.5 Service Pack 2"
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

Maybe you are looking for

  • Can't boot from OS CD/DVD - ejects disc with no message

    I just bought a PowerPC Mac mini on eBay to use at home, and the old user did not clear his data. I want to do a fresh install of OS X and start from scratch. If I try to boot from either the mac mini 10.3 disc or the 10.4 upgrade disc, and I hold do

  • Path tool long when using arrays

    Hey Powershell people. I'm running into an array issue in powershell where the error "Copy-Item : The specified path, file name, or both are too long" is thrown back at me. However, the odd thing is if I type the copy path in manually the script it w

  • How to add custom parameters in LDB.

    Hi, i have to add my own parameters for e.g. plant in standard report RFUMSV00. This report uses LDB 'BRF'. How it is possible. if i have to make Z report then also plz tell me in details. its urgent. Regrds, Santosh.

  • Image of the HotSpot architecture

    Hi everybody, I'm looking for a good picture of the internal architecture of HotSpot with all steps : - classloader => loading -> linking (verification, preparation, resolution, access control) -> initialisation - compilation => client / server - byt

  • Runtime JS-Error in SAP-Functions

    Hi guys, I have 2 includes in a webtemplate. I have extract the Head and the Navigation-part. Now if I want switch 2 Characteristics I get a runtime error in Line 4 (SAP-Function....). This problem I get only with the IE, with FF the switch runs. Her