help required on where in APEX SQL command
Hi all!Someone knows how to use a url as a variable with the command reference WHERE?
I have this url: http://10.10.10.2/apex/f?p=116:20:6597653175650651:NO:P20_TEST_N3:1 and I would like to have the: 1 or all the rest (depending on the user's selection) at the end of the url as a variable of the order WHERE in the P20_TEST_N3 of my application page.
Thanks in advance for your answer!
Hello
Is it possible that you create a sample to apex.oracle.com so I can see?
Kind regards
Jari
Tags: Database
Similar Questions
-
ETG assess "in order to" in the APEX SQL command window?
I need to recreate my table in order to change the order of the columns. When I use the SQL command window and run the SQL, it runs successfully, creates the table, but is not rearrange the columns.
This is expected behavior?
user648567 wrote:
Please update your forum profile with a real handle instead of 'user648567 '.
I need to recreate my table in order to change the order of the columns. When I use the SQL command window and run the SQL, it runs successfully, creates the table, but is not rearrange the columns.
What do you mean by "in order to"?
A clause using "ORDER BY" in a DEC (in SUMMIT or other anywhare) has no effect on the order of the columns , which is determined by the order in which the columns appear in the projection. It will affect the order in which the rows are returned from this query, and it will not determine the order in which lines will be returned by querying the new table in the future.
To change the order of columns, the columns in the SELECT of the ETG clause must be in a different order than the original table,
-
Can someone help me - error:-not correctly completed SQL command
Hello
This code has an error, I tried to find this error but I don't find it so please help me: -.
error report:
ORA-06550: line 1, column 149:
PL/SQL: ORA-00933: SQL not correctly completed command
ORA-06550: line 1, column 7:
PL/SQL: SQL statement ignored
Code
Select HTMLDB_ITEM. HIDDEN(1,SEQ_ID),
HTMLDB_ITEM. C001 Text(2,a.C001).
HTMLDB_ITEM. C002 Text(3,a.C002).
HTMLDB_ITEM. C003 Text(4,a.C003).
APEX_ITEM. SELECT_LIST_FROM_QUERY (5, a.c004, 'SELECT D P_ID, P_ID R OF PARTY_DETAIL') c004.
APEX_ITEM. SELECT_LIST_FROM_QUERY
(6, a.c005,)
' SELECT CATEGARY_NAME D, ' |' CATEGARY_NAME ITEM_CATEGARY R'.
"style =" width: 220px "'"
||' OnChange = "get_select_list_xml1 (this, e
|| 'f7_ '.
|| LPAD (seq_id, 4, '0')
|| ')"',
'' YES. ''
'0',
"- Select -",
« f6_ » || LPAD (seq_id, 4, '0'),
NULL,
'NO') c005
APEX_ITEM. SELECT_LIST_FROM_QUERY
(7, a.c006,)
"SELECT ITEM_CODE D.
||' ITEM_CODE ITEM_MASTER R'
||' WHERE CATEGARY_NAME ='
|| C005,
"style =" width: 220px "',"
'' YES. ''
'0',
"- Select Code (')"
|| (Select Count (*)
of ITEM_MASTER
where CATEGARY_NAME = c005)
|| ')-',
« f7_ » || LPAD (seq_id, 4, '0'),
NULL,
'NO') c006
APEX_ITEM. SELECT_LIST_FROM_QUERY (8, a.c007, 'SELECT nom_element, nom_element R OF ITEM_MASTER D') c007,.
HTMLDB_ITEM. C008 Text(9,a.C008).
APEX_ITEM. SELECT_LIST_FROM_QUERY (10, a.c009, 'SELECT PACK_TYPE D, PACK_TYPE R OF ITEM_PACKING') c009,.
HTMLDB_ITEM. Text(11,a.C010) c010.
HTMLDB_ITEM. Text(12,a.C011) c011.
HTMLDB_ITEM. C012 Text(13,a.C012).
HTMLDB_ITEM. C013 Text(14,a.C013)
OF wwv_flow_collections one
where a.collection_name = 'REC_ITEM. '
Thank you
Maury
Published by: Ed on September 10, 2009 03:36Can you copy and paste this code into SQL * more and see if it runs properly? You can check your single quote (') and double quote characters ("") to make sure that those who at the height correctly because it is difficult to say when copied on the web.
-
Apex - dbms_job.submit (Oracle) in SQL commands
I have connected to oracle apex (version 4.2.5.00.08) at the URL https://apex.oracle.com/pls/apex/f?p=4550:1:0:
I am trying to execute the procedure of dbms_job.submit through SQL Workshop-> SQL commands)
The code is as shown below
*************************************************************************************************************************
declare
-jobno number;
jobno varchar2 (20);
Start
dbms_job. Submit (work = >: jobno,)
This = > ' START
emp_pack.remove_dept (16);
END;',
next_date = > trunc (sysdate + 1).
interval = > 'trunc(sysdate+1) '.
);
-dbms_output.put_line ('Job No. :'||: jobno);
commit;
dbms_output.put_line ('Job No. :'|| is jobno);
end;
*************************************************************************************************************************
The procedure of package I'm talking in the parameter 'WHAT' is defined as shown below
create or replace package emp_pack is
process remove_emp()emp_id in NUMBER)
process remove_dept()dept_id in NUMBER)
end emp_pack ;
create or replace package body emp_pack
is
process remove_emp()emp_id in NUMBER( )
is
begin
delete from EMP
where EMP .EmpNo = emp_id ;
end remove_emp;
process remove_dept()dept_id in NUMBER( )
is
begin
delete from dept
where Dept .DeptNo = dept_id ;
end remove_dept
end emp_pack ;
*************************************************************************************************************************
while trying to run the piece of code (I'm passing avlaue from 35 to the jobno to the RUN time parameter) is the error I get
ORA-06502: PL/SQL: digital or value error: character string buffer too small
I tried to know everything, I have, but have not been able to determine what is causing the error. Help, please
Super weird... I just ran the following on apex.oracle.com and got "1 row (s) deleted', not 'treated statement."
declare l_job int; begin /* dbms_job.submit( l_job, 'begin delete from emp; end;' ); */ rollback; end;
-
Hi all
Can anyone help me please with the sql command.
Here is the example of the table:-
Please note that there is % of the letter ' to some account numbers.Table:- EMP *EMP_ID ACCOUNT_NUMBER ACOCUNT_NAME* 102 1658751S10 JOHN MILTON 103 18425335S3 ROSE MILTON 104 184344751S2 CHRISTOPHER MARK 125 20808778S2 SUE 145 224532472S1 ABDUL HALIM AHMAD 165 45216698 RABAB ABDUL 166 5896542 SURAYA AKTER 168 145879 TUHIN AHAMED 169 4578956 FREDERICK ADCOCK 170 4213588 ANDREW HILTON 105 805878997S3 WILLIAM ALLAN 108 98714739S2 KENNETH JOHN ANSTEY 109 1377658043S21 JILLIAN MINEAR BOURNE 111 19942551S12 ELIZABETH MARGARET BLOXHAM
I would like to remove % ' account number and the place, the account name.
After updating the result would be as below:
Please advice how would be to this day.EMP_ID ACCOUNT_NUMBER ACOCUNT_NAME 102 1658751 JOHN MILTON (S10) 103 18425335 ROSE MILTON (S3) 104 184344751 CHRISTOPHER MARK (S2) 125 20808778 SUE (S2) 165 45216698 RABAB ABDUL 166 5896542 SURAYA AKTER
Concerning
JoyI think that u inserted bad records in the table emp1.
Data also well account_number and account_name are interchanged. I think so
check your data
S
-
LOV query fails, but works in SQL commands
I am trying to create a type with semi-automatic item text field, but the query I fill in the definition of LOV returns an error:
Impossible to analyze the query SQL LOV!
ORA-00942: table or view does not exist
Although when I try the same query in the form of SQL commands, it works without any problem. No idea what I am doing wrong?
The query is as follows, where v_prt_gem_t is a view and prt_gem is a table.
SELECT PG.POST_CODE||' '||PT.NAAM FROM V_PRT_GEM_T PT INNER JOIN PRT_GEM PG ON PT.NR = PG.NR WHERE LAN_NR = 4
Julijan wrote:
I am trying to create a type with semi-automatic item text field, but the query I fill in the definition of LOV returns an error:
Impossible to analyze the query SQL LOV!
ORA-00942: table or view does not exist
Although when I try the same query in the form of SQL commands, it works without any problem. No idea what I am doing wrong?
The query is as follows, where v_prt_gem_t is a view and prt_gem is a table.
- SELECT
- PG. POST_CODE | » '|| PT. NAAM
- Of
- PT V_PRT_GEM_T
- JOIN IN-HOUSE
- PG PRT_GEM
- WE
- PT. NR = PG. NR
- WHERE
- LAN_NR = 4
It is likely that CERTAIN privileges on one or two tables/views used are granted for the scheme of the analysis of the application through a role, not directly to the schema. Role-based privileges will be observed in the workshop of SQL in the latest versions of database, but not for running applications. See (YABAOAE) yet another Blog about Oracle Application Express: Application Express and SQL Analysis for detailed information.
That's why you always have to give the full APEX and the database version numbers when you ask a question: implementations and features change over time. If we know exactly which versions are used so we can determine what behavior is expected, and what bugs exist or have been corrected...
-
Use the lines of a text file as input to an SQL command
Hello
I have a text file containing the lines...
123
1234
I would like to use as input for a SQL command running in a script. ie
Update flag set < table > = 'Y' where job = < the text file lines >;
Any help much appreciated.
See you soon
External table will do.
For reference...
CREATE TABLE Hold'em (SEQ_NUM NUMBER (10));
insertion in hold select SEQ_NUM in task where proc like '% PROC;
update set hold_flag = task ' ' where in SEQ_NUM (select hold SEQ_NUM);
-
creation of database using the SQL command * more
Hello
This isn't a matter of urgency.
I learn the Oracle DBA. I have installed Oracle 9.2 in my windows system. And I'm trying to create a database using the SQL command.
OracleVersion: 9.2
Windows XP operating system
I get the error like below when executing the CREATE DATABASE command.CREATE DATABASE suri USER SYS identified by manager USER system identified by surendra LOGFILE GROUP 1 ('F:\Oracle\oradata\suri\redo01.log') SIZE 100M, GROUP 2 ('F:\Oracle\oradata\suri\redo02.log') SIZE 100M, GROUP 3 ('F:\Oracle\oradata\suri\redo03.log') SIZE 100M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 MAXINSTANCES 1 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 DATAFILE 'F:\Oracle\oradata\suri\system01.dbf' size 200M EXTENT MANAGEMENT LOCAL UNDO tablespace undots datafile 'F:\Oracle\oradata\suri\undots01.dbf' size 200M DEFAULT TEMPORARY TABLESPACE tempts1 DATAFILE 'F:\Oracle\oradata\suri\temp01.dbf' SIZE 100M EXTENT MANAGEMENT LOCAL
I have validated the syntax but not able to find where is the error.ERROR at line 16: ORA-25139: invalid option for CREATE TEMPORARY TABLESPACE
Please let me know if you need more details.
Thanks in advance for your help.
Kind regards
SuriOracleVersion: 9.2
Why a so old version (and desupported)? In any case...
TEMPORARY TABLESPACE tempts1 DATAFILE 'F:\Oracle\oradata\suri\temp01.dbf' SIZE 100 M EXTENT MANAGEMENT LOCAL default
.. try change DATAFILE with TEMPFILE.
-
error from EXEC_SQL:921ORA - 00921: unexpected end of sql command
EXEC_SQL.PARSE(CONNECTION_ID,CURSOR_NUMBER, 'SELECT count(*) FROM "Work"@PASS WHERE "PId" = (SELECT PId from cr_layout where L_NO =''' || :CT.L_NO || ''''); Gives this error -- unexpected error from EXEC_SQL:921ORA-00921:Unexpected end of sql command I know it's related to the bracket at the end but I'm not able to correct it...plz. help
This?
EXEC_SQL.PARSE(CONNECTION_ID,CURSOR_NUMBER, 'SELECT count(*) FROM "Work"@PASS WHERE "PId" = (SELECT PId from cr_layout where L_NO =''' || :CT.L_NO || ''')');
-Clément
-
ORA-00900 - the SQL commands: invalid SQL statement
Hello world
I installed Oracle Xe on a Centos 5.5 host yesteday.
Installation was Ok, I can connect to the web interface on "http://127.0.0.1:8080 / apex / '.
But when I want to use sql commands, regardless of the input control, I have the "ORA-00900: invalid SQL statement" message.
I can enter the command "Show all", for example, in a terminal after SQL > command prompt, it works... but not in the web interface...
I tried to import the .sql, script trought the web interface, no much result, no display in the window.
Can someone help me,
Thank youShow all is NOT a SQL command is a command that I think, not a command from pl/sql, sql more... Why not try to do a select on a table is know YOU the schema...
Thank you
Tony Miller
Webster, TX -
Not correctly completed SQL command
can not find why this error occurs: not correctly completed SQL command
PROCEDURE FORMA4_25_11)
P_GO IN VARCHAR2,
P_DATE_1 IN VARCHAR2,
P_DATE_2 IN VARCHAR2,
P_DAY_COUNT NUMBER,
DATA_SET ON SYS_REFCURSOR)
AS
DB_QUERY VARCHAR (32767).
BEGIN
DB_QUERY: = ' SELECT T1.ad, T1.admin_count, T1.cnt)
SELECT dc.NAME ad,
Count (am. IDN) admin_count,.
Admn.Say NTC
SINCE DC dictionaries.customs
INNER JOIN kadr.tper_master mf
ON mf.branch_code = dc.code_int AND mf.status = 0
INNER JOIN vpdgk.vp_admin am
ON am.mufet_id = mf.idn
LEFT JOIN (SELECT branch_code,
Say Count (branch_code) AS
OF (m_id SELECT c.mufet_id,
b.branch_code,
Count (c.mufet_id) mufet_count
OF vpdgk.vp_qeydiyyat A
INNER JOIN kadr.tper_master b
ON b.idn = a.mufet_id
INNER JOIN vpdgk.vp_admin c
ON c.mufet_id = A.mufet_id
AND (c.uid_ IS NOT NULL
GOLD c.uid_reserv IS NOT NULL)
INNER JOIN dictionaries.customs d
ON d.code_int = b.branch_code
WHEN Trunc (A.insert_date) BETWEEN
TO_DATE('''||) P_DATE_1 | " ', "DD. MM YYYY ")
AND
TO_DATE('''||) P_DATE_2 | " ', "DD. MM YYYY ")
C.mufet_id GROUP, b.branch_code
HAVING COUNT (c.mufet_id) < ' | P_DAY_COUNT |')
GROUP BY branch_code Admn)
ON admn.branch_code = dc.code_int
Dc.NAME, admn.say) AS T1 WHERE T1.ad = ' | P_GO | ";
DATA_SET OPEN FOR DB_QUERY;
END;
Hi Afa
At the end of SQL you write 'AS '. Remove it
Excample:
-
Delete duplicate of PL/SQL command result values
Hi all
I am working on SQL Developer 4.1 and using sub PL/SQL command to retrieve the unique values of Batch_No with matching data:
Row_ SELECT TO_NUMBER (ROW_NUMBER () (IN Batch_No ORDER)),
Batch_No,
Record_Source,
Create_Date,
Submitter
Of
(SELECT DISTINCT Batch_No,
RecSource Record_Source,
Get_Date_From_Remedy (Create_Date) Create_Date,
Submitter
OF VOD_SEET_Invoices
WHERE (Batch_No <>"NA")
) batch
UNION
Row_ SELECT TO_NUMBER (ROW_NUMBER () (IN Batch_No ORDER)),
Batch_No,
Record_Source,
Create_Date,
Submitter
Of
(SELECT DISTINCT Batch_No,
'Penalties' Record_Source,
Get_Date_From_Remedy (Create_Date) Create_Date,
Submitter
OF VOD_SEET_Penalties
WHERE (Batch_No <>"NA")
) batch
The output of the above query has many duplicates in Batch_No, no idea how to rewrite the above query so that only unique values of Batch_No to the associated data are retrieved without duplicates?
Thanks in advance,
Kind regards
Mona Fathy
For example...
If your logic is that "Penalties" must have priority over the other record (assuming another in this scenario) of the first query, if there is a record of penalties, then by doing the following:
Select row_number() (order Batch_No) Row_
Batch_No
Record_Source
Create_Date
Author
de)
Select row_number() over (partition by order of batch_no to decode (record_source, 'Penalties', 0, 1)): the nurse
batch_no
record_source
create_date
author
de)
Select Batch_No
Record_Source
Create_Date
Author
to select (separate Batch_No
RecSource Record_Source
Get_Date_From_Remedy (Create_Date) Create_Date
Author
of VOD_SEET_Invoices
where (Batch_No <> 'NA')) batch
Union
Select Batch_No
Record_Source
Create_Date
Author
to select (separate Batch_No
"Penalties" Record_Source
Get_Date_From_Remedy (Create_Date) Create_Date
Author
of VOD_SEET_Penalties
where (Batch_No <> 'NA')) batch
)
)
where rn = 1
determines a row_number in each batch_no, ordering sanctions first duplicate records, and other records.
Then the outer query takes just the first records of each batch_no by applying the "where rn = 1" clause.
The outer query then applies his own row_number compared to results sorted by batch_no.
-
SP2-0309: SQL * command procedures can only be nested to a depth of 20
HELLO EVERYONE
HAVE THIS CODE:
clear the screen
prompt ***********************************************
prompt * *
prompt * *
Guest * CHOOSE ONE OF THE OPTIONS: *.
prompt * *
Guest * 1. Create the role *.
Guest * 2. Privilege to grant to a role *.
Guest * 3. Create user *.
Guest * 4. Role of granting a user *.
prompt * *
prompt * *
prompt ***********************************************
accept the choice prompt "enter choice:
fixed term off
column virt_col new_value by v_choice
Select
case '& choice '.
When '1', then 'C:\PLSQLII\mid_lab\script1.sql '.
When '2' then 'C:\PLSQLII\mid_lab\script2.sql '.
When '3' then 'C:\PLSQLII\mid_lab\script3.sql '.
When '4' then 'C:\PLSQLII\mid_lab\script4.sql '.
end
as virt_col
Double;
Set term on
@& v_choice
SO WHEN I GET 1 I CALL THIS CODE:
set verify off
Set serveroutput on
clear the screen
prompt ***********************************************
prompt * *
prompt * *
Guest * CREATE ROLE *.
prompt * *
prompt * *
prompt ***********************************************
accept invites role "Enter role to create:
declare
Report number;
Start
CREATE_ROLE ('& role ', status);
If (status = 1) then
dbms_output.put_line ("' this role already exists!");
on the other
dbms_output.put_line ('role created.');
end if;
end;
prompt *********************************************************
accept invites of choice «Press any key to return to the main menu...» »
@ "C:\PLSQLII\mid_lab\menu.sql".
BUT WHEN I ENTER A NAME FOR A ROLE, HE ME GIVES THIS ERROR:
SP2-0309: SQL * command procedures can only be nested to a depth of 20...
COULD YOU PLEASE HELP?
Thank you!
Who executes the PL/SQL block in your second script, then you'll want to add it to your script.
See: http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_twelve037.htm
Furthermore, your caps-lock key seems to be broken...
-
Running a SQL command in my bean class
Hi all
I use JDeveloper 12.1.2.0.0.
I have an interest in running a query in my method of bean. I did some research and I always have a code but it does not find the method that the method requires so I tried to add the query in my AppModule and I added my method as a data control, but how do I access and change my method of bean?
The page with the code that does not find the method: http://jjzheng.blogspot.pt/2010/11/run-single-query-in-application-module.html
Gives me: 'Method 'getDBTransaction' not found'
The page that creates my method as a data control: http://amit-adf-work.blogspot.pt/2013/09/how-to-execute-sql-using-adf-application.html
This is the right way? How can I run a SQL command in my bean class?
Kind regards
Frederico.
This is the code I am using
GET A METHOD OF PAGEDEF AND RUN
get the link containe
BindingContainer links is BindingContext.getCurrent () .getCurrentBindingsEntry ();.
get an Action or a MethodAction
Method of the class OperationBinding = bindings.getOperationBinding ("YourMethodAction");
If there are parameters to define...
Map paramsMap = method.getParamsMap ();
paramsMap.put ("param", "value");
execute the method
Method.Execute ();
List errors = method.getErrors ();
If (! errors.isEmpty ())
{
handle errors errors here is a list of exceptions!
}
no error return to normal work
Timo
-
I am a developer SQL 3.1.07.42 Windows 7 64 bit with java 1.7
I have c:\test.sql that contains
and c:\testscript.sql that containsPROMPT Working
If I open a new worksheet and type:set echo on set serveroutput on / GET c:\test.sql SAVE c:\test_working.sql LIST 1 LAST RUN
then press F5, I get:@\testscript.sql
If the c:\test_working.sql is not created and the content of the script is not executed.@\testscript.sql
set serveroutput on
/
GET c:\test.sql
SAVE c:\test_working.sql
LIST 1 LAST
RUN
What I am actually trying to do here (and maybe you guys have a better idea) is to capture the output of the sql command that appears on the client, send it to the server, treat it somehow and then do everything with her (she log in my case).
For example (a very simple example from my scripts).
the idea is to be able to save the output of any control block / anonymous plsql in a way that can be sent to the server for processing (this is for most mistakes, of course).spool c:\temporary.tmp create table test(); spool off; get c:\temporary.tmp 0 begin insert into logtable (msg) (trim(' 100 ')); end; save logit.sql @'logit.sql'
I can intercept DBMS_OUTPUT turning SERVEROUTPUT then a DBMS_OUTPUT. ACTIVATE and finally using DBMS_OUTPUT. GET all the lines and the process/log them, but I have not found a way yet to catch the rest of the "TERMOUT' of treatment other than the queue, but even then, I couldn't find a way to get the local file (content) on the server; and this idea GET/SAVE/RUN appeared to be feasible but its does not work (I even tried interactively, but maybe I'm doing something wrong).
Any ideas/suggestions on the topic are welcome.
Thank you.Hello
According to the 3.1.04.72 SQL Developer documentation, the "get" command (among others) is not supported:
Help | Table of contents | SQL Developer concepts and use. With the help of the SQL worksheet | SQL * more supported and unsupported statement...If the options are limited. If sqlplus is available and use it as an "external" tool will not conflict entirely with local policy, these links may interest you:
Re: sqlplus vs sqldeveloper
Easy Connect and sqldev.conn issuesOtherwise, you can add a feature request for this on the SQL Developer and see if such an improvement is a priority for the community.
Kind regards
Gary
SQL development team
Maybe you are looking for
-
No Apple USB driver in Windows 10 Device Manager
Is there a way to retrieve the Apple USB driver in Windows 10 Device Manager. I downloaded the iTunes 12.3.3 yesterday and now he is gone. I tried plug into each of my Apple devices (iPod, iPad, iPhone, iPhone 4S 6) restarting my computer disabled m
-
How can I change the password in a new Mc Pro.
How can I change the password in new Mc Pro. Is there a button right in the Mc Pro touchpad
-
Optiarc dvd rw ad-7560 ata device s
My CD-ROM/DVD-ROM does not work. It says on the Device Manager "Windows cannot load the driver for this hardware device. The driver may be corrupted or missing. (Code 39) ». I want to try these steps I read on the forum: Can you please try these step
-
Hello I would like to ask if there are reports on the development of the addedsupport firmware for IPv6 on the router.
-
What is msdia80.dll and I should remove it?
I was in the record Local (c), when I stumbled upon the msdia80.dll file. So, I was wondering what this file is and what he does, as if it would be a good idea to remove it. Also, I'm a little worried, as it says in the description of the program Mic