How can a function returning character length greater than 4000 be selected in SQL
Hi,
I want to know if there is a way to write a select query on a function call which returns a varchar of more than 4000 characters.
CREATE OR REPLACE FUNCTION FUNC1
RETURN VARCHAR2
IS
str VARCHAR2(32767);
BEGIN
str := <some string greater than 4000 char>;
RETURN str;
END;
SELECT FUNC1 from dual; ---- This gives an PL/SQL numeric or value error. Character string buffer too small.
Is there any way to resolve this?
Thanks
32767 is not default. The default is still 4000 for VARCHAR2. You need to set the initialization parameter MAX_STRING_SIZE= EXTENDED for 32767.
Text from Oracle documentation
Extended Data Types
Beginning with Oracle Database 12c, you can specify a maximum size of 32767 bytes for the VARCHAR2, NVARCHAR2, and RAW data types. You can control whether your database supports this new maximum size by setting the initialization parameter MAX_STRING_SIZE as follows:
If MAX_STRING_SIZE = STANDARD, then the size limits for releases prior to Oracle Database 12c apply: 4000 bytes for the VARCHAR2 and NVARCHAR2 data types, and 2000 bytes for the RAW data type. This is the default.
If MAX_STRING_SIZE = EXTENDED, then the size limit is 32767 bytes for the VARCHAR2, NVARCHAR2, and RAW data types.
Similar Messages
-
How can a function return a constant reference to an object
how can a function return a constant reference to an object so that the calling party dont have rights to change it.
like this example
class obj = somefunc();
obj.changeit(); // this line lust give error saying that its read only..
somefunc()
return criticalobj;
in c++ we can achieve this by using the const pointer to the object.. how can we do this in java???arun160411 wrote:
in c++ we can achieve this by using the const pointer to the object.. how can we do this in java???Of course the first thing anyone learns about const pointers is how to cast away constness, so this is completely useless, up there with the chastity movement's thong underwear with the stop sign on it. If you can read this, you're too close! -
How can we increase the character length of SAP batch???
HI MM guru's,
we want to increase the character length for the SAP batch i.e raise it to 14 characters. how can we posibbly do that live.
Regards,
Sameer Jalalthanks,
but any alternative?
Regards,
Sameer Jalal -
How can I type the symbol for greater than or equal to
I wish to type the symbol for greater than or equal to in an equation but my keyboard does not have such a symbol
Mathematical Operators - 2200-22FF
:≥ &#x2265; 8805 GREATER-THAN OR EQUAL TO
:http://www.sql-und-xml.de/unicode-database/mathematical-operators.html
If this is for HTML use &ge; to create ≥
you can bring up CharMap (charmap.exe)
go down 11 windows (of 10 rows each) and it is on bottom row
You should be able to type as Alt+8805 on the Numeric keypad (not number row)
or on laptop with NumLock off as Fn+Alt+8805
but that is not working for me and I verified that hex(x2265) and decimal (8805)
values are equivalent. -
How can i compare the character fields?
I have a requirement to compare the character fields .
I have to compare the 2 character fields of a table CDPOS
As follows .
If CDPOS-VALUE-OLD GT CDPOS-VALUE-NEW
Populate REDATED = YES.
ELSE
Populate REDATED = NO.
My doubt here is how can we compare the character fields.?
When I do Extended Program Check: I am getting error like this ?
Greater than/less than comparisons with character type operands may not be portable
Please give me idea .
Thanks ,
Suresh Kumar.Hi suresh,
DATA : a TYPE char10 VALUE 'DBCD',
b TYPE char10 VALUE '4234',
c TYPE char10 VALUE '3456',
d TYPE char10 VALUE 'ADA',
e TYPE char10 VALUE '234567'.
IF b GT c. "this case checks for numeric values
WRITE :/ 'B is bigger'.
ELSE.
WRITE :/ 'C is bigger'.
ENDIF.
IF a GT d. "this case checks for alphbetical order
WRITE :/ 'A is bigger'.
ELSE.
WRITE :/ 'D is bigger'.
ENDIF.
IF strlen( a ) GT strlen( d ). "this case checks for no of chars
WRITE :/ 'A is bigger'.
ELSE.
WRITE :/ 'D is bigger'.
ENDIF.
IF a GT c. "this case first alph then numerics
WRITE :/ 'A is bigger'.
ELSE.
WRITE :/ 'D is bigger'.
ENDIF. -
How can I increase the character limit of my text messages for Droid Maxx 4.4?
How can I increase the character limit of my text messages for Droid Maxx 4.4?
Send as a MMS.
-
How can I get return to 10.6? Uninstall yosemite
How can I get return to 10.6? Uninstall yosemite
Clean Install of Snow Leopard
Be sure to make a backup first because the following procedure will erase
the drive and everything on it.
1. Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came
with your computer. Insert the disc into the optical drive and restart the computer.
After the chime press and hold down the "C" key. Release the key when you see
a small spinning gear appear below the dark gray Apple logo.
2. After the installer loads select your language and click on the Continue
button. When the menu bar appears select Disk Utility from the Utilities menu.
After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
size.) Click on the Partition tab in the DU main window. Set the number of
partitions to one (1) from the Partitions drop down menu, click on Options button
and select GUID, click on OK, then set the format type to MacOS Extended
(Journaled, if supported), then click on the Apply button.
3. When the formatting has completed quit DU and return to the installer. Proceed
with the OS X installation and follow the directions included with the installer.
4. When the installation has completed your computer will Restart into the Setup
Assistant. After you finish Setup Assistant will complete the installation after which
you will be running a fresh install of OS X. You can now begin the update process
by opening Software Update and installing all recommended updates to bring your
installation current.
Download and install Mac OS X 10.6.8 Update Combo v1.1. -
Can oracle function return more than one value
Hi All
please answer can oracle function return more than one value
need one schenario
regardsCan any function, irrespective of the language, return multiple values?
OF COURSE NOT!!
So why do you think Oracle will now suddenly do it differently than all other languages? Never mind that it is impossible for a function (a unit/module of code) returning a memory address, to return multiple memory addresses. The machine code that does that, has not been yet been designed/implemented.
I am continually amazed that this question is asked. It is about something so fundamental in almost every single 3rd and 4th generation language... something that is taught right at the start... the definition of what a procedure and what a function is.
Sorry, but I simply cannot pull punches on this subject and smooth it over. There is something fundamentally wrong with your training as a programmer if you have to ask such a question about a function.
And whatever programming skills you build on such a foundation, will be seriously lacking.
I kindly suggest that you get back to the very basics of programming - and review and revisit until you fully understand it. There are no shortcuts in becomming a good programmer.
Message was edited by:
Billy Verreynne -
How can i display special character?
how can i display special character that come from DB.
for example i have in field in Table that has this value <Id, r>.
i want to print this value to the html. and replace the <,> to special character."<" is "<"
">" is ">" -
iOS obviously allows only 10 Apps to be Chosen in The "Open in" function. How can I control which Apps ( if more than 10 are installed) can be selected?
I think that is influenced by the order in which the apps are installed on the iPad (I believe that it's the most recent 10 ?) - but as I haven't got more than 10 apps that support any document/file type I can't check.
If you want to able to edit the list, then you could try leaving feedback for Apple : http://www.apple.com/feedback/ipad.html -
Can a function return two values???
Hi guys can a function return more than values?
Or even better return an Object.
ie
public class Tester{
public static Multi getM()
Multi m=new Multi();
m.x="testing";
m.y="new value";
public static void main(String [] args)
Multi mt=getM();
System.out.println(mt.x);
System.out.println(mt.y);
class Multi{
public String x;
public String y;
} -
How can i set the character set ???
hello
now i have the following
Message msg =
new MimeMessage(Session.getDefaultInstance(props, null));
how can i set the character set to be 'windows-1256'
pleaze help if u can
thanks very much
BelalYou have to deal with the NLS_LANG environment variable,it is defined as NLS_LANG=<Language>_<Territory>.<clients characterset> .
Where is your oracle client installed? On the the server machine, where the database resides , on another Unix system or is it a Windows client? On Windows NLS_LANG is directly related to the OS settings and stored in the registry, on Unix NLS_LANG is not set automatically and defaults (if not set) to AMERICAN_AMERICA.US7ASCII. If you are working on UNIX, this could be the reason for disordering. I'm not familiar with Chinese, so I don't know the correct setting , but a good approach would be same setting as on the server.
Metalink note 158577.1 describes NLS_LANG very detailed. -
How can I restore the character viewer?* Changing options in Language/Keyboard Pref does not help...
Tom may be refering to these..
/Users/YourUserName/Library/Preferences/ByHost/com.apple.HIToolbox.12digit Hex#.plist
/Users/YourUserName/Library/Preferences/com.apple.CharacterPaletteIM.plist
/Users/YourUserName/Library/Preferences/com.apple.CharacterPicker.plist -
How can one read a Excel File and Upload into Table using Pl/SQL Code.
How can one read a Excel File and Upload into Table using Pl/SQL Code.
1. Excel File is on My PC.
2. And I want to write a Stored Procedure or Package to do that.
3. DataBase is on Other Server. Client-Server Environment.
4. I am Using Toad or PlSql developer tool.If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
1. Get your DBA to create directory object in oracle using the following command:
create directory TEST_DIR as ‘directory_path’;
Note: This directory is on the server.
2. Grant read,write on directory directory_object_name to username;
You can find out the directory_object_name value from dba_directories view if you are using the system user account.
3. Logon as the user as mentioned above.
Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
function getData(p_filename in varchar2,
p_filepath in varchar2
) RETURN VARCHAR2 is
input_file utl_file.file_type;
--declare a buffer to read text data
input_buffer varchar2(4000);
begin
--using the UTL_FILE in built package
input_file := utl_file.fopen(p_filepath, p_filename, 'R');
utl_file.get_line(input_file, input_buffer);
--debug
--dbms_output.put_line(input_buffer);
utl_file.fclose(input_file);
--return data
return input_buffer;
end;
Hope this helps. -
How can we place a F4 help in a parameter in selection screen
Hi,
How can we place a F4 help in a parameter in selection screen. Can we do add a Process 0n Value request similar to a module pool prg in stadard report program.
sajiHello Saji,
Try below attached report.
Regards,
Naimesh.
Reward, if it is useful..!
REPORT ZTEST_NP_1.
DATA: HELPVAL1 LIKE HELP_VALUE OCCURS 0 WITH HEADER LINE .
DATA: VALUE_TAB LIKE PDTASK-OTEXT OCCURS 2 WITH HEADER LINE.
DATA: VALUE LIKE FEBMKA-BANKN,
GIVEN_VALUE LIKE HELP_INFO-FLDVALUE.
DATA: IT_T005T LIKE T005T OCCURS 0 WITH HEADER LINE,
IT_T002T LIKE T002T OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN: BEGIN OF BLOCK BLK1 WITH FRAME TITLE ABC.
PARAMETERS: P_SPRAS LIKE T002T-SPRAS,
P_LAND1 LIKE T005T-LAND1.
SELECTION-SCREEN: END OF BLOCK BLK1.
INITIALIZATION.
ABC = 'Selection Criteria:'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LAND1.
PERFORM VALUE_REQUEST_LAND1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SPRAS.
PERFORM VALUE_REQUEST_SPRAS.
*& Form VALUE_REQUEST_land1
FORM VALUE_REQUEST_LAND1.
*---- Reading the Screen values.
DATA: LT_DYNPFIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
LV_DYNAME LIKE D020S-PROG,
LV_DYNUMB LIKE D020S-DNUM.
*-------Append field which you want to read from the screen
LV_DYNAME = SY-REPID.
LV_DYNUMB = SY-DYNNR.
LT_DYNPFIELDS-FIELDNAME = 'P_SPRAS'.
APPEND LT_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = LV_DYNAME
DYNUMB = LV_DYNUMB
TABLES
DYNPFIELDS = LT_DYNPFIELDS.
SELECT * FROM T005T
INTO TABLE IT_T005T
WHERE SPRAS = P_SPRAS.
REFRESH: HELPVAL1, VALUE_TAB.
CLEAR: HELPVAL1, VALUE_TAB, GIVEN_VALUE, VALUE.
*---- Append field name for the columns in the help popup
HELPVAL1-TABNAME = 'T005T' .
HELPVAL1-FIELDNAME = 'LAND1' .
HELPVAL1-SELECTFLAG = 'X' . " will return the value on the screen
APPEND HELPVAL1 .
CLEAR HELPVAL1 .
HELPVAL1-TABNAME = 'T005T' .
HELPVAL1-FIELDNAME = 'LANDX' .
HELPVAL1-SELECTFLAG = ' ' .
APPEND HELPVAL1 .
CLEAR HELPVAL1 .
LOOP AT IT_T005T.
VALUE_TAB = IT_T005T-LAND1.
APPEND VALUE_TAB.
VALUE_TAB = IT_T005T-LANDX.
APPEND VALUE_TAB.
ENDLOOP.
GIVEN_VALUE = P_LAND1.
CALL FUNCTION 'HELP_VALUES_GET_WITH_VALUE'
EXPORTING
DISPLAY = SPACE
GIVEN_VALUE = GIVEN_VALUE
IMPORTING
SELECT_VALUE = VALUE
TABLES
FIELDS = HELPVAL1
VALUETAB = VALUE_TAB.
IF NOT VALUE IS INITIAL.
P_LAND1 = VALUE. " Assing value to the parameter
ENDIF.
ENDFORM. " VALUE_REQUEST_land1
*& Form VALUE_REQUEST_SPRAS
FORM VALUE_REQUEST_SPRAS.
REFRESH: HELPVAL1, VALUE_TAB.
CLEAR: HELPVAL1, VALUE_TAB, GIVEN_VALUE, VALUE.
HELPVAL1-TABNAME = 'T002T' .
HELPVAL1-FIELDNAME = 'SPRSL' .
HELPVAL1-SELECTFLAG = 'X' .
APPEND HELPVAL1 .
CLEAR HELPVAL1 .
HELPVAL1-TABNAME = 'T002T' .
HELPVAL1-FIELDNAME = 'SPTXT' .
HELPVAL1-SELECTFLAG = ' ' .
APPEND HELPVAL1 .
CLEAR HELPVAL1 .
SELECT * FROM T002T
INTO TABLE IT_T002T
WHERE SPRAS = SY-LANGU.
LOOP AT IT_T002T.
VALUE_TAB = IT_T002T-SPRSL.
APPEND VALUE_TAB.
VALUE_TAB = IT_T002T-SPTXT.
APPEND VALUE_TAB.
ENDLOOP.
GIVEN_VALUE = P_SPRAS.
CALL FUNCTION 'HELP_VALUES_GET_WITH_VALUE'
EXPORTING
DISPLAY = SPACE
GIVEN_VALUE = GIVEN_VALUE
IMPORTING
SELECT_VALUE = VALUE
TABLES
FIELDS = HELPVAL1
VALUETAB = VALUE_TAB.
IF NOT VALUE IS INITIAL.
P_SPRAS = VALUE.
ENDIF.
ENDFORM. " VALUE_REQUEST_SPRAS
Maybe you are looking for
-
Problem in selection screen validation.
Hi All, I am having the following in the selection screen: PARAMETERS : p_r1 RADIOBUTTON GROUP grp DEFAULT 'X' USER-COMMAND dlvy, p_r2 RADIOBUTTON GROUP grp . SELECTION-SCREEN BEGIN OF BLOCK b1 with frame title text-001. SELECT-OPTIONS:
-
HT2534 even though downloading apps is free y does it ask for payment details
Hey why do i need to enter the payment details although the app is free?? Even though the option none is available do i still need to enter my address?? I just tried downloading an app.. Please help..
-
How to relink clips when FCPX thinks they do not match
FCPX - I have been trying for hours to relink my clips: they are the same yet FCPX says this every time: "The original file didn't have audio, but the new file does." I need to find a way to force relink the clips. my project is too big to start d
-
Any updates to solve the problem?
-
System Specs: Win 2000, Oracle 9.2, Running in High Availability I am really at a loss. I have been on this problem for almost a week now. Primary switches over fine. On Standby I issue the command: alter database commit to switchover to primary with