CREATE TABLE A AS SELECT * FROM B WHERE 1 = 2'-Queries

Guys,
I request your guidance in the effect of Create table statement below:
CREATE TABLE A AS SELECT * FROM B WHERE 1 = 2';
Question:
1)What would be the PCTFREE value for table A-Would it inherit PCTFREE from table B?
2) Will table A be created with LOGGING or NO LOGGING?-Will it iinhert the same from table B?
3) What would be the degree of parallelism of table A?-Will it inherit the DOP from B?
Thank you very much for your guidance in advance..
Regards,
Bhagat

1 => it will inherit from the default value
2 => same thing
3 => same thing
The create table as select will only copy the structure of the source table and can copy the datas too. That is all.

Similar Messages

  • Create Table Temp As Select * from Table

    What happens in the backend (performance point of view) when we create a table as follows:
    Create Table Temp As Select * from Table1;
    Suppose that the table Table1 has 10 million rows.
    How is this different from inserting 10 million rows using Insert Statement in a script etc. into Temp table.
    i.e. insert into temp values(1, 'description', sysdate);

    >
    Create Table Temp As Select * from Table1; is always faster than inserting different rows using insert scripts.
    >
    Incorrect - not sure where you got that information.
    The two things being talked about that can affect performance are the use of direct-path loads and whether those loads are logged.
    It makes no difference if the table is created first and then loaded using INSERT or if a CTAS is used to do both.
    A traditional INSERT can use the APPEND hint to perform a direct-path load.
    >
    Cretae table Temp As select * from Tabl1 does not generate logging to the database.Also as datatypes are determined automatically ,there is less work up front.
    >
    The statement that CTAS 'does not generat logging' is incorrect. Whether logging is generated depends on whether the table is in LOGGING or NOLOGGING mode. A CTAS does not automatically, on its own bypass logging.
    To bypass logging and existing table can be set to NOLOGGING mode
    ALTER TABLE myTable NOLOGGINGAnd for CTAS the mode can be specified as part of the statement
    Create table Temp NOLOGGING As select * from Tabl1;

  • Table structure changes when using 'create table X as ( select * from X@remote_server )'

    I need to create and copy data from a remote Oracle server to a local server. The command I use is
    create table X as ( select * from X@remote_server )
    with remote_server is the tns name of the remote Oracle server.
    The local table is created and populated with data as expected but when I check the structure using 'desc X' it shows me all the CHAR fields of the local table are triple as large as of the remote table.
    I guess the problem is the difference  between the NLS_CHARACTERSET settings . The local charset is AL32UTF8 and the remote is  WE8MSWIN1252.
    How do I change the command to make the two tables have the same field sizes ?
    Thanks,
    Vu

    Do you want to be able to store all the data from the remote table in the local table?  Assuming you do, increasing the size of the column would be the correct behavior.
    By default, a VARCHAR2(10) allocates up to 10 bytes of storage.  In the Windows-1252 character set on the source, 1 character requires 1 byte of storage.  So a VARCHAR2(10) has space for up to 10 characters.  In the UTF-8 character set on the destination, however, 1 character can require up to 3 bytes of storage.  So a VARCHAR2(10) may allow you to store as few as 3 characters.  Since Oracle has no way of knowing what data you have (and will have) in the source system, it triples the size to ensure that all the data from the remote system will fit in the new table.  If you want the columns to be the same size on the destination that they are on the source, it is highly probable that you'll get errors inserting the data because at least one value will be too large for the destination column.
    Justin    

  • Create table bulk_load as select ename from emp where 1=2

    The Above Query will create a new table using the strucure of old but there will be no data..
    Kindly explain me what is meant by "where 1=2"?
    Is it referring the table or column or for just testing the query??

    Is not a rule that you always must use 1=2... look this example:
    sql >> create table t as
    2 select * from all_objects;
    Table created.
    sql >> select count(*) from t;
    COUNT(*)
    43975
    sql >> create table ttt as
    2 select * from t where rownum=0;
    Table created.
    sql >> create table tt as
    2 select * from t where 9=4;
    Table created.

  • Select * from emp where ename=(procedure1(procedure2(procedure3)));

    I have a big problem
    I have to check the data for quality data
    Lets say i have to check data in emp table
    First i have to check whether the empno is of type number
         IF empno=number then
              if ename starts with a particualar format then
                   ---printouts and this procedure goes on for about 10 coulumns
    I have designed a hard coded procedure where I input table name and column name and the procedure does the checks and give out result
    I have planned to call that procedures here for each checks
    its like i make the procedure to execute and the procedure returns rowid of the correct data
    now i have to apply the second procedure where input is all the rowids of previous procedure and it goes on
    I even dont know whether procedure is correct or function is correct
    Its like select * from emp where ename=(procedure1(procedure2(procedure3)));
    each procedure's output is Rowids only which satisfy a particular format of data
    Please explain me in details
    Please please help me.

    Nested calls are not the best of ideas. Ignoring that for a moment, there are a couple of ways to address this requirement in Oracle. One of these, and likely one of the more scalable ways, is to use Pipeline Table Functions.
    The following code demonstrates the basics of this approach, using pipelined table functions to perform validation checks on data.
    SQL> -- generic type to serve as input cursors to the validation functions
    SQL> create or replace type TFormatCheckRow as object
      2  (
      3          row_identifier  varchar2(30),
      4          value           varchar2(100)
      5  );
      6  /
    Type created.
    SQL>
    SQL> -- validation functions returns the rowid of rows that are valid
    SQL> create or replace type TRowID as object
      2  (
      3          row_identifier  varchar2(30)
      4  );
      5  /
    Type created.
    SQL>
    SQL> create or replace type TRowIDTable is table of TRowID;
      2  /
    Type created.
    SQL>
    SQL>
    SQL> create or replace package LIB is
      2
      3          type    TCursor is REF CURSOR;
      4  end;
      5  /
    Package created.
    SQL>
    SQL> -- sample validation function to check if the value is a valid NUMBER, and
    SQL> -- if so will return the rowid of that row for further processing
    SQL> create or replace function ValidateNumber( c LIB.TCursor ) return TRowIDTable
      2          pipelined is
      3
      4          MAX_FETCH_SIZE  constant number := 100;
      5          type    TBuffer is table of TFormatCheckRow;
      6
      7          buffer  TBuffer;
      8
      9          function IsNumber( val varchar2 ) return boolean is
    10                  n       number;
    11          begin
    12                  n := TO_NUMBER( val );
    13                  return( TRUE );
    14          exception when OTHERS then
    15                  return( FALSE );
    16          end;
    17
    18  begin
    19          loop
    20                  fetch c bulk collect into buffer limit MAX_FETCH_SIZE;
    21
    22                  for i in 1..buffer.Count
    23                  loop
    24                          if IsNumber( buffer(i).value ) then
    25                                  PIPE ROW( TRowID( buffer(i).row_identifier ) );
    26                          end if;
    27                  end loop;
    28
    29                  exit when c%NOTFOUND;
    30          end loop;
    31
    32          close c;
    33
    34          return;
    35  end;
    36  /
    Function created.
    SQL> show error
    No errors.
    SQL>
    SQL>
    SQL> -- a sample table to check
    SQL> create table foo_tab
      2  (
      3          some_value      varchar2(20)
      4  )
      5  /
    Table created.
    SQL>
    SQL>
    SQL> -- put some data into the table
    SQL> insert
      2  into       foo_tab
      3  select
      4          object_id
      5  from       all_objects
      6  where      rownum < 11
      7  /
    10 rows created.
    SQL>
    SQL> insert
      2  into       foo_tab
      3  select
      4          SUBSTR(object_name,1,20)
      5  from       all_objects
      6  where      rownum < 11
      7  /
    10 rows created.
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> -- return rowids of all rows from FOO_TAB where the column SOME_VALUE is a valid number
    SQL> select
      2          row_identifier
      3  from       TABLE(ValidateNumber( CURSOR(select TFormatCheckRow(f.rowid,f.some_value) from foo_tab f) ))
      4  /
    ROW_IDENTIFIER
    AAAOQKAAEAAAAFQAAA
    AAAOQKAAEAAAAFQAAB
    AAAOQKAAEAAAAFQAAC
    AAAOQKAAEAAAAFQAAD
    AAAOQKAAEAAAAFQAAE
    AAAOQKAAEAAAAFQAAF
    AAAOQKAAEAAAAFQAAG
    AAAOQKAAEAAAAFQAAH
    AAAOQKAAEAAAAFQAAI
    AAAOQKAAEAAAAFQAAJ
    10 rows selected.
    SQL>
    SQL>
    SQL> -- list the rows that contain valid numbers
    SQL> with ROWID_LIST as
      2  (
      3  select
      4          row_identifier
      5  from       TABLE(ValidateNumber( CURSOR(select TFormatCheckRow(f.rowid,f.some_value) from foo_tab f) ))
      6  )
      7  select
      8          *
      9  from       foo_tab f
    10  where      f.rowid in (select row_identifier from ROWID_LIST)
    11  order by 1
    12  /
    SOME_VALUE
    258
    259
    311
    313
    314
    316
    317
    319
    605
    886
    10 rows selected.
    SQL>

  • Is it possible to ... SELECT * FROM my_table WHERE ssn IN (..arraylist..) ?

    Hi, I have a quick question I hope someone can help me with. I'm a student and what I'm looking for should be easy but I can't find any information on it.
    Here's my code, it's probably self-explanatory but to clarify I'm trying to get a list of "Captains" in the order of who has the most wins.
    The problem is that the database tables have thousands of "Captains" and I'm only supposed to look at 200 specific "Captains" which have their ssn in a specific arraylist and then return the top 80 "Captains" from that selection.
    Something like this...
    SELECT first 80 E.name, L.ssn, COUNT(L.wins) as Wins
    FROM log L, employees E
    where type matches "[Captain]"
    and E.ssn = L.ssn
    and L.ssn IN (...arraylist...) // How do I loop through the arraylist but still return a list of the top 80 winners?
    group by E.name, L.ssn
    order by Wins desc;
    Should I start by taking the list of social security numbers from the arraylist and insert them into a temporary table and then use that temporary table to base my selection on?
    For example:
    int rows = 0;
    PreparedStatement ps = conn.prepareStatement("INSERT INTO TEMP captainsTemp (ssn) VALUES(?)");
    Iterator i = myArrayList.iterator();
    while (i.hasNext())
         // Set the variables
         for (int pos = 1; pos <= 63; pos++)
              String s = (String)i.next();
              ps.setString(pos,s);
         // insert a row
         rows += ps.execute();
    ...and then below that I could use
    "SELECT * FROM captains
    WHERE ssn IN (SELECT * FROM captainTemp)..."
    This looks like an ugly solution and I'm not sure if it works, sessionwise..
    Everything's written in Java and SQL.
    If you have any thoughts on this I would be most grateful.
    I should add that this is NOT a school assignment but something I'm trying to figure out for my work...
    Many thanks,
    sincerely,
    JT.

    hi,
    Ignore my previous response. Try out this one. It should help you.
    Lets take the example of EMP table (in Oracle's SCOTT Schema). The following is the description of the table.
    SQL> desc emp
    Name Null? Type
    EMPNO NOT NULL NUMBER(4)
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    SQL> select ename from emp;
    ENAME
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    Say, the ArrayList contains 3 names CLARK,KING & MILLER. You want to loop through the ArrayList for the ENAME values.
    First construct a string like below from the ArrayList.
    "ename in 'CLARK' OR ename in 'KING' or ename in 'MILLER'";
    Append this string to the normal SELECT Query
    Query :
    select ename from emp where ename in 'CLARK' OR ename in 'KING' or ename in 'MILLER'
    Here you get the desired output & thats pretty fast because you just do it once !!!
    SQL> select ename from emp where ename in 'CLARK' OR ename in 'KING' or ename in 'MILLER';
    ENAME
    CLARK
    KING
    MILLER
    you can extend this to your Query also.
    thanks,
    Sriram

  • $sql ='SELECT * FROM fideles  WHERE (fideles.NOM ==($_POST [Nom]))';

    hello
    i don'\t know why my syntax is wrong could you help to give me the right syntax.
    thank you for helping
    [email protected]

    i forgot to join my script
    <?php
    mb_http_input("iso-8859-1");
    mb_http_output("iso-8859-1");
    ?>
    <?php require_once('Connections/FIDELES.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_FIDELES, $FIDELES);
    $query_Recordset1 = "SELECT * FROM fideles ORDER BY NOM ASC ";
    $Recordset1 = mysql_query($query_Recordset1, $FIDELES) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    echo $Recordset1;
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
    <head>
           <title>Formulaire</title>
           <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                 <link rel="stylesheet" media="screen" type="text/css" title="Miseenforme" href="Miseenforme.css" />
                 <style type="text/css">
                 @import url("ModuleStyleSheets.css");
           </style>
                 <link href="CSS/colors5.css" rel="stylesheet" type="text/css" />
                 <style type="text/css">
                 h1 {
              font-size: xx-large;
           #corps form p {
              font-size: 18px;
              text-align: left;
              font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
           #corps form p br {
              font-family: Palatino Linotype, Book Antiqua, Palatino, serif;
              font-size: 24px;
           #corps form p label {
              text-align: left;
           #corps form p label {
              text-align: left;
           #corps form p label {
              text-align: left;
           form p label {
              text-align: left;
           #corps form p {
              color: #FFFFFF;
           </style>
    </head>
       <body>
       <div id="corps">
       <form action="modifier.php" method="POST" enctype="multipart/form-data">
       <p><!-- #BeginDate format:fcAm1 -->Sunday, September 15, 2013<!-- #EndDate -->
       </p>
       <table width="500" border="1" align="center" cellpadding="2" cellspacing="2">
         <tr>
           <th width="500" align="center" bgcolor="#66FFFF" scope="row">FICHE D'INSCRIPTION</th>
         </tr>
       </table>
       <p>
                 <label for="Nom">Nom</label>
                        <input name="Nom" type="text" id="Nom" value="<?php echo ($_POST ['Nom']);   ?>"  size="20" readonly="readonly" /><br/>
                <label for="Prenom">Prenom</label>
                        <input type="text" id="Prenom" name="Prenom" value="<?php echo ($_POST ['Prenom']);  ?>"   size="20" readonly="readonly" /><br/>
         <p>Adresse:
           <label>
             <textarea name="adresse" id="adresse" cols="45" rows="5" value="<?php echo $data['ADRESSE'] ;  ?>" readonly="readonly" /></textarea>
           </label>
            <input name="Submit" type="submit" value="Submit" />
         <input type="reset"/>
           </p>
    </p>
       <?php
        if(isset($_POST['Nom']) &&(isset($_POST['Prenom']) ))
    // lancement de la requete //
    $sql ='SELECT * FROM fideles  WHERE (fideles.NOM =($_POST [Nom]))';
    // on lance la requête (mysql_query) et on impose un message d'erreur si la requête ne se passe pas bien (or die)
    $req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error()); 
    // on recupere le resultat sous forme d'un tableau //
      $data = mysql_fetch_array($req);
    echo $data['ADRESSE'];
      mysql_free_result ($req); 
      mysql_close ();
      return($data); 
      else
       echo "Veuillez saisir le nom et le prenom";
    ?>
              </form>
       <table width="97%" border="1" cellpadding="2" cellspacing="2">
         <tr>
           <td><a href="index.php" rel="publisher">Index</a></td>
           <td><a href="index.php">Accueil</a></td>
           <td><a href="formulaire.php">Creation</a></td>
           <td><a href="formulairemodif.php">Modification</a></td>
           <td><a href="formulairesupress.php">Supression</a></td>
           <td><a href="consultation.php">Consultation</a></td>
           <td><a href="palmdon.php">Palmares des dons</a></td>
         </tr>
       </table>
       <p></div>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>

  • SELECT * FROM mytable WHERE ANYCOLUMN like myString

    Hi ALL,
    Is there a way i can select a row wherein any of the columns contain my search string?
    SELECT *
    FROM mytable
    WHERE ANYCOLUMN like '%myString%'Thanks!
    BROKEN

    Example of it working...
    SQL> var val varchar2(5)
    SQL> exec :val := 'KING'
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
      1  select distinct substr (:val, 1, 11) "Searchword",
      2                  substr (table_name, 1, 14) "Table",
      3                  substr (t.column_value.getstringval (), 1, 50) "Column/Value"
      4             from cols,
      5                  table
      6                     (xmlsequence
      7                         (dbms_xmlgen.getxmltype ('select ' || column_name
      8                                                  || ' from ' || table_name
      9                                                  || ' where upper('
    10                                                  || column_name
    11                                                  || ') like upper(''%' || :val
    12                                                  || '%'')'
    13                                                 ).extract ('ROWSET/ROW/*')
    14                         )
    15                     ) t
    16         where table_name = 'EMP'
    17*        order by "Table"
    SQL> /
    Searchword  Table          Column/Value
    KING        EMP            <ENAME>KING</ENAME>
    SQL>

  • SA 520 error every 10 seconds: sqlite3QueryResGet failed.Query:SELECT * FROM networkInterface WHERE interfaceName=\'bdg1\

    Hi all,
    On a SA 520 I got this error, every 10 seconds:
    sqlite3QueryResGet failed.Query:SELECT * FROM networkInterface WHERE interfaceName=\'bdg1\
    Internet access was very spoty and I couldn't reach the firewall administration on the LAN interface. Had to shutdown the appliance to get it working again.
    Firmware version is 2.1.7.1
    What could have happenend?
    With kind regards,
    Jeroen

    Hi, everything in the "Quick Reference" section should be commented out with ;
    You should change those settings further down in the php.ini file.
    Example:
    error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
    display_errors = Off
    Last edited by adrianx (2013-07-26 12:32:02)

  • Select * from viewname where 1 1 gives records back

    for one customer the following sql gives records back
    select * from viewname where 1&lt;&gt;1
    we asked the customer to send over the database to us but we can't reproduce this behaviour. We don't get any records. the problem is we don't have the same version of oracle they use 9.2.0.4 and we used 10.2.0.1. i can't download the 9i version anymore.
    Does anybody know of a bug in oracle which can cause such behaviour or a setting which can correct this?
    Edited by: BluShadow on 09-Aug-2012 10:06
    corrected the &lt;&gt; issue so it's visible. Please read {message:id=9360002} which describes this issue.

    951790 wrote:
    i suspect the customer would first want us to show that their version is the problem.It doesn't work like that. If your customer called Oracle Support and said... "we're experiencing problems and our database version is 9.2.0.4"... oracle would turn around and say "that version is no longer supported, please upgrade". If they insist on knowing that their version is the problem, then the answer is "yes, it's the problem, it has known bugs and newer versions are available that address thousands of issues since"
    Using a query with "where 1 &lt;&gt; 1" as a condition that is bringing back results, is clearly wrong. You have clearly shown that in other more recent versions of the database it is working ok, therefore you have already proven that there is a bug in the version they are using.
    They are suspecting our view has a design flaw. We have in our documentation stated requirements for our software are the 9 or 10 version of oracle or sql server. So for me there are a couple of possibilities:
    -we try to reproduce the query on their database on the same oracle database version as they are using - problem is we don't have this exact same version and oracle does not have this version for download on their site anymore or so it seemsThat's because it's no longer supported. Any good software house will keep on top of it's customers to ensure they are upgraded in line with Oracle's ability to support. So, partially, it's your companies fault for saying you support version 9, when clearly you can't.
    --i ask other more knowledgable people(hopefully this forum) who might know about such problems which might result in a correction in the customer oracle database configuration or know of a bug in the customers version which causes this behaviour.You'll be lucky to find people still using such an old version (you're talking a version that almost 10 years out of date). The best you can do is to log onto Oracle Support and search there for known issues... and the answer on those is likely to be a recommendation to patch or upgrade too.
    -we change the queries to these views so they won't try to give back any records on their serverHow will you know unless you are able to test them?

  • Retrieve optimize: select * from tb where mdate sysdate

    hi,
    i wrote a simple statement :
    select * from tb where mdate > sysdate;
    it takes long time to return resultset.
    when i use to_char() function,
    select * from tb where to_char(mdate,'yyyy-mm-dd') >
    to_char(sysdate,'yyyy-mm-dd');
    it runs faster.
    who can tell me why?
    thanks.

    Are you running each statement multiple times and averaging the results? If you run the date comparison once, then run the character comparison, it's likely that the data you want is already cached, so the secod statement may well return more quickly. If you average multiple runs, you can avoid this.
    Justin

  • Select * from tbl where product like ('abc','def','rgh');

    Hi Guys,
    My requirement is I need to filter by providing date value with some of the porduct details and prod_id may differ with product like
    prod_id product date
    01 abc 01/2012
    02 abc 02/2012
    03 def 03/2012
    How can we put multiple text conditions using LIKE operator in where clause of the sql query.
    if we use union to combine all the sql queries, how can we filter by entering date value.
    SQL>select * from tbl where product like ('abc','def','rgh');
    Please provide any ideas on the same.
    Thanks in advance!
    -LK

    select * from tab1 where regexp_like(product,'^abc|def|rgh');

  • General veriable in (select * from cust where id in(:var))

    hi
    i deal with view object and i have this query
    SELECT * FROM customers
    WHERE customers.id IN (:val);
    but i want pass value for val =101,201,301
    how can i do it and what is the type of variable to input at the same time 1,2,3 and query filter ?
    thanks

    thank's for your replay
    i try make it string but do not success and i input the parameters from baking bean
    when i try with just one value like 101 that work
    but with "101,102" that do not work may be know like one variables
    its mean :val="101,102" and :val variable it is string type
    thank s

  • SELECT FROM tab WHERE co varname -PLEASE HELP

    Hi
    I am trying to use a select query where col1 > 3. Instead of 3 i HAVE to use a variable name . Im getting data type mismatch in criteria expression error when i use this code:
    String query ="SELECT * FROM MEMBERS WHERE M_ID > '" + myvar + "' ";
    Please note that i tried using myvar as a String, int and even as a long - all in vain - resulted in same error.
    What am i doing wrong in that piece of code please?
    THANKS LODES
    sabcarina

    ok thanks . like YOU said this worked:
    String query= "SELECT * FROM MEMBERS WHERE M_ID >" + myvar;
    So please i need to LEARN the need for single quotes in the SQL queries:
    What is it used for and why ? i mean i know it is for Strings but why do we need to enclose these varnames in single quotes?
    THANKS A MILLION
    sabcarina

  • SELECT * FROM TESTTABLE WHERE ID IN (?)

    Hi,
    I have a query (SELECT * FROM TESTTABLE WHERE ID IN (?)) and I want to pass in parameter a list of values (an array or something like that) to put in my condition IN.
    How can I do in java ? Is there something special in the PreparedStatement ? Or have I to use another statement ?
    Thanks

    Geoffrey,
    You can formulate the sql query in the java side, and IN clause demands the arguements separates by commas,
    So you can easily prepare that string by taking the values from the parameters and inserting into that String separated by commas.
    Its better to that that operation in the java part rather than in the procedure if you are only running this query in that Procedure.
    Thanks.
    Hi,
    I have a query (SELECT * FROM TESTTABLE WHERE ID IN (?)) and I want to pass in parameter a list of values (an array or something like that) to put in my condition IN.
    How can I do in java ? Is there something special in the PreparedStatement ? Or have I to use another statement ?
    Thanks

Maybe you are looking for

  • Call Transaction (BAPI) in ABAP Web Dynpro

    I'm developing a ABAP WD application which make use of a RFC BAPI. The BAPI will then use call transaction to perform certain operation on R3.  <b>CALL TRANSACTION 'IQS12' USING bdcdata MODE 'P'   MESSAGES INTO itab.</b> It works fine when I tested i

  • Why is page messed up in IE 7??

    I have a page at : http://www.serenityboise.com/staff.htm It looked fine in IE6, and other browsers, but in IE7, well, you can see what happened. I checked the W3 validator, and it only reported back issues with the menu system (which I already knew

  • [IDOC] Creating own IDOC

    Hey, playing with IDOCs, I would like to create an own one with customized structure. Found this thread: Creating own IDOC with segments In we31 I have to create a segment. - Do you uses segment names longer than 7 characters? I would not   communica

  • How to embedd video using adobe 9 pro, and making it compatible to earlier versions?

    Many companies lag in updating the latest version of adobe reader for their field employees. I am dealing with a company now that has field computer with version Adobe reader 6. Using adobe 9.3 Professional. How can I embed a video (video format - mp

  • EPub with Embedded Fonts Causes iBooks/Mac to Hang

    I have an ePub that I created with InDesign CC that I want to sell on the iBookstore. I've embedded the main font for the book, which is Adobe Caslon Pro. The text looks great in iBooks for Mac and iOS. However, in iBooks for Mac, if I click on the A