Models to run a SQL to droplet (selection)
HelloI need query on a table, example: select * from ARF_QUERY "the database used is Oracle. I would like to know if the atg has some
standard method to make this connection to database and run the SQL of a droplet (select).
I thank.
Just found a droplet that takes your sql as input.
More info on the following link
http://docs.Oracle.com/CD/E23095_01/platform.93/PageDevGuide/HTML/s1349sqlqueryrange01.html
I hope this helps!
Tags: Oracle Applications
Similar Questions
-
Problem with Apex 5.0 report with a query that runs in SQL Developer
Hello
I have a query that runs in SQL Developer without problem, but when I use it in a classic report, it displays following:
error report:
ORA-06502: PL/SQL: digital or value error: character of number conversion error
The query is:
select T1.ID_ATTACHMENT, T1.BLOB_CONTENT, T2.ATTACH_CATEGORY, T1.FILENAME, T1.ATTACHMENT_DESCRIPTION from ATTACHMENTS T1 LEFT JOIN REF_ATTACH_CATEGORIES T2 ON T1.ATTACHMENT_CATEGORY = T2.ID_ATTACH_CATEGORY WHERE T1.ID_ATTACHMENT IN (SELECT ID_ATTACHMENT FROM REL_ATTACHMENTS WHERE REL_PART_ID = 1 AND REL_ID = 64146);
And the output of SQL Developer is:
I have following Setup for the BLOB_CONTENT column in the classic report:
Any ideas what is causing this problem?
Thanks in advance,
Sergio
I don't have notes with me, but I think that the content of the blob must be selected as:
DBMS_LOB. GetLength (blob_content) as blob_content
and check that you have included the primary key in the results.
-
Running PL/SQL scripts...
Hello:
I'm new to PL/SQL and am learning by writing that a few basic Queries.I using TOAD as a tool to write queries I got stuck in this query I posted below.
Here I have a table with data.
EMPLOYEE_ID SALARY BONUS
----------- ---------- ----------
90-1000
100 2000
110 1890
130 2132
120 1255
I wrote a query which take the value from the table (of particular employee_id) salary and multi with 0.01 and once again will store in the variable bonus (so far everything works fine).
but when I execute the script with the function to update its time consuming process (ends without result).
DECLARE
bonus NUMBER (8.2);
emp_id NUMBER (6): = 100;
BEGIN
SELECT salary * 0.10 IN bonus
Employees
WHERE employee_id = emp_id;
dbms_output.put_line (bonus);
update set employees.bonus = bonus employees where employee_id = emp_id;
END;
I tried the same thing through the sql-plus tool.
I stored the file above in note ++ (.sql extension) and through sql-plus I tried to run
SQL > @[path] [file]
but this does not work please help me in this. Please help me solve both ways...
See you soon...
It shouldn't take long at all.
SQL > create table emp2 in select * from emp;
Table created.
SQL > ed c:\give_bonus.sql
In my case, I have...
>
declare
number of bonuses;
emp_id number: = 7788;
Start
Select sal * 1.1
as a bonus
from emp2
where empno = emp_id;dbms_output.put_line ('Sal with bonus: ' | bonus);
Update emp2
Sal value = give_bonus.bonus
where empno = emp_id;commit;
end;
/And then again in SQL * more I call it...
SQL > set timing on
SQL > @c:\give_bonus.sql
SAL with bonus: 3300PL/SQL procedure successfully completed.
Elapsed time: 00:00:00.03
Very fast.
Perhaps you lack the ' / ' the end of your script that tells SQL * Plus to run the code? And he's sitting there waiting for input?
-
How to run multiple sql statements
Hi all
I wonder if I can run multiple sql statements in one shot with > >, immediate run
for example:
I set the variable as X: = sql statement
Y: = sql statement
z: = sql statement
can I execute immediate (X, Y, Z);
If yes how? and if not what other possible
Thank youBeginning with the codes of Ganesh
DECLARE l_statement VARCHAR2 (2000); v_passwd VARCHAR2 (200); v_username VARCHAR2 (200) := 'test'; v_pwd_key VARCHAR2 (200) := 'lwty23'; v_dblink_name VARCHAR2 (2000); v_dblink_drop VARCHAR2 (2000); v_dblink_create VARCHAR2 (2000); v_dblink_check_connection VARCHAR2 (2000); l_number NUMBER; BEGIN --<
> FOR c_instance IN (SELECT * FROM v_oracle_instances WHERE environment = 'Developement') LOOP SELECT encpwd_owner.display_db_encpwd (v_username, c_instance.host_name, c_instance.instance_name, v_pwd_key) INTO v_passwd FROM DUAL; v_dblink_name := c_instance.host_name || '_' || c_instance.instance_name; v_dblink_create := ' CREATE DATABASE LINK ' || v_dblink_name || ' CONNECT TO ' || v_username || ' ' || 'IDENTIFIED BY ' || v_passwd || ' USING' || ' ''(DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST= ' || c_instance.host_name || ')(PORT=' || c_instance.LISTENER_PORT || '))(CONNECT_DATA=(SID=' || c_instance.instance_name || ')))'''; v_dblink_check_connection := 'select 1 from global_name@' || v_dblink_name || '.QCM'; --- Notice this change. I am simply selecting 1. That should be enough to test the database link. v_dblink_drop := 'drop database link ' || v_dblink_name || '.QCMTLAF'; -- l_statement := 'BEGIN ' || v_dblink_create ';' || v_dblink_check_connection ';' || v_dblink_drop '; END ;' BEGIN EXECUTE IMMEDIATE (v_dblink_create); DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Created'); EXCEPTION WHEN others THEN dbms_output.put_line( 'Failed to create the database link ' || v_dblink_name ); dbms_output.put_line( dbms_utility.format_error_backtrace() ); INSERT INTO error_table( column_list ) VALUES( < - > );
END;
EXECUTE IMMEDIATE (v_dblink_check_connection) INTO l_number; --- Notice this.
DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Tested');
BEGIN
EXECUTE IMMEDIATE (v_dblink_drop);
DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Dropped');
EXCEPTION
WHEN others THEN
dbms_output.put_line( 'Failed to drop the database link ' || v_dblink_name );
dbms_output.put_line( dbms_utility.format_error_backtrace() );
INSERT INTO error_table( column_list )
VALUES( <
- > );
END;
END LOOP;
END;
But I agree with the comment that others have grown up is not really wise to create and drop a database like that link.
Justin
-
How to run wfstatus.sql for i-expenses
How to run wfstatus.sql i-expenses in EBS 11i.Select this check box, hope it helps.
How to find and solve the reports on Internet expenditures within workflow [ID 185004.1]
How wfstatus.sql to run on a statement of expenses Internet [134895.1 ID]
-
How to run a SQL string to a procedure of forms?
Hello
first the background. I have a Varchar2 column in a Table with a SQL string.
Now I want to read this chain in forms and run the SQL statement - but I don't know how.
This is the SQL string:
Select the country from p_1 from countries where country_nr = p_2
P_1 and p_2 are Variables in the procedure of forms.Most people forget that groups Records are excellent tools for dynamic queries like this. Search for Populate_group_with_query.
Only you need to change your sql, it is not in the sentence, like this:
Select the country as P_1
country
where country_nr = p_2
and p_3 = p_3
and p_4 = p_4Select name as P_1
of the customer
where customer_nr = p_2
and country_nr = p_3
and p_4 = p_4Your rec group would have a single column, P_1, where the data would be accessible after the query. Get_group_char_cell allows you to retrieve the value of P_1. I don't know, but you should not "AS P_1" expression in the select, as long as you have created the record group initially with a specific column name.
The only thing that is not clear, however, is your use of variables in the where clause. You can either hardcode the literal values in the SQL string, like this:
'where country_nr = ''123'' and...'
Note as you build your text string SQL, you use two apostrophes instead of one, given that pl/sql uses the apostrophe of beginning and end of the string.
Or alternatively, you can use bind variables for your where the variables paragraph as follows:
where customer_nr = :Parameter.var_2
and country_nr = :Parameter.var_3Then, you can move a value in the: parameter values before completing the Group rec. You can use elements in a block of control rather than the settings, too.
Here is an example of using dynamic query in a record group: Re: dynamic query
-
I choose the computer name of the machine running a SQL script
Hello. I am looking for a way to select the computer name of the machine running a SQL script. Is this possible?
I tried the following, but it does not work. Any suggestions?
Select % computername % of double;http://www.Oracle.com/technology/oramag/code/tips2003/011903.html
Check this link see if it helps.
Concerning
REDA
-
What do I need to run adsysapp2.sql in the database of R12?
Hi, experts:
I'm migrating a 11.2.0.3 R12 database of HP following Linux notes 741818.1. I work on the step 8. Establish the diagram of the SYSTEM. After execution of the
script ausy1120.sql, I saw that a command in the log file says "You must run adsysapp.sql to create packages of Oracle Applications in the scheme of the SYSTEM.". What do I need to run this? It is not said in the note. At this point I just create a database structure. No given no request.
Thanks and regards.
Thank you so much, Hussein.
-
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
-
error running InstallOracleProfile.sql
evening of GOOG,
I installed oracle XE and Toolkit for asp.net odac in my pc.when that I am trying to run InstallOracleProfile.sql I get
ORA-01917: user or role 'ORA_ASPNET_PROF_FULLACCESS' does not exist
can someone help me solve this problem
Thank you
PrakashHello
Did you run the InstallOracleASPNETCommon.sql script?
Kind regards -
Virtual Center can run on SQL Server Express
Hi, I currently have Virtual Center running on SQL Server 2005 Standard. I would like to move databases to SQL Server Express. Virtual Center run on SQL Server Express? Y at - there any restrictions that I can hit? We run ESX 4.X and a few 50 VM environment.
Thanks in advance for your help,
Terry
the limitation to Express is 5 guests and 50 VM. However, the biggest concern may be the restriction of size of 4 GB of your DB. May I ask why if you are already running on the standard 2005 would return you Express?
-
How to run grid sql statements
Hello
I would like to run some of the grid control sql statements as tablespace freespace check.
Grid options could there be to execute the sql statement?
If so, how to set up the output of the sql for E-mail
Please I need your suggestion to proceed.
Version of the grid: 10.2.0.5.0
Platform: Sun
Thank you.Hello
no need to run the sql statement of the grid, instead of that you can configure the threshold values.
for example, if your tablespace capacity 85% complete and then he will send you the email alert that you configured in notifications.
you will find on the home page - bottom of the page - > manage settings...
check http://download.oracle.com/docs/cd/B19306_01/server.102/b14196/montune001.htm#CACCIHAB
http://download.Oracle.com/docs/CD/B19306_01/EM.102/b40002/notification.htm#sthref995
Thank you
-
How I can run pl/sql express edition? PLSS help me.
I am trying to run pl/sql statements in oracle 10 g express edition, but it does not work! What can I do? What program can I download to run pl/sql?
pls help me!
Thank you.
Code:
---------------------------------------------------------------------------------
SET SERVEROUTPUT ON
DECLARE
v_count NUMBER (2): = 1;
BEGIN
LOOP
DBMS_OUTPUT. Put_line (v_count);
v_count: = v_count + 2;
WHEN the EXIT v_count > 10;
END LOOP;
END;
---------------------------------------------------------------------------------
Error code:
ORA-00922: missing or not valid option
Version:
Oracle Database 10 g Express Edition Release 10.2.0.1.0 - product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
AMT for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Published by: user8944100 on 24.Oca.2010 12:31
Published by: user8944100 on 24.Oca.2010 12:37user8944100 wrote:
by the way that Mr. Alex Nuijten when I fail "set serveroutput on ', it works, is this problem cause :(You use SQL Workshop in the APEX, the "SET SERVEROUTPUT ON" is a SQL * more order - which is not included in the workshop of SQL...
So, Yes, that's your problem... now you can close the message and mark it as answered... -
MX: Model when running?
Is it possible to download the source of a mx: Model at run time? I need the dataProvider for a comboBox to an XML file that is loaded at run time. I know how to load an XML file, but affecting the dataProvider of the comboBox to the loaded XML document doesn't seem to work. Any help is appreciated.'Set the dataProvider of the comboBox on the loaded XML' is the right path to follow. MX: Model is rarely worth it.
Note: list dataProviders parts require a list of collection or array data type.
Set resultFormat = "e4x", it is by default 'Object', including yu do not want. A result handler can assign the XMLList directly on the dataProvider of the ComboBox. You will probably need specify a labelField, or use a label.
Tracy
-
How to run PL/SQL code, as soon as a page opens
Hello
We have a business scenario where we have Apps initialize to obtain data of the ebs. We want this commissioning to arrive as soon as the page opens. Is there a way to do this? Simple, we want to be able to run pl/sql code, as soon as the page opens. Is there a way to do this?
PL Note: We use APEX with ebs.
Kind regards
Joseph"You can have the pl/sql code in an Application process that has a ' process ' of ' On Load: before header".
CITY
Maybe you are looking for
-
EliteBook 8440p: lack of drivers
My system is missing Base system device. I tried to search the official site of HP, but it does not appear there. My OS is Windows 7 Starter. I tried to update, but it is not updated. I need quick help.
-
VISA read very slow communication
Hello IM using serial communications VISA in my project and I noticed that the reading block works very slowly.I have the microcontroller that connected to my laptop through XBee modules.Baud rate is 9600 due as a change factor in each component in t
-
Do I need Compatibility for 2007 Office System Version 12.0.6514.5001 Pack If I have Microsoft Office XP Professional with FrontPage Version 10.0.2627.0 Try to free up space and do not know if I need the compatibility pack. Thanks for any info.
-
8 pre site Dell keyboard problems
There is problem a simple solution to this simple problem but hours of searching I found nothing I had a dell ensue 8 pro. There are now upward or down arrow on the keyboard to display on how could do such a good device but overlook such a small but
-
NEED HELP blackBerry smartphones! BB Storm 9530 problem...
can you please help me to unlock my phone because theres a message in my phone which said entry screen "blackberr" to continue... someone could fix me guys? Thanks in advance that meet... God bless you.