get the output in sqlplus
When I m trying to get the result in a procedure dbms_output.put_line, I m getting the followin errorI've included set serveroutput on so
ERROR:
ORA-06550: line 1, column 29:
PLS-00553: the character set name is not recognized
ORA-06550: line 0, column 0:
PL/SQL: Analysis of completed Compilation unit
PL/SQL procedure successfully completed.
I m not getting results in the sqlplus
Please help me
Thank you very much
What you have here is not a procedure but an anonymous (= named and stored) pl/sql block.
No problem with that, just to correct to name the things you use.
But what do you in here is selecting and select loop on the other. This can be solved with a lot more elegance in a single select statement. And you would have the additional advantage that you don't have to worry about how to do to get the result on the screen, since sql * plus (or any other client tool) made this automatically for you.
The two sliders can be attached. Or can be used via a (select in the clause of a select another from) line of sight. The if condition can be expressed by a case or decode.
Tags: Database
Similar Questions
-
How to get the output of a compiled solution?
I'm writing an automation, but I'm unable to get the output of devenv, but receive nothing. I have reduced my example considerably.
I have a lot of files that looks like this
"B:\Microsoft Visual Studio 9.0\Common7\IDE\devenv" "My_Types\My_Types.sln" /build >... \Output\Build.txt
And it produces Build.txt
Microsoft (R) Visual Studio Version 9.0.21022.8.
Copyright (C) Microsoft Corp. All rights reserved.
-Build started: project: Rotair_Types, Configuration: Debug Any CPU.
Rotair_Types-> C:\IntuitiveDev\Bin\Rotair_Types.dll
= Build: 1 succeeded or up-to-date, 0 failed, 0 was ignored.So now, I try to do it from code:
Compile = new Process()
With Compile.StartInfo
. UseShellExecute = False
. RedirectStandardOutput = True
. FileName = "b:\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"
. Arguments = "/build" «C:\Code\Projects\My_Types\My_Types.sln»»»
Ends with
bSuccess = Compile.Start)
strOutput = Compile.StandardOutput.ReadToEnd)
Compile.WaitForExit)But strOutput is an empty string. This is confirmed by the issuance of the following at the command prompt:
/build "C:\Code\Projects\My_Types\My_Types.sln" "b:\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"
But it does not compile because I can remove the dll, and it returns. I would get the result to determine if the compilation is successful. Any suggestions?
JM
Hello
Your question is addressed in these forums of consumers.
The MSDN Developer forums should be able to answer your question.
Issues related to the overall development of the Windows Desktop:
https://social.msdn.Microsoft.com/forums/en-us/home?category=windowsdesktopdev
Concerning
-
Get the output parameter of workflow using soap in PHP
Hi all, I have a question on how to print the output in php parameter using the soap Protocol. I create the workflow with 1 single task scriptable with variable name of virtual machines as output like that.
var sdkConnections = VcPlugin.allSdkConnections; vms = new Array(); for (var i in sdkConnections) { var host = sdkConnections[i]; var found; if (host.isInventoryServiceAvailable()) { found = host.getAllVirtualMachines(); } for (var j in found) { vms.push(found[j]); System.log(vms); } }
And my php, source code
<?php include ("parameters.inc"); $vco = new SoapClient('https://' . $vco_server . ':8281/vmware-vmo-webcontrol/webservice?WSDL'); $workflowid = "f73f2521-0e6b-48e8-81b9-388b13fc3fea"; $param = array(workflowId=>$workflowid,username=>$vco_user,password=>$vco_pass); echo '<br>'; $result3 = $vco->executeWorkflow($param); print_r($result3); echo '<br>'; foreach ($result3 as $token) { $tokenID = $token->id; } $param2 = array(workflowTokenId=>$tokenID,username=>$vco_user,password=>$vco_pass); $wftokenstatus = $vco->getWorkflowTokenStatus($param2); print_r($wftokenstatus); echo '<br>'; $wftokenresult = $vco->getWorkflowTokenResult($param2); print_r($wftokenresult); echo '<br>'; ?>
When I try the same, executed release in web
stdClass Object ( [executeWorkflowReturn] => stdClass Object ( [id] => ff808081440b6eb90144316de4bc04fe [title] => Copy of Get virtual machines by name [workflowId] => f73f2521-0e6b-48e8-81b9-388b13fc3fea [currentItemName] => __item-undefined__ [currentItemState] => running [globalState] => running [businessState] => [startDate] => 20140215002449+0700 [endDate] => [xmlContent] => ) ) stdClass Object ( [getWorkflowTokenStatusReturn] => ) stdClass Object ( [getWorkflowTokenResultReturn] => stdClass Object ( [name] => vms [type] => VC:VirtualMachine [value] => ) )
I see in customer orchestrator, my workflow work well and in the logs tab I see all my VM appear, but I'm trying to print all components of table in my php script using print_r(), the value of the object always null, only can get name and type as above... No idea how to get the value of the output parameter?... Thanks before
Change this code to your:
for (var j in found) { vms.push(found[j]); System.log(vms); }
To do this:
for (var j in found) { vms.push(found[j].name); System.log(vms); }
In this code, j is a VC:VirtualMachine object, instead of pushing the entire object in your table, just push the virtual machine to .name property. Additionally, make sure that your output variable is of type: Array of Strings
-
How do I get the output of a function table
Hi all
Kindly share your idea.
I need the outputs of a function table only.
Database version: oracle 10.1.0.2.0
login_details:
login_id branch_code
admin 1
Admin1 2
Test 1
user 1
I need output for the query function below.
Select login_id from login_details where branch_code = '1';
If I create a function:
FUNCTION to CREATE or REPLACE fn_get_login (pvBranch varchar2)
IS BACK SYS_REFCURSOR
REF_TEST SYS_REFCURSOR;
BEGIN
OPEN FOR REF_TEST
Login_id SELECT FROM login_details WHERE branch_code = pvBranch;
RETURN REF_TEST;
END;
/
Select * from login_master where login_id in (select fn_get_login('01') from double);
and get
ORA-00932: inconsistent data types: expected - got CURSER
Edited by: 887268 October 8, 2012 12:25You cannot use a Ref cursor in a table, because it isn't a result set of data, it's just a pointer to a request for enforcement.
{: identifier of the thread = 886365}
A ref cursor must be used if you want to refer the request to an external application.
Transfer data back to a function is to use a pipeline for example function
SQL> CREATE OR REPLACE TYPE num_descript AS OBJECT(num number, descript varchar2(30)) 2 / Type created. SQL> SQL> CREATE OR REPLACE TYPE tbl_num_descript AS TABLE OF num_descript 2 / Type created. SQL> SQL> SQL> CREATE OR REPLACE PACKAGE reftest AS 2 FUNCTION pipedata(p_choice number) RETURN tbl_num_descript PIPELINED; 3 END; 4 / Package created. SQL> SQL> CREATE OR REPLACE PACKAGE BODY reftest AS 2 FUNCTION pipedata(p_choice number) RETURN tbl_num_descript PIPELINED IS 3 v_obj num_descript := num_descript(NULL,NULL); 4 v_rc sys_refcursor; 5 BEGIN 6 IF p_choice = 1 THEN 7 OPEN v_rc FOR SELECT empno as num, ename as descript FROM emp; 8 ELSIF p_choice = 2 THEN 9 OPEN v_rc FOR SELECT deptno as num, dname as descript FROM dept; 10 END IF; 11 LOOP 12 FETCH v_rc INTO v_obj.num, v_obj.descript; 13 EXIT WHEN v_rc%NOTFOUND; 14 PIPE ROW(v_obj); 15 END LOOP; 16 CLOSE v_rc; 17 RETURN; 18 END; 19 END; 20 / Package body created. SQL> select * from table(reftest.pipedata(1)); NUM DESCRIPT ---------- ------------------------------ 7369 SMITH 7499 ALLEN 7521 WARD 7566 JONES 7654 MARTIN 7698 BLAKE 7782 CLARK 7788 SCOTT 7839 KING 7844 TURNER 7876 ADAMS 7900 JAMES 7902 FORD 7934 MILLER 14 rows selected. SQL> select * from table(reftest.pipedata(2)); NUM DESCRIPT ---------- ------------------------------ 10 ACCOUNTING 20 RESEARCH 30 SALES 40 OPERATIONS SQL>
but of course, it is wise to just use pure SQL that in order to mix the PL/SQL in queries in the form of best performance features.
Perhaps explain what problem you are trying to solve when trying to use a function, and we can advise you on the best options.
-
How to get the DDL to sqlplus as the TOAD
Hello
I have to work on a computer terminal for a client where the TOAD is not installed. For my regular activities of s/n, I need to take the DDL several times.
I'm very used to the style of the DDL scripts that TOAD 9.6.x.x gives to any object in a schema.
Can anyone suggest how I can get exactly TOAD - like scripts (which provide not only the create statements)
For example
* 1. sqlplus from when I *.
Select dbms_metadata.get_ddl ('TABLE', 'APE1_ACCUMULATORS') of double;
I only get the bottom
CREATE THE TABLE XLTDBO92. APE1_ACCUMULATORS
(
CYCLE_CODE NUMBER 4 APE1ACCU_CYCLE_CODE_NN CONSTRAINT NOT NULL,.
CYCLE_INSTANCE NUMBER (2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
CUSTOMER_SEGMENT NUMBER 4 APE1ACCU_CUSTOMER_SEGMENT_NN CONSTRAINT NOT NULL,.
CUSTOMER_ID NUMBER (9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
ACCUM_TYPE_ID NUMBER (9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
OWNER_ID
)
* 2. of TOAD 9.6.x.x but when I click on 'create scripts' I'll get *.
DROP TABLE XLTDBO92. APE1_ACCUMULATORS CASCADE CONSTRAINTS;
CREATE THE TABLE XLTDBO92. APE1_ACCUMULATORS
(
CYCLE_CODE NUMBER 4 APE1ACCU_CYCLE_CODE_NN CONSTRAINT NOT NULL,.
CYCLE_INSTANCE NUMBER (2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
CUSTOMER_SEGMENT NUMBER 4 APE1ACCU_CUSTOMER_SEGMENT_NN CONSTRAINT NOT NULL,.
CUSTOMER_ID NUMBER (9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
ACCUM_TYPE_ID NUMBER (9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
OWNER_ID
)
DROP SYNONYM XLTDB92. APE1_ACCUMULATORS;
CREATE SYNONYM XLTDB92. APE1_ACCUMULATORS FOR XLTDBO92. APE1_ACCUMULATORS;
GRANT DELETE, INSERT, SELECT, UPDATE ON XLTDBO92. APE1_ACCUMULATORS TO XLTDBO92_ALL;
So my question is:
How to such scripts from sqlplus, regardless of the type of the object? _
Note: I'm writing a new thread because my previous question has been answered, even if I was not able to type in completely. My mistake as it was published in before that I could finish the question.
Regds,
MalikaIf the DDL returned by dbms_metadata isn't to your liking, then write your own scripts to generate the DDL or cover scripts to generate all the items you want.
In the case of synonyms and grants, is very easy using the RDBMS dictionary views, but if you generate a table DDL you also want and need the PK, UK, FK, secondary indexes, comments and policies on the table as well as synonyms and subsidies. All that if you delete the tables goes.
There is a get_dependent_ddl dbms_metaddata of procedure to generate objects dependend on a table that can be interesting.
HTH - Mark D Powell.
-
Get the output of the console on Simulator BB10
Is it possible to access the console (or at least the stderr) output a basic NDK application deployed to the simulator of th? I tried telnet in the Simulator to run it, but the devuser does not have permissions on the files of the app.
Or maybe is there a log of debugging as for Android?
I would like if possible, avoid using the IDE for this.
You don't actually run the console application, but you can use command line tools to look at the output of the application log.
Basically SSH into it (it is not really Telnet) and navigate to the folder of the application under the/accounts/1000/appdata /... then run "tail-f newspaper/journal" after the launch of the app, or just "cat/journal of newspapers". If the output you are interested is no longer attend balls/journal because of the new substance slogger2, you would use a variant of 'slog2info w' instead.
You are quite correct that attempting to run the application from the console did not give him the same environment and except in a very few cases, it serves no real purpose.
-
Hello again,
during a migration script written in plsql, we print several status information on-screen using dbms_output.put_line.
for your information:
the script commits each lines x during a massive update. A commit is carried out whenever I want to have the output: Timestamp + number of lines committed themselves.
Unfortunately the output by dbms_output.put_line is emptied to sqldeveloper once the procedure is complete.
So I have all the time after the migration is complete, but if possible I need the information when it is put into the stack of the dbms_output.
Is it possible to flush the output while the process is still ongoing? Are the alternatives to dbms_output.put_line who could help?
Oracle is 10.2.0.4
Thank you very much
Andreas
Published by: Andreas s. the 11.03.2011 01:38Note:
Messages sent using the DBMS_OUTPUT are not actually sent until full subprogramme of the shipment or the relaxation. > There is no mechanism to flush the output during execution of a procedure.http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_output.htm
you could just write your output to a table?
-
How wrap us the output with sqlplus tab delimiter?
Is there a way I can be rolled out via sqlplus?
Just for example, here is my query. I want this reel with the tab delimiter.
c:/test coil
Select * from emp;
spool offTry this:
coil output_file.txt
Select Column1 | Chr (9) | Column2 | Chr (9) | ....|| Chr (9) | columnX
from my_table;
spool offHTH,
Brian -
Get the output of waveform of table 1 d by helping the timestamp
Hello
I'd appreciate if someone help me.
I read the temperature of a device. I would like to see the results of temperature of waveform. I code timestamp in the Panel (attachment). But after running, as you can see the time is always zero during temperature changes. It should show the temperature at different times, as time passes.
Kind regards
Mehdi
-
I know by logic box to get the output using the regular expression?
Hello
I am now only study the notion of Regexp. I had seen the best of Mr. Blus. Can I know how it works. I need this logic of the functionality of wildcards in sting matching Regexp (wildcard string Matching).
Please help me in this matter.SQL> ed Wrote file afiedt.buf 1 WITH test_data AS ( 2 SELECT 'c:\temp\folderA\fileA.txt' t FROM DUAL UNION ALL 3 SELECT 'c:\temp\fileA.txt' t FROM DUAL UNION ALL 4 SELECT '\\mymachine\A\fileB.txt' t FROM DUAL UNION ALL 5 SELECT '\\mymachine\A\B\fileB.txt' t FROM DUAL UNION ALL 6 SELECT '\\mymachine\A\B\C\image.jpg' t FROM DUAL UNION ALL 7 SELECT '\\mymachine\A\B\C\D\music.mpg' t FROM DUAL UNION ALL 8 SELECT 'c:\myfolder\folderD\folderE\4969-A.txt' t FROM DUAL 9 ) 10 select regexp_replace(t, '^.*[\]([^\]*)[\][^\]*$','\1') 11* from test_data SQL> / REGEXP_REPLACE(T,'^.*[\]([^\]*)[\][^\]*$','\1') ------------------------------------------------------------------ folderA temp A B C D folderE 7 rows selected. SQL>
IqbalSabrina wrote:
One last question what is the average ofThe final "\1" in
select regexp_replace(t, '^.*[\]([^\]*)[\][^\]*$','\1')
Iqbal
It is a reference.
See here:
http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14251/adfns_regexp.htm#CHDHCIGHand in the middle of the table here:
http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14251/adfns_regexp.htm#CHDIEGEIMatches the nth previous subexpression, in other words, either grouped in parentheses, where n is an integer between 1 and 9. The parentheses cause > an expression be remembered; a backreference refers to him. A backreference account subexpressions from left to right, starting with the opening > bracket of each subexpression preceding. The expression is not valid if the source string contains less than n subexpressions preceding the \n.
Oracle supports the expression of backreference in the regular expression pattern and the replacement of the REGEXP_REPLACE function string.
The expression (abc: def) matches the strings abcxyabc and defxydef xy\1, but does not abcxydef or abcxy.A backreference allows you to search for a string repeated without knowing the actual string advance. For example, the expression ^(.*) \1$ > matches a line consisting of two adjacent instances of the same string.
As explained in table 4-2, backreferences store sub-expressions matched in a temporary buffer, which allows to reposition the characters. You access the pads with the notation \n, where \n is a number between 1 and 9. Each subexpression brackets and is numbered from left to right.
-
What is the difference between the output of the Script and the result of the query?
Hello gurus,
In Oracle SQL Developer, during the execution of a select statement running with the "F5 key", I get the output of the Script; And then if I execute the same select statement using 'Ctrl + Enter', I get basically the same data, but it is formatted to be a little different. and using 'Ctrl + Enter' I can adjust and reduce the size of the column (not the logical and physical structure) on the GUI screen to display all columns without having wide apart. What are the advantages/disadvantages to running queries using "F5" or "Ctrl + Enter"? If someone could shed some light on this topic bit, that would be nice.HI HAS LUNS,
Text (f5) is functional, for the better or for the worst dumps select all.
Chart is prettier - you get a complete data by select grid and scroll within the grid.
There are a few other minor differences.Personally, I use mostly f5 /text/ (sqlplus emulation).
-Turloch
Team SQLDeveloper -
Hello
I use Oracle 10 g, and I want to know how can I enlarge the output in SQLPLUS:
for example if I execute select * employee to get all of the data, for now I get just a few lines
Thanks in advanceAhh, then use:
set long
Once again check the current value with show in a long time.
-
How to control the output voltage?
Good time after some time can get the output voltage, but this value is alwayscontinuous. How to control the voltage output through a Boolean? In
in order to get this tension when I want to.
Greetings.
Hugo SantosHi Hugo,.
If you use a LabVIEW project, you must set the time of sampling in the properties of the node (see SamplingInterval.png). But this time to refresh the data should be high enough. If you take into account this update of time trying to control your way out.
Kind regards
-
Hello
I try to enable and disable the submit button based on the status of output parameter that I call in lov.
Concerning
Asia.
Hi AJ,.
Thanks for the reply
I tried the method above, but it does not work.
I am trying to enable and disable the submit button based on two input parameters and an output parameter.
Based on two input parameters, I'm able to get the output parameter, and if the output parameter is "S" then iam allowing the submit button.
on the other
disable the submit button.
Here is my code:
IAM calling this co
OASubmitButtonBean submitbean = (OASubmitButtonBean) webBean.findChildRecursive ("Submit");
String crreason = pageContext.getParameter ("Reason")';
Invnum string = pageContext.getParameter ("InvoiceNumber");
String status = "";
String ValidationDesc ="";
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl) getTransaction ();
Try
{
String sql_qry = "BEGIN WEPIS_CM_DM_PKG. WEPIS_CM_RAISE_VALIDATION (P_CM_REASON =>: 1, P_INVOICE =>: 2, P_VALDIDATION_S "+)
"(TS =>: 3, P_VALDIDATION_DESC =>: 4); END; « ;
OracleCallableStatement sqlstmt = (OracleCallableStatement) oadbtransactionimpl.createCallableStatement (sql_qry,-1);
sqlstmt.setString(1,crreason);
sqlstmt.setString(2,invnum);
sqlstmt.registerOutParameter(3,Types.CHAR);
sqlstmt.registerOutParameter(4,Types.VARCHAR);
sqlstmt. Execute();
status = sqlstmt.getString (3);
ValidationDesc = sqlstmt.getString (4);
If ("S".equals (status))
{
submitbean.setRendered (true);
}
on the other
{
submitbean.setRendered (false);
}
}
catch (SQLException sqlexception)
{
throw OAException.wrapperException (sqlexception);
}
catch (System.Exception Exception)
{
throw OAException.wrapperException (exception);
}
Concerning
S.Asia
-
the output directory is not found
I get "the output directory is not found. Please update and try again. "I want to just post my host and I get the dialog box. I recorded it in different places and I always get the dialog box. What can I do?
It was recorded in the folder called with ' / ' has changed to '_' and now I can publish, so weird. It didn't happen with edge of adobe. Is it possible to apply acceleration and on board where we had a couple of options with the click of a button?
Maybe you are looking for
-
Satellite NB10T - failed to update Windows 8
NB10t satellite is fairly recent and has just this message when you try to start "failure of Windows updates are preparing to retry don't turn off your computer. This can stay for hours and it happens quite often. Can anyone suggest what this can be?
-
Satellite L50 - A - bad BIOS in the download section
HelloI downloaded the update to the bios for my laptop, L50-A-165http://www.Toshiba.PT/laptops/satellite/satellite-l50-a/satellite-l50-a-165 The update indicates that bios model doesn t match the downloaded rom is for model vg10st while I vg10s. Can
-
Why we need spend version of catalogue of interconnection fabric
Please let me know why and when do we need to upgrade the version of catalogue of interconnection fabric? What is the difference between the version or the version firmware update catalog. Fabric catalog version upgrade will be all risk on IFS, what
-
Windows 8 Upgrade Wizard does not pass the payment
Hi, I am looking to buy windows 8 the wizard upgrade and it won't pass the part payment, for example if I want to pay with a credit card, I fill in everything and when I click Next nothing happens, same thing if I try to use paypal, I have done every
-
Hi all We have a primary and secondary headquarters in the United Kingdom and then larger branches in Europe and the United States. Total number of users is ~ 2500 What we're trying to do is to deploy a main node of admin services, monitoring and pol