plsqldeveloper

I keep getting an error next to the return VARCHAR(4)

戏子无情 提交于 2019-12-02 16:50:06
问题 ERROR IS BETWEEN THE VARCHAR2 AND THE (4) seems to be a syntax error. create or replace FUNCTION Employee_exists (p_employee_id IN NUMBER) RETURN VARCHAR2(4); AS BEGIN SELECT employee_id FROM employees WHERE employee_id = p_employee_id; RETURN 'true'; END Employee_exists; 回答1: There are actually two errors: You can't specify the length of the return type in a function or procedure specification ; is a statement terminator, as such it has no place between the return type and AS Your first line

PL/SQL Developer displays does not display Hebrew characters properly

岁酱吖の 提交于 2019-12-02 06:36:21
Hi all, I've uploaded a photo of the way I see dates in PL/SQL Developer, I see question marks instead of the full date (need to look like "02-Aug-2013 13:50:21.663" for instance, as seen on other computers)... If someone have any idea what on my preferences makes it look like this - I'd love to know... Thanks! UPDATE: NLS Parameters: NLS DB Parameters: The issue seems to be due to mismatch between NLS parameters in client and database . For such questions, always remember to post the OS details, DB version up to 4 decimals. To check the the parameter values: SELECT * FROM v$nls_parameters;

How to print SYS_REFCURSOR with PLSQLDeveloper window?

拈花ヽ惹草 提交于 2019-12-01 21:42:56
In the below query how to get IO_CURSOR values in PL/SQL's "SQL Window" DECLARE SOME_VAR_1 VARCHAR2(20); SOME_VAR_2 VARCHAR2(20); SOME_VAR_3 DECIMAL; IO_CURSOR SYS_REFCURSOR; BEGIN SOME_VAR_1 := 'test1'; SOME_VAR_2 := 'test2'; SOME_VAR_3 := 1; IO_CURSOR := NULL; Get_Analysis_Data(p_in_symbol_type => SOME_VAR_1, p_in_symbol => SOME_VAR_2, p_in_isr_id => SOME_VAR_3, isr_main_view => IO_CURSOR); PRINT IO_CURSOR END; If by "SQL Window" you mean SQL*PLUS ,then to print(using PRINT command) the contents of a cursor, you need to declare a bind variable outside the PL/SQL block, assign a value to that

update using for loop in plsql

筅森魡賤 提交于 2019-12-01 18:19:04
i'm having problem updating and insert into below column. Please advise on this. This is the input depnto extra comm ---------------------------- 20 300 NULL 20 300 400 20 NULL NULL 20 500 NULL This is the expected output depnto Extra comm --------------------- 20 300 300 20 300 400 20 NULL NULL 20 500 500 I need to update comm column with extra column on below conditions. If comm Is null then extra value is updated to comm. If comm Is not null, no need to update, If both are null, leave as null, if comm column has a value no need to overwrite. My program is below. Even I need to keep track

Extract code or script of database objects

。_饼干妹妹 提交于 2019-12-01 12:48:13
问题 I need to extract code(script) from all my functions, procedures, packages, views and tables, so that when I move to production I could run the script to create all the objects. While developing I did not take script backup of all database objects. What is the best way to extract code or script? Any suggestion or help is highly appreciable. Thanks 回答1: You do use a version control system don't you? Please do. Failing that you can use the system function dbms_metadata.get_ddl, which will

How to sent email in Oracle PL/SQL package to multiple receivers?

爷,独闯天下 提交于 2019-12-01 11:07:48
How to sent email in Oracle PL/SQL package to multiple receivers? I have below pl/sql procedure within an oracle package, it works only for one receiver. I need to improve it functional to let it can send email to multiple receivers at same time like "To: David Festool; Peter Makita; John Dewalt". Any body can help me out will be great appreciate! Please provide me modified code. procedure email(p_recip in varchar2, p_subject in varchar2, p_message in varchar2) is c utl_smtp.connection; msg varchar2(4000); procedure send_header(name in varchar2, header in varchar2) as begin utl_smtp.write_data

PL SQL Auto Commit on execution

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 03:05:55
问题 I am very new to the PL/SQL programming. I tried to write a pl/sql procedure with some DML Statements(insert) inside the code. I am not doing any explicit commit after performing insert operations in the pl/sql code. But the transaction is getting commited after executing pl/sql procedure. is this the default behaviour? How can i control this? 回答1: DML statements (INSERT/DELETE/UPDATE/MERGE) don't do an auto commit in PL/SQL. DDL statements do commit (ALTER/CREATE etc) and this will happen

PLSQL read value from XML?

走远了吗. 提交于 2019-12-01 02:58:31
问题 I have a string with XML code, I want to extract a value from it in PL/SQL to a variable. The XML is very simple and will not be different than this: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <SOAProxyResponse xmlns="http://tempuri.org/"> <SOAProxyResult> There is 23142 Files! </SOAProxyResult> </SOAProxyResponse> </s:Body> </s:Envelope How I can get the value " There is 23142 Files! " in the example above into a variable? 回答1: You can use the EXTRACTVALUE

PL/SQL developer import dump

◇◆丶佛笑我妖孽 提交于 2019-11-30 20:29:14
I have a dump file which includes two tables. Now I need to import this dump file. I was instructed to create two tablespaces beforehands.Now how do I import this dump file to these tablespaces. I'm using PL/SQL developer. You cannot import a dump file from PL/SQL developer. Instead, you have to do it from the command line. Furthermore, you need access to the file system of the database server since you have to put the dump file in a directory directly accessible by Oracle. The tool to import the dump file is called impdp (in earlier version, it was imp ). My experience is that you need

Skipping data fields while loading delimited data using SQLLDR

我的未来我决定 提交于 2019-11-30 15:54:35
问题 Consider below scenario: Table T1 (f1, f2, f3); Data files: a|b|c|d w|x|y|z I want to load this data skipping the second field as follow: f1 f2 f3 --- --- --- a d c w z y Would really appreciate your help or any pointer in constructing the control file to achieve this. 回答1: Define the column you want to skip as FILLER. Keep in mind the order of the columns in the control file is typically the order they are in the datafile. If the name matches a column in the table, that's where it will go. .