varchar2 Questions
2
Solved
While I was working with a table containing a BLOB column:
SELECT id FROM table WHERE blob_column LIKE '%something%';
...I got the following error:
ORA-22835: Buffer too small for CLOB to CHAR or...
4
Solved
How do you guys treat empty strings with Oracle?
Statement #1: Oracle treats empty string (e.g. '') as NULL in "varchar2" fields.
Statement #2: We have a model that defines abstract 'table structu...
6
I am on Oracle 10g. In a requirement I need to increase the size of a pl/sql VARCHAR2 variable. It is already at 4000 size. I have read that
in PL/SQL, VARCHAR2 can be up to 32767 bytes. For SQ...
3
Solved
It's currently a VARCHAR2(200) in the database, but it needs to be raised to VARCHAR(1000), so I am attempting to run this script:
ALTER TABLE CONTRACTOR MODIFY
(
NOTE VARCHAR2(1000)
);
Oracle ...
Patmos asked 26/4, 2011 at 13:45
11
I am trying to locate some problematic records in a very large Oracle table. The column should contain all numeric data even though it is a varchar2 column. I need to find the records which don't c...
6
I have the following code which appears to work correctly but it does not display any values for the personCode string. PERSON_CODE is a VARCHAR2 in an Oracle 9i database.
I am using Java SE 1.7 a...
Thermostatics asked 8/7, 2013 at 15:51
7
Solved
Creating Table:
CREATE TABLE test (
charcol CHAR(10),
varcharcol VARCHAR2(10));
SELECT LENGTH(charcol), LENGTH(varcharcol) FROM test;
Result:
LENGTH(CHARCOL) LENGTH(VARCHARCOL)
---------------...
3
Solved
I am trying to convert the format of a varchar2 column from 'DD-MON-YY' to 'DD/MM/YYYY'.
In example: from '01-JAN-16' to '01/01/2016'
In case you can ask or it may help:
'MON' part is in Englis...
4
Solved
I have an Oracle 10g DB and have a VARCHAR2 (2000 Character) column lets name it TEST which can contain numbers in front for example:
test
1test
3test
When I call "... order by TEST asc" or simp...
Quarterstaff asked 10/3, 2011 at 9:46
4
Solved
I am running the following query. But getting ORA-12899. Altough the length of string am trying to insert is 30.
INSERT INTO TABLE1 SELECT * FROM temp_Table1 where LENGTH(column1)=30;
SQL Error: ...
1
Solved
If you need to store strings which are mostly, if not all, less than 4K bytes, is there any negative to using a CLOB datatype over a VARCHAR2 datatype?
From here
A CLOB may be stored in a sepe...
Electrodynamics asked 4/8, 2016 at 20:8
1
Solved
I would like to know the difference between
NLS_NCHAR_CHARACTERSET and NLS_CHARACTERSET settings in Oracle?
From my understanding, NLS_NCHAR_CHARACTERSET is for NVARCHAR data types
and for NLS_CHAR...
Onetime asked 19/4, 2016 at 6:36
6
Solved
I want to know why Oracle needs the size parameter in the definition of the VARCHAR2.
I think that is for constraint. Would it be a better option that oracle takes this parameter as an optional li...
3
Solved
According to official 11g docs
Oracle Database currently treats a character value with a length of
zero as null. However, this may not continue to be true in future
releases, and Oracle recomm...
1
Solved
I have a query that uses the listagg function to get all rows as a comma delimited string to ultimately be shipped to a big text box. I'm getting the following exception:
ORA-01489: result o...
Mckissick asked 3/2, 2015 at 14:34
2
Solved
Suppose you have this procedure:
PROCEDURE f (param VARCHAR2)
IS
var VARCHAR2(10);
BEGIN
var := 'hi';
END f;
I would like to understand why var needs a length specified, but param does not. I...
1
Solved
Table: customers
ID NAME DATATYPE
NUMBER VARCHAR2(100) CLOB
I want to change the DATA column from CLOB to `VARCHAR2(1000)
I have try ALTER TABLE customers MODIFY DATA VARCHAR2 (1000) also
ALT...
1
Solved
I have a varchar2 field and want to split it to array of chars
Like 'ABCDEF' --> 'A' 'B' 'C' 'D' 'E'
How can i convert my Field Values to chars array?
1
Solved
We are migrating some data from sql server to oracle. For columns defined as NVARCHAR in SQL server we started creating NVARCHAR columns in Oracle thinking them to be similar..But it looks like the...
Themis asked 20/8, 2013 at 0:14
5
Solved
I am having a sorting issue with oracle 10g. Not sure if it is specific to 10g or not.
I have the following table:
ID NAME
1 A.1
2 A.3
3 A.4
4 A.5
5 A.2
6 A.5.1
7 A.5.2
8 A.5.10
9 A.5.10...
Tieshatieup asked 24/9, 2012 at 17:35
1
Solved
I have a stored procedure in Oracle Database 10g where my input is a varchar2 but I'm having issues getting it to run when the input string is long (not sure of exact length maybe > 8000).
My th...
Patrimony asked 12/1, 2011 at 23:59
3
Solved
What are the effects of defining a column with VARCHAR2(1000) instead of VARCHAR2(10) in Oracle, when the values are not longer than 10 Byte?
Does the column only take the space really necessary t...
1
© 2022 - 2025 — McMap. All rights reserved.