creation and selection in a dynamic table

Hello

IAM trying to dynamically create a table and selecting in it in plsql even block, but am getting error "table doesnot exist". However, if I simply dynamically create a table and then do a select on it separately it works...

Some examples of code for the same thing,

work
Line: -.


DECLARE
Loc VARCHAR2 (20): = 'bglr;
l_cnt pls_integer;

BEGIN
-create a table of employee information
IMMEDIATE EXECUTION
"CREATE TABLE". "emp_bglr" |
'(
EmpNo number 4 NOT NULL,
Ename VARCHAR2 (10),
use VARCHAR2 (9).
SAL NUMBER (7.2).
DEPTNO NUMBER (2)
)';

end;
/

Select count (*) in the emp_bglr... .works and return 0 rows
Line: -.


but when I include selects in plsql block... it throws the error 'The Table does not exist'... iam (running plsql block after a fall of the created table)

does not
Line: -.

DECLARE
Loc VARCHAR2 (20): = 'bglr;
l_cnt pls_integer;
BEGIN


-create a table of employee information
IMMEDIATE EXECUTION
"CREATE TABLE". "emp_bglr" |
'(
EmpNo number 4 NOT NULL,
Ename VARCHAR2 (10),
use VARCHAR2 (9).
SAL NUMBER (7.2).
DEPTNO NUMBER (2)
)';
-VALIDATION;

END;
Select count (*) in the emp_bglr l_cnt;
dbms_output.put_line ('cnt is' | l_cnt);
end;
/


Line: -.

Because your code is checked first for the existence of the syntax/object during the compilation and throws an error indicating that the table does not exist.

Try this:

SQL> ed
Wrote file afiedt.buf

  1   DECLARE
  2   loc VARCHAR2(20):='bglr';
  3   l_cnt pls_integer;
  4   BEGIN
  5   -- create an employee information table
  6   EXECUTE IMMEDIATE 'CREATE TABLE emp_bglr(
  7   empno NUMBER(4) NOT NULL,
  8   ename VARCHAR2(10),
  9   job VARCHAR2(9),
 10   sal NUMBER(7,2),
 11   deptno NUMBER(2)
 12   )';
 14  Select count(*) into l_cnt from all_objects where object_name = 'EMP_BGLR';
 15  dbms_output.put_line('tab cnt is '||l_cnt);
 16  IF (l_cnt = 1) THEN
 17  l_cnt := 0;
 18  EXECUTE IMMEDIATE 'SELECT count(*) from apps.emp_bglr' into l_cnt;
 19  dbms_output.put_line('data cnt is '||l_cnt);
 20  END IF;
 21* end;
SQL> /
tab cnt is 1
data cnt is 0

PL/SQL procedure successfully completed.

SQL> 

Published by: AP on August 5, 2010 05:51

Published by: AP on August 5, 2010 05:52

Tags: Database

Similar Questions

  • Update, and select from the same table

    Hello

    I have this selection - I've tested and work

    [code]

    Select
    case
    When DTF_REEW_201301.KTMO = 1 then DTF_REEW_201301.KTBT
    of other DTF_REEW_201301.KTBT - CTF_REEW_KUM_201301.KTBT
    end

    as KTBT_ISO,

    case
    When DTF_REEW_201301.KTMO = 1 then DTF_REEW_201301.KTZN
    of other DTF_REEW_201301.KTZN - CTF_REEW_KUM_201301.KTZN
    end

    as KTZN_ISO,

    case
    When DTF_REEW_201301.KTMO = 1 then DTF_REEW_201301.KTAB
    of other DTF_REEW_201301.KTAB - CTF_REEW_KUM_201301.KTAB

    end as KTAB_ISO,

    DTF_REEW_201301.brnrn,
    DTF_REEW_201301.ktat

    Of

    reewcore. CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq. DTF_REEW_201301 DTF_REEW_201301

    where

    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1).

    [/ code]

    With the result of KTBT_ISO, KTZN_ISO and KTAB_ISO I want to update the table 'reewdq. DTF_REEW_201301' - and this picture is in the select statement.

    I think I've tried every update statement - but no update does not work.

    I need something like this:

    [code]

    Update reewdq. DTF_REEW_201301 set t1 t1. KTBT_ISO =

    (

    Select
    case
    When DTF_REEW_201301.KTMO = 1 then DTF_REEW_201301.KTBT
    of other DTF_REEW_201301.KTBT - CTF_REEW_KUM_201301.KTBT
    end
    as KTBT_ISO

    Of

    reewcore. CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq. DTF_REEW_201301 DTF_REEW_201301

    where

    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1).

    ),

    T1. KTZN_ISO =

    (

    Select

    case
    When DTF_REEW_201301.KTMO = 1 then DTF_REEW_201301.KTZN
    of other DTF_REEW_201301.KTZN - CTF_REEW_KUM_201301.KTZN
    end
    as KTZN_ISO

    Of

    reewcore. CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq. DTF_REEW_201301 DTF_REEW_201301

    where

    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1).

    ),

    T1. KTAB_ISO =

    (

    Select
    case
    When DTF_REEW_201301.KTMO = 1 then DTF_REEW_201301.KTAB
    of other DTF_REEW_201301.KTAB - CTF_REEW_KUM_201301.KTAB
    end as KTAB_ISO

    Of

    reewcore. CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq. DTF_REEW_201301 DTF_REEW_201301

    where

    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1).

    )

    [/ code]

    But this isn´t of the labour code. Someone an idea please? Can someone help me please.

    Best regards

    Heidi

    Use MERGE:

    Fusion

    in reewdq. DTF_REEW_201301 t1

    a_l'_aide_de)

    Select the case sensitive option

    When DTF_REEW_201301.KTMO = 1 then DTF_REEW_201301.KTBT

    of other DTF_REEW_201301.KTBT - CTF_REEW_KUM_201301.KTBT

    end as KTBT_ISO,

    case

    When DTF_REEW_201301.KTMO = 1 then DTF_REEW_201301.KTZN

    of other DTF_REEW_201301.KTZN - CTF_REEW_KUM_201301.KTZN

    end as KTZN_ISO,

    case

    When DTF_REEW_201301.KTMO = 1 then DTF_REEW_201301.KTAB

    of other DTF_REEW_201301.KTAB - CTF_REEW_KUM_201301.KTAB

    end as KTAB_ISO,

    reewdq. ROWID that RID

    of reewcore. CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,

    reewdq. DTF_REEW_201301 DTF_REEW_201301

    where DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN

    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT

    and CTF_REEW_KUM_201301.KTMO = DTF_REEW_201301.KTMO - 1

    ) t2

    on)

    T1. ROWID = t2.rid

    )

    When Fachhochschule

    then

    Update

    the t1 value. KTBT_ISO = t2. KTBT_ISO,

    T1. KTZN_ISO = t2. KTZN_ISO,

    T1. KTAB_ISO = t2. KTAB_ISO

    /

    SY.

  • Creation and After Effects CS4 Dynamic Link 'glitches '.

    I'm more able to use dynamic links when I try to link to several first AE compositions.

    What happens is, during playback of the sequence in the first, there are random images in the clip of dynamic links that are out of use. For example if I have two compositions, A and B, every second and they are in my creation project, playback can do something crazy like this:

    Should be (frames):

    AAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBB

    Really:

    AAABAAAAAAAAAABBAAAAAAAABBABABABABBBBBBBBBBBBBBB

    I don't know if there is any pattern to it, but dynamic links just doesn't work. I thought that this could be a problem of preview, so I tried making it and I had the same incorrect sequence as the preview. I tried things like removing and adding the compositions once again, or remove the media cache, but it still randomly rises.

    My only option is to export in AE (and when you have not compressed who can use a lot of disk space).

    Any ideas on how to solve this problem? Or dynamic link is just a broken feature?

    Make sure that there are no figures in the composition of the AE project name names.  If you need a number, it comes out (comp_one, comp_two, etc.)

  • I have a problem with a CS6 dynamic table creation

    I have 2 tables, 1 of them is caled 'user', the other a "cars" they are inked with a foreign key in the table of cars there is a column called UserID and takes the value of "user", so my question is I tried to make it dynamic table when the user is connected to display its cars that have his Userid on them only unfortunetly when I do this I get a blank table with nothing in it anyone can help me solve this problem. This is the code I use:

    <? php require_once('Connections/MyConnection.php');? >

    <? PHP

    initialize the session

    If (! isset {})

    session_start();

    }

    * Log out the current user. **

    $logoutAction = $_SERVER ['PHP_SELF']. » ? doLogout = true;

    If ((isset & & ($_SERVER ['QUERY_STRING']! = "")) {})

    $logoutAction. = '& '. htmlentities($_SERVER['QUERY_STRING']);

    }

    {If ((isset($_GET['doLogout'])) & & ($ {_GET ['doLogout'] == "true"))}

    to completely disconnect a visitor, you must delete the session varialbles

    $_SESSION ['MM_Username'] = NULL;

    $_SESSION ['MM_UserGroup'] = NULL;

    $_SESSION ['PrevUrl'] = NULL;

    unset($_SESSION['MM_Username']);

    unset($_SESSION['MM_UserGroup']);

    unset($_SESSION['PrevUrl']);

    $logoutGoTo = "/ cars/LogOut.php";

    If {($logoutGoTo)

    Header ("Location: $logoutGoTo");

    "exit";

    }

    }

    ? >

    <? PHP

    If (! isset {})

    session_start();

    }

    $MM_authorizedUsers = '1', 2;

    $MM_donotCheckaccess = "false";

    Restrict access to Page: grant or deny access to this page

    Function isAuthorized ($strUsers, $UserGroup, $strGroups, $UserName) {}

    For safety, first assuming that the visitor is NOT allowed.

    $isValid = false;

    When a visitor is connected to this site, the MM_Username of Session variable value equal to their username.

    So, we know that a user is NOT logged if this Session variable is empty.

    If (! empty ($UserName)) {}

    In addition to being connected, you can restrict access to only certain users based on a created ID when they connect.

    Analyze the channels in the tables.

    $arrUsers = explode (",", $strUsers);

    $arrGroups = explode (",", $strGroups);

    If (in_array ($UserName, $arrUsers)) {}

    $isValid = true;

    }

    Or, you can restrict access to only certain users based on their user name.

    If (in_array ($UserGroup, $arrGroups)) {}

    $isValid = true;

    }

    If (($strUsers == "") & & false) {}

    $isValid = true;

    }

    }

    return $isValid;

    }

    $MM_restrictGoTo = "/ cars/Home.php";

    If (!) {(((isset($_SESSION['MM_Username']))) & & (isAuthorized ("", $MM_authorizedUsers, $_SESSION ['MM_Username'], {$_SESSION ['MM_UserGroup']})))}

    $MM_qsChar = ';?

    $MM_referrer = $_SERVER ['PHP_SELF'];

    If (strpos ($MM_restrictGoTo, "?")) $MM_qsChar = "&";

    If (isset($_SERVER['QUERY_STRING']) & & strlen($_SERVER['QUERY_STRING']) > 0)

    $MM_referrer. = « ? ». $_SERVER ['QUERY_STRING'];

    $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar. "accesscheck =". UrlEncode ($MM_referrer);

    Header ("Location:".) $MM_restrictGoTo);

    "exit";

    }

    ? >

    <? PHP

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via 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 "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via 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 "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    $maxRows_cars = 10;

    $pageNum_cars = 0;

    If (isset($_GET['pageNum_cars'])) {}

    $pageNum_cars = $_GET ['pageNum_cars'];

    }

    $startRow_cars = $pageNum_cars * $maxRows_cars;

    $colname_cars = "-1";

    If (isset($_SESSION['MM_Username'])) {}

    $colname_cars = $_SESSION ['MM_Username"];

    }

    @mysql_select_db ($database_MyConnection, $MyConnection);

    $query_cars = sprintf ("" SELECT * FROM cars WHERE UserID = %s ", GetSQLValueString ($colname_cars,"int")");

    $query_limit_cars = sprintf ("%s LIMIT %d, %d", $query_cars, $startRow_cars, $maxRows_cars);

    $cars = mysql_query ($query_limit_cars, $MyConnection) or die (mysql_error ());

    $row_cars = mysql_fetch_assoc ($cars);

    If (isset($_GET['totalRows_cars'])) {}

    $totalRows_cars = $_GET ['totalRows_cars'];

    } else {}

    $all_cars = mysql_query ($query_cars);

    $totalRows_cars = mysql_num_rows ($all_cars);

    }

    $totalPages_cars = ceil($totalRows_cars/$maxRows_cars)-1;

    $colname_user = "-1";

    If (isset($_SESSION['MM_Username'])) {}

    $colname_user = $_SESSION ['MM_Username"];

    }

    @mysql_select_db ($database_MyConnection, $MyConnection);

    $query_user = sprintf ("SELECT * FROM 'user' WHERE Email = %s", GetSQLValueString ($colname_user, "text") ");

    $user = mysql_query ($query_user, $MyConnection) or die (mysql_error ());

    $row_user = mysql_fetch_assoc ($user);

    $totalRows_user = mysql_num_rows ($user);

    $colname_user = "-1";

    If (isset($_SESSION['MM_Username'])) {}

    $colname_user = $_SESSION ['MM_Username"];

    }

    @mysql_select_db ($database_MyConnection, $MyConnection);

    $query_user = sprintf ("SELECT FirstName, LastName FROM 'user' WHERE Email = %s", GetSQLValueString ($colname_user, "text") ");

    $user = mysql_query ($query_user, $MyConnection) or die (mysql_error ());

    $row_user = mysql_fetch_assoc ($user);

    $colname_User = "-1";

    If (isset($_SESSION['MM_Username'])) {}

    $colname_User = $_SESSION ['MM_Username"];

    }

    @mysql_select_db ($database_MyConnection, $MyConnection);

    $query_User = sprintf ("SELECT * FROM 'user' WHERE Email = %s", GetSQLValueString ($colname_User, "text") ");

    $User = mysql_query ($query_User, $MyConnection) or die (mysql_error ());

    $row_User = mysql_fetch_assoc ($User);

    $colname_User = "-1";

    If (isset($_GET['MM_Username'])) {}

    $colname_User = $_GET ['MM_Username"];

    }

    @mysql_select_db ($database_MyConnection, $MyConnection);

    $query_User = sprintf ("SELECT * FROM 'user' WHERE Email = %s", GetSQLValueString ($colname_User, "text") ");

    $User = mysql_query ($query_User, $MyConnection) or die (mysql_error ());

    $row_User = mysql_fetch_assoc ($User);

    $colname_User = "-1";

    If (isset($_SESSION['MM_Username'])) {}

    $colname_User = $_SESSION ['MM_Username"];

    }

    @mysql_select_db ($database_MyConnection, $MyConnection);

    $query_User = sprintf ("SELECT * FROM 'user' WHERE Email = %s", GetSQLValueString ($colname_User, "text") ");

    $User = mysql_query ($query_User, $MyConnection) or die (mysql_error ());

    $row_User = mysql_fetch_assoc ($User);

    $colname_User = "-1";

    If (isset($_SESSION['MM_Username'])) {}

    $colname_User = $_SESSION ['MM_Username"];

    }

    @mysql_select_db ($database_MyConnection, $MyConnection);

    $query_User = sprintf ("SELECT * FROM 'user' WHERE UserID = %s", GetSQLValueString ($colname_User, "int") ");

    $User = mysql_query ($query_User, $MyConnection) or die (mysql_error ());

    $row_User = mysql_fetch_assoc ($User);

    ? >

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""

    " < html xmlns =" http://www.w3.org/1999/xhtml ">

    < head >

    < link href = "CSS/Layout.css" rel = "stylesheet" type = "text/css" / > "

    < link href = "CSS/Menu.css" rel = "stylesheet" type = "text/css" / > "

    "< link href="/Cars/CSS/VerticalMenu.css "rel ="stylesheet"type =" text/css"/ >

    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

    < title > Untitled Document < /title >

    < / head >

    < body >

    < div id = 'Holder' >

    < div id = "Header" >

    < div id = "HeaderContentRight" >

    < table width = "0" border = "0" align = "right" >

    < b >

    < td > logged in as: <? PHP echo $row_user ["FirstName"];? > <? PHP echo $row_user ['name'];? > < table >

    < td > < a href = "<?" PHP echo $logoutAction? > "> sign out < /a > < table >"

    < /tr >

    < /table >

    < / div >

    < / div >

    < div id = "NavBar" >

    < nav >

    < ul >

    "< li > < a href="/Cars/HomeAccount.php "> home < /a > < /li >

    < /ul >

    < / nav >

    < / div >

    < div id = "Content" >

    < div id = "PageHeading" >

    Welcome < h1 >, <? PHP echo $row_user ["FirstName"];? > <? PHP echo $row_user ['name'];? >! < / h1 >

    < / div >

    < div id = "ContentLeft" >

    Control Panel < h6 > < / h6 >

    < p > < / p >

    < ul id = "MyMainMenu" >

    < li > < a href="/Cars/Account.php" > account < /a > < /li > ".

    < li > < a href="/Cars/UpdateAccount.php" > update account < /a > < /li > ".

    < li > < a href="/Cars/CarManagment.php" > car management < /a > < /li > ".

    < /ul >

    < / div >

    < div id = "ContentRight" >

    < table border = "1" align = "center" >

    < b >

    CarBrand < td > < table >

    CarModel < td > < table >

    YearOfProduction < td > < table >

    < /tr >

    <? PHP {? >}

    < b >

    < td > <? PHP echo $row_cars ["CarBrand'];? > < table >

    < td > <? PHP echo $row_cars ["CarModel'];? > < table >

    < td > <? PHP echo $row_cars ["YearOfProduction"];? > < table >

    < /tr >

    <? PHP} while ($row_cars = mysql_fetch_assoc ($cars));? >

    < /table >

    < / div >

    < / div >

    < div id = "Footer" > < / div >

    < / div >

    < / body >

    < / html >

    <? PHP

    mysql_free_result ($CARS);

    mysql_free_result ($User);

    ? >

    Thank you for your time!

    Nowhere on this page I see that you have found the "UserID" variable that is used to query the database of cars everywhere.

    You must get that table "user" when a successful connection occurred.

    Go to your login page and find the code which queries the database (it will look something like the below, your request will be slightly different)

    $LoginRS__query = sprintf ("SELECT username, password loginUsers WHERE username = %s AND password is %s",

    MAKE SURE YOU add to THE QUERY "UserID" (see below.) This is the column of your 'user' table and the foreign key record unique identifier in your table 'cars')

    $LoginRS__query = sprintf ("SELECT UserID, username, password AND password loginUsers WHERE username = %s is %s",

    Then, find the lines of code below:

    $LoginRS = mysql_query ($LoginRS__query, $MyConnection) or die (mysql_error ());

    $loginFoundUser = mysql_num_rows ($LoginRS);

    Include these two lines of code directly after the above code:

    $row = mysql_fetch_assoc ($LoginRS);

    $UserID = $row ['UserID']

    Can find these lines of code:

    If {($loginFoundUser)

    $loginStrGroup = "";

    Declare two session variables and assign them

    $_SESSION ['MM_Username"] = $loginUsername;

    $_SESSION ["MM_UserGroup"] = $loginStrGroup;

    Add this line of code directly after the above code:

    $_SESSION ['username'] = $UserID;

    Now, go to the login page of success (whatever you call that)

    Find the code at the top of the page below:

    If (! isset {})

    session_start();

    }

    Add the line of code below:

    If (! isset {})

    session_start();

    $userID = $_SESSION ['username'];

    }

    Look for the query:

    @mysql_select_db ($database_MyConnection, $MyConnection);

    $query_cars = sprintf ("" SELECT * FROM cars WHERE UserID = %s ", GetSQLValueString ($colname_cars,"int")");

    $query_limit_cars = sprintf ("%s LIMIT %d, %d", $query_cars, $startRow_cars, $maxRows_cars);

    $cars = mysql_query ($query_limit_cars, $MyConnection) or die (mysql_error ());

    $row_cars = mysql_fetch_assoc ($cars);

    and replace with:

    @mysql_select_db ($database_MyConnection, $MyConnection);

    $query_query_cars = "SELECT * FROM cars WHERE userID ="$userID "";

    $query_cars = mysql_query ($query_query_cars, $MyConnection) or die (mysql_error ());

    $row_query_cars = mysql_fetch_assoc ($query_cars);

    $totalRows_query_cars = mysql_num_rows ($query_cars);

    Now, you can pass the details of the car associated with the user ID in the 'user' table and a foreign key in the table "cars."

    You probably want to use a / while loop to get all the information from the database. With a DW repeat region behavior.

  • ADF Table and select one choice

    Hai everybody, please help.

    I have a page that contains the table and select a choice where the table record displays the current month and the choice of a select contain only months. When I select the month from the list, save the table will change based on the months that I have chosen. I have really no idea on how to perform this task.

    123.png

    With the help of jdev version 11.1.1.7.0

    Thanks for your help.

    El

    Try to follow the following:

    1 - in the ViewObject (to which redirect the table) define the bind variable, this variable binding will filter the query (for example variable binding name is selectedMonth).

    2 - from the page, select the selectOneChoice and of the Inspector properties set value change listener method in backbean and autoSubmit = true.

    
       .
       .
    
    

    Method of earphone 3 months value change will be:

      public void monthValueChangeListener(ValueChangeEvent valueChangeEvent)
      {
        BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
        DCIteratorBinding iter = (DCIteratorBinding) bindings.get("TableIteratorName");//you can get iterator name from pageDef.
        ViewObject vo = iter.getViewObject();
        vo.setNamedWhereClauseParam("selectedMonth", valueChangeEvent.getNewValue());
        vo.executeQuery();
      }
    

    3. set table by selectOneChoice id partialTrigger

    
        .
        .
        .
    
    
  • Is it possible to create a shuttle component in Oracle ADF, where the available and selected lists are tables of the adf?

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    Is it possible to create a shuttle component in Oracle ADF, where the available and selected lists are tables of the adf?



    I did a POC sample on it. I can share with you. I can't put in my dropbox because dropbox is blocked in my network. Share your email. I'll send the POC through

  • Ask about the creation and filling I$ table on different condition

    Hello
    I have a question about the creation and filling I$ table on a different condition. In which condition the I$ table creation? And these conditions are given below:

    (1) * source and transit area * are on the same server (that is to say target is located on another server)
    (2) * gathering and target area * are on the same server (IE source is on another server)
    (3) * source, transit area and target * are * different 3 * Server
    Source 4), area transit and target are on the same server
    Thank you

    I'm not quite clear to your question. Always try my best to erase it.

    In your all over requirement I$ table will be created.
    If the same staging as target (a database, a user) then all temporary tables are created in this user
    If the scaffolding is different from the target (a database, two users (A, B)), then all temporary tables will be created under that user A (lets consider) and the data will be inserted into the target table that is present to user B

    Staging is different from the target (two database, two users (A1, A2), architecture not recommended) if all temporary tables will be created under that user A1 (A1 of the databases) and the data will be inserted into the target table which is present in user A2 (A2 data base)

    If the source, staging, the target will be under a database then no. LKM is required, IKM is sufficient to load the data into the target. Especially for this, you can see an example given by Craig.
    http://S3.amazonaws.com/ora/ODI-Simple_SELECT_and_INSERT-interface.swf

    Thank you.

  • Insert using the table with the clause and select?

    Hello gurus,

    Can I insert in a table by making use of clause and select?

    something similar to this...
         insert into test_table
          (with abc as 
              (select * from emp_tble
               where dept_no = 10
               )
             select * from abc;
       );          
    
         if not i would i do by making use of  with clause & select ... any example would be great !!
    
    
      
    Thank you very much!!!

    Brackets are disturbing only:

    SQL> insert into test_table
       (with t as (select * from emp) select * from t)
    /
    Error at line 12
    ORA-32034: unsupported use of WITH clause
    
    SQL> insert into test_table
      with t as (select * from emp) select * from t
    /
    14 rows created.
    
  • Privilege for the creation and deletion of the indexes on all the tables/diagrams

    Hello

    I have a database running on the HPUnix bit ia64 platform. The version of the db is 10.2.0.3
    I have a schema named DPYBATCH.

    I need grant creation/deleting indexes on all the tables/diagrams.
    I know create a clue will solve the purpose of the creation. But I am confused with deleting indexes.

    If I give-> GRANT CREATE ANY INDEX OF DPYBATCH, it will not solve the purpose. He will have the privilege to be able to delete/move the index as well?
    If this is not the case, what is the privilege to grant to delete/move the index. Please let me know!

    Thank you!

    You must use DROP ALL INDEX: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_8015.htm#i2066885.

  • AF:dynamic table Concept

    Scenario is,

    Supply.png

    The Image above is of form 6i, which I am to convert ADF file.

    You can see above, there are two attributes of no and no contract Plan, both are LOVs. they are cascade LOVs. Plan of LOV values depends on the value of selected LOV contract. A single contract can have multiple Plans. and a plan can have many more details.

    When the user select A contract North, then Plan No. After this detail table fills with data of this Plan. as I said a contract can have a lot of Plans, when the user returned to Plan LOV and select other lines of this plan a plan then detail fills too, but this does not remove the previous lines of populated areas. This means selecting a plan add up rows in detail.

    How can I accomplish this? Is dynamic table suitable?

    Ashish Awasthi

    J Dev Version: 11.1.2.4

    Are saying you that you need to recover a table based on the selection of data Plan and have the data be inserted into another table when recording?

    If Yes, you can view the lines feature the EO according to VO. Once you select a Plan, run the readonly VO and insert lines in the EO based VO dynamically.

  • Select the schema dynamically

    Hello

    I would like to query a table of each scheme, same table exists in more than 20 patterns. So I dynamically select the schema and the result, the coil, but below

    statement is not to fetch all the records, can someone help me please?

    [code]

    Spoo result.txt

    Set serveroutput on

    declare

    cursor c1 is select master, table_name from all_tables where table_name = 'ALLOCATE_TBL '.

    order by owner, table_name;

    Start

    for rec in c1

    loop

    run immediately "select ALLOCATE_TYPE, ALLOCATE_SUBTYPE from". Rec.Owner |'. ' | Rec.table_name;

    end loop;

    end;

    /

    Spoo off

    [/ code]

    Hello

    Whenever you make dynamic SQL code, put all the dynamic instruction in a string variable and displays this string until run you it.  In this way, you can see exactly what it's done, and, if that fails, have a better idea why.  You can comment or remove the statement display under test is finished.  That's what I was doing in the code I posted before:

    -dbms_output.put_line (single_table_select |) "= single_table_select"); -for debugging

    I don't know what you're trying to do here, so I can't tell you how to do it.  This would help a lot if you could post instructions INSERT, CREATE TABLE and or something equivalent, and the desired output.  For example, "if I have the standard emp table in the scott schema, and I also have a table of emp 3 rows in my own scheme, like this."

    CREATE TABLE emp

    AS

    SELECT eanme. "JR" AS ename

    empno

    FROM scott.emp

    WHERE deptno = 10 - only 3 rows

    ;

    then the output should be... »

    You try to put the name of the owner of the table result set?

    How would you do that if you could hard-code the owner (SCOTT) and the name of the table (ALLOCATE_TBL')?  You would do something like that?

    SELECT 'SCOTT' as owner

    allocate_type

    allocate_subtype

    SCOTT. ALLOCATE_TBL

    ;

    ?  If you want to replace the parts in red with a dynamic text, you can concatenate variables instead of hardcoded text.  You already do that correctly for SCOTT and ALLOCATE_TBL on the last line; you just need to do the same thing for SCOTT on the first line.  And don't forget, when you want to have a sungle quote inside a string literal, use 2 single quotation mark in a row.  Maybe you want to do something like this:

    insert_statement: = "INSERT INTO coll_test (owner, allocate_type, allocate_subtype).

    || ' SELECT DISTINCT "'

    || Rec.Owner

    || ""', allocate_type, allocate_subtype FROM ".

    || Rec.Owner

    || '.'

    || Rec.table_name;

    Never answer my question

    ... Why do you have these similar tables in several patterns?   The fact that you need to interview all the ALLOCATE_TBLs at the same time suggests that logically they are all part of the same table.  Why not physically stored in the same table?

    All you want to do, I suspect that you are making it harder than it needs to be,

  • Data does not save in the dynamic table

    My form has been active player and all the information can be recorded with the exception of the data entered by the user in the dynamic table.

    Should I change the binding of data?

    https://Acrobat.com/#d=SWkT2mrJBJbxk * QJGmN0Ng

    Appreciate any help!

    Tracy

    Hello

    OK, I found the root of all evil.

    To resolve this problem, you need to replace the script that caculates the dates in the dynamic table by another.

    Go to table calculate a remove the event script.

    Then, select the Date field in the first row of the table and add this script to its change event.

    var StartDate = $event.newText
    var DateFormat = "MM/DD/YY"
    
    if (StartDate ne $event.prevText) then
              var selectedDate = Date2Num(StartDate, DateFormat)
                var selectedDay = Num2Date(selectedDate, "DD")
              var selectedMonth = Num2Date(selectedDate, "MM")
              var selectedYear = Num2Date(selectedDate, "YY")
              var firstDay = Date2Num(Concat(selectedMonth, "/", "01/", selectedYear), DateFormat)
              var lastDay = 0
              var dayNumber = firstDay
    
              $event.change = Num2Date(firstDay, DateFormat)
    
              for i = 0 upto 30 step 1 do
                        if (Num2Date(firstDay, "MM") eq Num2Date(dayNumber, "MM")) then
                                  dayNumber = dayNumber + 1
                                  lastDay = dayNumber
                                  Table._Row.addInstance(1)
                                  Table.Row[i].Date = Num2Date(dayNumber - 1, DateFormat)
                                  Table.Row[i].Day = Num2Date(dayNumber - 1, "EEE")
                        endif
              endfor
              Table._Row.removeInstance(Table._Row.count - 1)
    endif
    

    https://Acrobat.com/#d=qEVfk * AbNz5qfmJqF * BovA

  • Dynamic table returns only a line

    Hello world

    I try to use a Recordset:

    "SOME concerts. EventDate, concerts. Location, concerts. Notes

    CONCERTS

    WHERE the concerts. "EventDate > = CURRENT_DATE.

    When I test the Recordset, I get 3 of the 5 records returned, which is exactly as it should.

    However, when I try to create a dynamic table to display the results - if I choose to show all records, or the default of 10 at a time, it shows the first line results from the Recordset.

    When I try to create a master-detail table and ask him to show one record at a time, it's there for that, but using the next/back navigation links, it takes me to other records, though one at a time.  That tells me that he doesn't know that there should be three records, but it only shows one.

    What am I doing wrong with the dynamic table, here?

    Thank you!

    I suggest that you start the page completely from scratch, because it seems that you made the rookie mistake classic to remove a dynamic object in Design view without realizing that any other PHP code is connected with it. When you work with dynamic objects, keep an eye on what is listed in the server behaviors panel. To remove a server behavior, select the referencing in the Panel and click the button "-" to remove it properly.

    In fact, you have two sets of records on the same page, that do the same thing. One is called to come, the other is called UpcomingShows. You get only a line showing in your table is because you use the recordset "to come". The Dreamweaver recordset code automatically retrieves the first record and then uses a do... while loop to create the region repeated in the table. What has happened is that your changes to the page have resulted in this line who appear before the repeat region:

    mysql_free_result($upcoming);
    

    This destroys the rest of the result of database before using it again. Therefore, only trace never appears.

    Dreamweaver always puts mysql_free_result() after the closing tag. Thus, it seems that your changes caused Dreamweaver to lose track of all the relevant parts of the server behavior. If you move this line to the bottom of the page, your table should work. However, as I said before, I think that it is better to start from scratch.

    One last thing: your SQL query contains the following WHERE clause:

    WHERE gigs.EventDate >= CURRENT_DATE
    

    It is an incorrect syntax for MySQL. It should be like this:

    WHERE gigs.EventDate >= CURRENT_DATE()
    

    CURRENT_DATE() is a MySQL function, not a constant.

    If all goes well, a little less head banging.

  • Select for a partitioned table, it will work with &gt; sign?

    Hello
    I partitioned table and select for that:
    ...
    PARTITION BY RANGE  ( "INDATE"  )
      (   PARTITION "PRT_20091201" VALUES LESS THAN (TO_DATE(' 2009-12-02 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')...
    ....
       SELECT COLUMN_LIST FROM TABLE1   WHERE
               ( indate >= to_date(t_indate || t_timefrom, 'mm/dd/yyyy HH24:MI:SS'))                       AND
               ( indate <= to_date(t_indate || t_timeto,   'mm/dd/yyyy HH24:MI:SS'))                        AND... 
    so by selecting all of the Info for the given date specified inside time, and I use > = condition on the column partitioned, do you think that it will work correctly learn directly to the single partition or Oralce requires me to put strictly = sign for this column and then additioanly I can probably choose time, something like:
    SELECT COLUMN_LIST FROM TABLE1   WHERE
              ( indate = to_date(t_indate , 'mm/dd/yyyy'))                        AND
                   ( trim_to_time(indate) >= to_char(t_timefrom, ' HH24:MI:SS'))              AND
                   ( trim_to_time(indate) <= to_char( t_timeto,   ' HH24:MI:SS'))              AND... 
    All TX
    TR

    Trento wrote:
    Thanks to all the guys,
    Always learn to follow the plan. I can't use SELECT FROM TABLE of PARTITION (P - NAME) because of dynamic political anti on our site.

    Not a bad policy as dynamic sql is a blade against double edge that can cut you, and the problem with its employees.

    But do not use the option of PARTITION in a dynamic query - use manually in a one-time ad hoc when query data. Decide what partition to get the data is done automatically and is what is the process for

  • Select display after alter table

    Hello
    Why ' select * view "is not display recent columns added by alter table command." Even display columns and the data from the table only. What is the oracle of mechanism used here?

    Thank you

    Vermorel

    When you create a view, you create a static 'snapshot' of the columns of the table. Adding columns in the underlying table will not change the definition of the view. Using a "select *...» "according to the definition simply indicates the database to create the view with all the columns that appear in the table at this moment in time. He does not mean "dynamically change the display when the table is changed," which would negate the whole point of views.

    E.g.:

    SQL> create table t1 (col1 number,
      2                   col2 number);
    
    Table created.
    
    SQL> create view v1 as select * from t1;
    
    View created.
    
    SQL> desc t1
     Name
     --------------------------------------------------------
     COL1
     COL2                                                           
    
    SQL> desc v1
     Name
     --------------------------------------------------------
     COL1
     COL2                                                           
    
    SQL> alter table t1 add (col3 number);
    
    Table altered.
    
    SQL> desc t1
     Name
     --------------------------------------------------------
     COL1
     COL2
     COL3                                                           
    
    SQL> desc v1
     Name
     --------------------------------------------------------
     COL1
     COL2                                                           
    
    SQL> create or replace view v1 as select * from t1;
    
    View created.
    
    SQL> desc v1
     Name
     --------------------------------------------------------
     COL1
     COL2
     COL3                                                           
    

Maybe you are looking for