Reading contents of a BLOB datatype having more than 4000 characters.
Hi,
I am unable to read contents of a column having BLOB datatype.I tried using ult_raw.cast_varchar2(Col_name) procedure,but since varchar2 has a size limit of 4000 bytes,complete contents are not visible.
Pl. suggest some way to view the contents.
Regards,
Saket Bansal
In the link that you mentioned a procedure is used that gets the length first then loops through if length is greater than 32760.
I mean to say can user get the output in a single SQL query e.g.
select utl_raw.cast_to_varchar2(column_name) from table_name;something like this for bytes greater than 4000 bytes.
----- Read your reply a bit late thanks.
Edited by: Avi on Mar 2, 2009 1:21 AM
Similar Messages
-
Cannot insert more than 4000 characters using PL/SQL SP to LONG columns
I have created a stored procedure which will insert more than 4000 characters in a table having long column.
The stored procedure body is as follows :
CREATE OR REPLACE PROCEDURE INSERTTOTEST(P_ZUNIQUEID IN VARCHAR2,P_LONGVAL IN LONG)
AS
BEGIN
insert into CLOBVALUESHOW(zuniqueid, longval) VALUES (p_zuniqueid, p_longval) ;
COMMIT;
END INSERTTOTEST;
When I use the RPAD function as below, it executes without any error :
EXEC INSERTTOTEST('ABCD123',rpad('',32000,'*'))*
But when I run with real-time values like the following string value :
'[ERROR] [JTA_Command_Insert_tCatalog]Error invoking Transaction Command action: JTATransactionCommand - A SQL Command Exception occured against JNJ_MDD_OCD_CPL_DS with the following command BEGIN INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1988211','09','ALB','33','NA','0','','','','ALB','8','522','305','710','50','17','208','165','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0'); INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1988211','09','ALB','33','NA','0','','','','ALB','8','522','305','710','50','17','208','165','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0'); INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('8257289','67','GGT','15','NA','0','','','','GGT','8','543','305','710','50','21','323','250','','','SP','1','0','','0','0','0','0','0','2','0','0','0','2','0','0'); INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1513209','12','PHOS','33','11','12','','','','PHOS','8','507','305','710','50','11','323','262','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0'); INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1513209','12','PHOS','33','11','12','','','','PHOS','8','507','305','710','50','11','323','262','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0'); INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1513209','12','PHOS','33','11','12','','','','PHOS','8','507','305','710','50','11','323','262','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0'); INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1450261','03','CA','33','NA','0','','','','Ca','8','506','305','710','50','11','323','262','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0'); INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1450261','03','CA','33','NA','0','','','','Ca','8','506','305','710','50','11','323','262','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0'); INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1450261','03','CA','33','NA','0','','','','Ca','8','506','305','710','50','11','323','262','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0'); INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1513209','12','PHOS','33','11','12','','','','PHOS','8','507','305','710','50','11','323','262','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0'); INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, tCatalog_SAPImport.StoreTemp, tCatalog_SAPImport.CartonCode, tCatalog_SAPImport.GrossLeakLimit, tCatalog_SAPImport.LeakLimit, tCatalog_SAPImport.CompValue, tCatalog_SAPImport.ProductType,tCatalog_SAPImport.CheckWeighHi, tCatalog_SAPImport.CheckWeighLo, tCatalog_SAPImport.SO_MASK, tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1450261','03','CA','33','NA','0','','','','Ca','8','506','305','710','50','11','323','262','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0');'*
I get the error -
Error starting at line 1 in command:
exec P_TESTCLOB(6, '[ERROR] [JTA_Command_Insert_tCatalog]Error invoking Transaction Command action: JTATransactionCommand - A SQL Command Exception occured against JNJ_MDD_OCD_CPL_DS with the following command BEGIN INSERT INTO tCatalog_SAPImport( tCatalog_SAPImport.CatalogNo, tCatalog_SAPImport.SONumber, tCatalog_SAPImport.ChemName, tCatalog_SAPImport.RH, tCatalog_SAPImport.ExpireMonth, tCatalog_SAPImport.SlidesPerCart, tCatalog_SAPImport.IDEXX_PART_NBR, tCatalog_SAPImport.TOP_FOIL_MATL_NBR, tCatalog_SAPImport.BTM_FOIL_MATL_NBR, tCatalog_SAPImport.AltChemName, ………..tCatalog_SAPImport.CAL_CURVE_PFX, tCatalog_SAPImport.PROD_INP_TYP, tCatalog_SAPImport.CTN_TUBE, tCatalog_SAPImport.SLIDE_STYLE, tCatalog_SAPImport.PROD_DESIG, tCatalog_SAPImport.SFM_AUD_RT, tCatalog_SAPImport.SPL_RT, tCatalog_SAPImport.FIRST_SLIDES_REM, tCatalog_SAPImport.SPL_FRONT, tCatalog_SAPImport.SPL_REAR, tCatalog_SAPImport.BARCODE_TYP, tCatalog_SAPImport.CHK_WEIGH_AIM, tCatalog_SAPImport.FOIL_TYP, tCatalog_SAPImport.CART_CLIP_PRES, tCatalog_SAPImport.TOP_LBL_TYP, tCatalog_SAPImport.FREEZER_MTH, tCatalog_SAPImport.OVERAGE_MTH) VALUES('1450261','03','CA','33','NA','0','','','','Ca','8','506','305','710','50','11','323','262','','','SP','1','0','','0','0','0','0','0','2','0','0','0','1','0','0');' *(the statement continues, I have trimmed it as it is not possible that amount of length in the forum. )*
Error report:
ORA-06550: line 1, column 1398:
PLS-00103: Encountered the symbol "1988211" when expecting one of the following:
) , * & = - + < / > at in is mod remainder not rem =>
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
Can anyone tell me why I am getting this error executing the same STORED PROCEDURE while inserting into the LONG column but when using RPAD functions for executing the same STORED PROCEDURE its not happening ?>
But then why will the problem happen with this long string ?
>
You don't have a 'long string'. You have a lot of single-quoted strings combined with some unquoted strings.
There are embedded singel quotes in what you call 'this long string'.
Try using a different string delimiter so that the quotes do not cause a problem.
You can use an exclamation point ('!') since there is none in the text you provided.
Here is an example of what will not work because there is one embedded single quote
'name LIKE '%DBMS_%%'This is the same value using exclamation as the delimiter - this works because there is no exclamation in the string
q'!name LIKE '%DBMS_%%'!'1. q must be the first character
2. ' (single quote) must be the next character
3. ! (or any delimiter you choose) is the next character
4. abcdefg. . . -- this is your string that can include single quotes but not an exclamation point
5. ! is the next to last character - must be the same delimiter used as the third character
6. ' (single quote) is the last character
See the 'Text Literals' section of the SQL Reference for more examples
http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements003.htm
Note that this one will not work because the string includes the percent
This is the same value using exclamation as the delimiter - this works because there is no exclamation in the string
q'%name LIKE '%DBMS_%%'%' -
Displaying more than 4000 characters
Hi
I have a report which would display a CLOB field having text of length around 32000 characters.
I tried to use DBMS_LOB.SUBSTR(<field_name>,32000,1) on the query so that it shows the text at least till 32000 characters on the report but it keeps returning an error ORA-06502 PL/SQL: numeric or value error string - character string buffer too small whenever it is more than 4000 characters in that particular field.
Can anyone pls suggest any solution ASAP?
Thanks
ArnabYou can split your clob in varchar2 4000 drop table tab1;
create table tab1 (
clsplit_id number(10) NOT NULL,
clsplit_type1val CLOB NULL,
clsplit_type2val CLOB NULL
drop type some_list;
drop type my_t;
create type my_t as object
id1 number,
clob_type number,
no_clob_lines number,
clob_line number,
clob_data varchar2(80)
show errors
create type some_list as table of my_t
show errors
insert into tab1 values(1, 'a0123456789b0123456789c0123456789d0123456789e0123456789f0123456789leftover',
'a9876543210b9876543210c9876543210d9876543210e9876543210f9876543210leftover');
insert into tab1 values(2, '0aaaaaaaaaa1bbbbbbbbbb2cccccccccc3dddddddddd4eeeeeeeeee5ffffffffff',
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
insert into tab1 values(3, 'first has data, second null', null);
insert into tab1 values(4, null, 'first null second has data');
insert into tab1 values(5, 'short lob', 'short lob');
commit;
create or replace function some_func return some_list pipelined is
num_allowed_chars number := 4000;
clob1_len number;
clob2_len number;
loop_counter number;
col_name varchar2(100);
current_line number;
i integer;
out_rec my_t := my_t(NULL,NULL,NULL,NULL,NULL);
begin
for c1 in ( select clsplit_id, clsplit_type1val, clsplit_type2val from tab1 )
loop
-- get first clob
if c1.clsplit_type1val is not null then
clob1_len := dbms_lob.getlength(c1.clsplit_type1val);
if clob1_len > num_allowed_chars then
for i in 1..ceil(clob1_len/num_allowed_chars) loop
out_rec.id1 := c1.clsplit_id;
out_rec.clob_type := 1;
out_rec.no_clob_lines := ceil(clob1_len/num_allowed_chars);
out_rec.clob_line := i;
out_rec.clob_data := substr(c1.clsplit_type1val,( i * num_allowed_chars ) - num_allowed_chars + 1,num_allowed_chars);
pipe row(out_rec);
end loop;
else
out_rec.id1 := c1.clsplit_id;
out_rec.clob_type := 1;
out_rec.no_clob_lines := 1;
out_rec.clob_line := 1;
out_rec.clob_data := c1.clsplit_type1val;
pipe row(out_rec);
end if;
end if;
-- get second clob
if c1.clsplit_type2val is not null then
clob2_len := dbms_lob.getlength(c1.clsplit_type2val);
if clob2_len > num_allowed_chars then
for i in 1..ceil(clob2_len/num_allowed_chars) loop
out_rec.id1 := c1.clsplit_id;
out_rec.clob_type := 2;
out_rec.no_clob_lines := ceil(clob2_len/num_allowed_chars);
out_rec.clob_line := i;
out_rec.clob_data := substr(c1.clsplit_type2val,( i * num_allowed_chars ) - num_allowed_chars + 1,num_allowed_chars);
pipe row(out_rec);
end loop;
else
out_rec.id1 := c1.clsplit_id;
out_rec.clob_type := 2;
out_rec.no_clob_lines := 1;
out_rec.clob_line := 1;
out_rec.clob_data := c1.clsplit_type2val;
pipe row(out_rec);
end if;
end if;
end loop;
return;
end;
show errors
select * from
table(select some_func() from dual)
order by 1,2,4; -
In the Oracel Web Application Server 4.0 documment, it says
about owa_text.vc_arr :Type vc_arr is table of varchar2(32767)
index by binary_integer.
I amusing PL_SQL with Oracle8i and OWA4.0 web server.I want to
use owa_text.vc_arr to pass the multple line texts in my form.
If the text length is less than 4000 characters, everything works
fine.However when the texts are longer than 4000 characters but
less than the max length 32767 characters, I got this error
message:
OWS-05101: Execution failed due to Oracle error 2005
ORA-02005: implicit (-1) length not valid for this bind or define
datatype.
Owa_text.vc_arr is supposed to handle the string with more
than 4000 characters, is it true? Could anyone tell me why? Any
help will be greatly appreciated!!!
Thanks very much.
Helena Wang
Here is the pl_sql procedure to create my form:
PROCEDURE myform
IS
BEGIN
htp.p('
<form action="'||service_path||'helena_test.saveform3"
method=post>
<input type=hidden name=tdescription value="X">
Input1: <textarea name=tdescription rows=50 cols=70
WRAP=physical></textarea>
Input2: <textarea name=tdescription rows=50 cols=70
WRAP=physical></textarea>
<input type=submit name=WSave value="Save">
</form>
END;
/***** here is the pl_sql procedure which I use to save the
form***/
procedure saveform3(tdescription in owa_text.vc_arr,
WSave in varchar2 default 'No')
is
len pls_integer;
begin
for i in 2..tdescription.count loop
len := length(tdescription(i));
htp.p(len);
htp.p(tdescription(i));
end loop;
end;Helena, I think you might get a better response either from the SQL-PL/SQL forum, or perhaps the Portal Applications forum - both of these tend to have folks very familiar with PL/SQL and the OWA packages.
This forum is on Web services based on SOAP, WSDL and UDDI. These can be PL/SQL based but typically don't use the mod_psql or OWA web solution.
As a pointer, I suspect you may already be familiar with, but just in case, you can always take a look at chapter 3 of the OAS documentation, "Developer's Guide: PL/SQL and ODBC Applications" where they go through a number of examples using parameters. See:
http://technet.oracle.com/doc/appsrvr4082/guides/plsql.pdf
Hope this or folks from the other list can help.
Mike. -
I am using PL_SQL with Oracle8i and OAS 4.0 web server.I want to
use owa_text.vc_arr to pass the inputs in serval text areas in the form on a web application.
If the input string length is less than 4000 characters, everything works fine.However when the strings are longer than 4000 characters but less than the max length 32767 characters, I got this error message:
OWS-05101: Execution failed due to Oracle error 2005
ORA-02005: implicit (-1) length not valid for this bind or define datatype.
In the Oracle Application Server 4.0 documment, it says
about owa_text.vc_arr :Type vc_arr is table of varchar2(32767)
index by binary_integer. It means that owa_text.vc_arr can handle multiple strings and each string can have up to 32767 single byte characters, is it right?
Owa_text.vc_arr is supposed to handle the string with more
than 4000 characters, is it true? Could anyone tell me why? Any
help will be greatly appreciated!!!
Thanks very much.
Helena Wang
Here is the pl_sql procedure to create my form on the web:
PROCEDURE myform
IS
BEGIN
htp.p('
<form action="'||service_path||'helena_test.saveform3"
method=post>
<input type=hidden name=tdescription value="X">
Input1: <textarea name=tdescription rows=50 cols=70
WRAP=physical></textarea>
Input2: <textarea name=tdescription rows=50 cols=70
WRAP=physical></textarea>
<input type=submit name=WSave value="Save">
</form>
END;
/***** here is the pl_sql procedure which I use to save the
form***/
procedure saveform3(tdescription in owa_text.vc_arr,
WSave in varchar2 default 'No')
is
len pls_integer;
begin
for i in 2..tdescription.count loop
len := length(tdescription(i));
htp.p(len);
htp.p(tdescription(i));
end loop;
end;The maximum size of a VARCHAR2 field in Oracle 8i is 4000 bytes.
you'll ned to use a LOB type (or LONG if you prefer the old way) -
Dataype for more than 4000 characters
Hello,
I ve got an Oracle 9i Database with an Table which has an Collumn defined as varchar2.
Now I found, that's still not enough for my application.
I tried to delete the Table and switch the Data Type to long. Other than expected I'm still not able to insert more than 4000 characters.
Any ideas?
ThomasHi Thomas,
You can look at the sample based on LOB Datatype at this location.
http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.htm
There is a method called 'loadSamples' in the source file of this sample(http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/LOBSample.java.html)
This is the way you insert data into a BLOB or CLOB.
You can't directly insert data > 4000 characters in a BLOB or CLOB. you need to first create an empty BLOB or CLOB and then insert data into it.
Regards,
Anupama -
Writing to db more than 4000 characters
Hi, i want to store a text with more than 4000 characters in an oracle database.
i can't use varchar2(4000)
what should i use?
blob?
clob?there is some kind of a problem here
a want to store a text with 29212 characters, but there is an error message saying, data size is greater than the maximum value of this type...
this is an sqlexception -
Column with more than 4000 characters
Hi,
Version: 10.2.0.4.0
I have a requirement to display more than 4000 characters (clob, long data type) through sql.
Though this can be achieved through pl/sql, I am not able to get the output in sql statements. Is it possible to get this done through sql?
I can use intermediate pl/sql processing if needed.
Thanks for your help.Preta wrote:
Though this can be achieved through pl/sql, I am not able to get the output in sql statements. Is it possible to get this done through sql?Yes, what did you try? - Hopefully not LONG
SQL> drop table t purge;
Table dropped.
SQL> create table t (c clob);
Table created.
SQL> insert into t values (rpad(to_clob('x'),4001, 'x'));
1 row created.
SQL> set long 5000
SQL> set pages 100
SQL> select c from t;
C
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x
SQL>Regards
Peter -
Insert more than 4000 characters using sql plus
I have a SQL script that creates a database. The problem is that some of the fields are longer than 4000 characters in the INSERT statement and Oracle doesn't seem to like it.
The field is a clob and works fine in the application (i.e. I can insert more than 4000 characters using the app) - how do I achieve this in a SQL script?
Any help is much appreciated.
Cheers,
SteveHi,
This pl/sql block works absolutely fine in SQL*Plus inserting > 4000 characters into clob column:
declare
l_str varchar2(8000);
l_str1 varchar2(2400) := 'first part of the verly long string...';
l_str2 varchar2(2400) := 'second part of the verly long string...';
begin
l_str := l_str1 || l_str2;
insert into tmpl values (l_str);
end;
So, you'll have to replace inserts with pl/sql blocks in your script.
Tested in Oracle 8.1.7.0.0
Regards,
Andrew Velitchko
BrainBench MVP for Developer/2000
http://www.brainbench.com -
Using in clause having more than 4000 chars in a VO.
Hi Experts,
JDEV version 11.1.1.5.0
I have a problem passing a bind variable having length of more than 4000 chars in ADF for use in a IN clause.
For e.g the query is
select user_id from employees where user_name in (
SELECT column_value
FROM TABLE (CAST (in_list_char (nvl( 'apple,oranges',user_name) ) AS ChartableType)) A)
in_list_char is function returning an array of type ChartableType.
ChartableType is a type
create or replace TYPE "CHARTABLETYPE" as table of varchar2(4000);
It works if the bind value that I pass is of length less than 4000 chars.
Anything higher it breaks and throws ORA-01460: unimplemented or unreasonable conversion requested.
Have even tried changing the ChartableType varchar2 length to 32767..but no luck.
Any help would be appreciated.Hi Timo,
I am using a in clause as the value that I pass as a bind variable is not stored anywhere in the db for me to have a join or a subselect.
It's a comma separated string (comma separated user names) for which I would need to check against the employee table to fetch the user_id's .
An alternative would be to store those values in temp table and have a join.
But then I was trying to find an alternative , either having a OR clause or UNION dynamically appended to my VO
Any help is much appreciated. -
SQ01 Output fields having more than 255 characters
Hello,
I need to show query output more than 255 charaters but system is not allowing
Here is the Error message:
List is wider than 255 characters (generation not possible)
I used SQ01 as t-code to create query.
How can i show my output more than 255 characters
ThanksRefer SAP Note 857823, ALV grid cannot display more than 128 characters per field and will truncate all the characters beyond if it's an ABAP program
From my experience it will not display the field at all in SQ01.
You need to write an abap program and split the field into two fields of length 128 and display side by side.
Work around: If you cannot write abap program uncheck (no display in query) that field in SQ02 and generate it. Execute your query and copy the key field use se16n to input in the key fields and use import to excel sheet function to get the required data. -
Need ouput more than 4000 characters
Hi , how to create a script that fetches more than 4000 charaters in the ouput
declare your pl/sql variable as varchar2(32767) which is the maximum and then you can select that amount.Not so fast Blu ;)
SQL> create or replace function f
return varchar2
as
begin
return lpad ('x', 32767, 'x');
end f;
Function created.
SQL> exec dbms_output.put_line(length(f))
32767
PL/SQL procedure successfully completed.
SQL> select length (f) from dual
select length (f) from dual
Error at line 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "MICHAEL.F", line 5To SELECT more than 4000 chars you'll always need a CLOB .. -
FUNCTION returning more than 4000 characters
I am calling the below function from a view, and function is failing because it returning more than 4000chars.
An I know when the return type is varchar2 it cannot return more than 4000 chars.
It's working fine when I use CLOB for the return type. Is there any other better option to handle this err.
CREATE OR REPLACE FUNCTION FN_CONCATENATE_COMMENTS (
P_CASENO IN PATIENT_DET.CASE_NO%TYPE,
P_POLICY IN PATIENT_DET.POLICYNO%TYPE
RETURN VARCHAR2
AS
V_TEMP VARCHAR2(300);
V_COMMENT VARCHAR2(30000);
CURSOR FETCHCOMMENT IS
SELECT TO_CHAR (C.CREATED_TS,'mm/dd/yyyy hh:mi:ss AM - ')|| C.DOC_COMMENT_DESC DOC_COMMENT_DESC
FROM TREATEMENT_DET C
WHERE C.CASE_CD = P_CASENO AND C.POLICY_N0 = P_POLICY
ORDER BY C.CREATED_TS ;
BEGIN
OPEN FETCHCOMMENT;
LOOP
FETCH FETCHCOMMENT INTO V_TEMP;
EXIT WHEN FETCHCOMMENT%NOTFOUND;
V_COMMENT := V_COMMENT ||' '|| TRIM(V_TEMP) ||' ';
END LOOP;
CLOSE FETCHCOMMENT;
RETURN V_COMMENT;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE('SYSTEM ERROR PLEASE CONTACT DBA ' || SQLERRM);
END FN_CONCATENATE_COMMENTS;HI
Welcome to the forum!
try this please.
-- IT IS NOT TESTED --
CREATE OR REPLACE FUNCTION FN_CONCATENATE_COMMENTS (
P_CASENO IN PATIENT_DET.CASE_NO%TYPE,
P_POLICY IN PATIENT_DET.POLICYNO%TYPE
RETURN VARCHAR2
AS
V_TEMP VARCHAR2(300);
V_COMMENT CLOB;
CURSOR FETCHCOMMENT IS
SELECT TO_CHAR (C.CREATED_TS,'mm/dd/yyyy hh:mi:ss AM - ')|| C.DOC_COMMENT_DESC DOC_COMMENT_DESC
FROM TREATEMENT_DET C
WHERE C.CASE_CD = P_CASENO AND C.POLICY_N0 = P_POLICY
ORDER BY C.CREATED_TS ;
BEGIN
OPEN FETCHCOMMENT;
LOOP
FETCH FETCHCOMMENT INTO V_TEMP;
EXIT WHEN FETCHCOMMENT%NOTFOUND;
V_COMMENT := V_COMMENT ||' '|| TRIM(V_TEMP) ||' ';
END LOOP;
CLOSE FETCHCOMMENT;
RETURN DBMS_LOB.SUBSTR(V_COMMENT ,32000,1);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE('SYSTEM ERROR PLEASE CONTACT DBA ' || SQLERRM);
END FN_CONCATENATE_COMMENTS;Edited by: Mahir M. Quluzade on Apr 22, 2011 1:45 PM
Edited by: Mahir M. Quluzade on Apr 22, 2011 1:46 PM -
How to store more than 4000 characters in a table
I have a requirement to store 4000+ character string in the table. CLOB and BLOB does not allow me as it has limitations of 4000 characters.
Any suggestions please.declare
l clob;
begin
l:= '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';
update table_name
set column_name = l;
commit;
end;
This works fine.
We are using Pentaho to insert records so using pl/sql is not appropriate. -
How to Handle the Strings more than 4000 characters in OBIEE 11g
Hi Folks,
I have a derived column in RPD where there are like bunch of case statements which involve the columns from 2 or more dimensions. Now I am getting an error ORA-01489: result of string concatenation is too long at OCI call OCIStmtFetch.
How can we handle this in OBIEE? I have tried the below option that is provided in the below link but I think this work only if it is a single column but in my case it is derived column.
Please suggest.
Thanks,
BharathBharath,
Can you try using CLOB function.Check the below URL.Not sure if it helps you.
sql - LISTAGG function: &quot;result of string concatenation is too long&quot; - Stack Overflow
Thanks,
Sasi Nagireddy.
Maybe you are looking for
-
Using Mac Snow Leopard 10.6.7 Current Firefox: 3.6.18 Trying to update latest version: 5.0.1 This seems quirky. In Updating a newer version of Firefox is should seem obvious that the existing firfox executable would be replaced by the newer version ?
-
I'm trying to open this application called Embrilliance. I keep getting and error and the application quits and won't open. I'm using OS Yosemite. I have the same program downloaded on my boyfriend's computer and he's also using OS Yosemite and the a
-
One of our sites is having a strange issue when saving to a network location in Powerpoint. I'm not sure it's a Powerpoint problem, but it's a place to start... When saving a ppt to a mapped network drive (the client is running Windows 8 / Office 20
-
Calling a .m file from inside a mathscript node
hello all i am hoping someone can help me out, I am in the process of converting our version 7.11 matlab node vi's to mathscript (I hope) AND I HAVE RUN INTO AN ISSUE. we have a very simple matlab script that bundled the data and sent it to another m
-
IPad mini's sound is torturous !!!!! HELP ME PLS
The sound on my daughter's iPad mini is flat,Scratchy & distorted. is there anything I can do to fix it? What could it be? ***Sidenote*** We took her iPad in to Apple & this is a "New" replacement iPad,Only a few months old (By new I mean refurbished