How to insert data in the clob or xmltype column
When I am inserting to clob or xml type column I get error error on line 2:ORA-01704: string literal too long
INSERT INTO po_clob_tab
values (100,' < TXLife >)
< UserAuthRequest >
UserId < UserLoginName > < / UserLoginName >
< / UserAuthRequest >
< TXLifeRequest >
< TransRefGUID > 0099962A-BFF3-4761-4058-F683398D79F7 < / TransRefGUID >
< TransType tc = "186" > OLI_TRANS_CHGPAR < / TransType >
< TransExeDate > 2008 - 05 - 29 < / TransExeDate >
< TransExeTime > 12:01:01 < / TransExeTime >
< InquiryLevel tc = "3" > OLI_INQUIRY_OBJRELOBJ < / InquiryLevel >
< InquiryView >
< InquiryViewCode > CU186A < / InquiryViewCode >
< / InquiryView >
< ChangeSubType >
< ChangeTC tc = "32" > update / add information about the customer object < / ChangeTC >
<!-TranContentCode tc = 1 (Add)
TC = 2 (Update)
TC = 3 (remove)
->
< TranContentCode tc = "1" > add < / TranContentCode >
< / ChangeSubType >
< OLifE >
< SourceInfo >
Profile Client < SourceInfoName > < / SourceInfoName >
< / SourceInfo >
< id of activity = "Act1" PartyID = "Party1" >
< ActivityStatus tc = "2" > current < / ActivityStatus >
< > 123456 UserCode < / UserCode >
< opened > 2010 - 08 - 17 < / open >
< ActivityCode > CP10001 < / ActivityCode >
< setting >
< description > LastScreenName < / Description >
Create a CP < AttachmentData > < / AttachmentData >
< AttachmentType tc = "2" > OLI_ATTACH_COMMENT < / AttachmentType >
< AttachmentLocation tc = "1" > OLI_INLINE < / AttachmentLocation >
< / fixing >
< OLifEExtension VendorCode = ExtensionCode "05" = 'Activity' >
< ActivityExtension >
< SubActivityCode > CP20001 < / SubActivityCode >
< / ActivityExtension >
< / OLifEExtension >
< / activity >
< group id = "Grouping1" >
< household >
< EstIncome > 90000 < / EstIncome >
< / household >
< / group >
< holding id = "Holding1" >
Political < HoldingTypeCode tc = "2" > < / HoldingTypeCode >
< purpose tc = "35" > Accumulation < / purpose >
<>policy
< tc ProductType = "1009800001" > AXA generic network Variable life product < / ProductType >
Plus9 < ProductCode > < / ProductCode >
< PlanName > accumulator Plus 9.0 < / PlanName >
< pension >
< QualPlanType tc = "45" > Qualified < / QualPlanType >
< / pension >
< ApplicationInfo >
< ApplicationJurisdiction tc = "35" > New Jersey < / ApplicationJurisdiction >
< OLifEExtension VendorCode = ExtensionCode "05" = "ApplicationInfo" >
< ApplicationInfoExtension >
< FinancialPlanIInd tc '0' = > false < / FinancialPlanIInd >
< AgentVerifiesOwnersID tc = "1" > True < / AgentVerifiesOwnersID >
< / ApplicationInfoExtension >
< / OLifEExtension >
< / ApplicationInfo >
< FinancialActivity >
< FinActivityType tc = "7" > payment < / FinActivityType >
< FinActivityPct > 10 < / FinActivityPct >
< payment >
< SourceOfFundsTC = "18" tc > Don < / SourceOfFundsTC >
< OLifEExtension VendorCode = ExtensionCode "05" = 'Payment' >
< PaymentExtension >
< FundingDisclosureDetails >
< FundingDisclosureTC tc = "1009800001" > Cash < / FundingDisclosureTC >
< / FundingDisclosureDetails >
< / PaymentExtension >
< / OLifEExtension >
< / payment >
< / FinancialActivity >
< FinancialActivity >
< FinActivityType tc = "7" > payment < / FinActivityType >
< FinActivityPct > 10 < / FinActivityPct >
< payment >
< SourceOfFundsTC tc = "8" > personal loan < / SourceOfFundsTC >
< OLifEExtension VendorCode = ExtensionCode "05" = 'Payment' >
< PaymentExtension >
< FundingDisclosureDetails >
< FundingDisclosureTC tc = "1009800002" > loan < / FundingDisclosureTC >
< / FundingDisclosureDetails >
< / PaymentExtension >
< / OLifEExtension >
< / payment >
< / FinancialActivity >
< FinancialActivity >
< FinActivityType tc = "7" > payment < / FinActivityType >
< FinActivityPct > 10 < / FinActivityPct >
< payment >
< SourceOfFundsTC tc = "10" > back < / SourceOfFundsTC >
< OLifEExtension VendorCode = ExtensionCode "05" = 'Payment' >
< PaymentExtension >
< FundingDisclosureDetails >
< FundingDisclosureTC tc = "1009800003" > political related < / FundingDisclosureTC >
< / FundingDisclosureDetails >
< / PaymentExtension >
< / OLifEExtension >
< / payment >
< / FinancialActivity >
< FinancialActivity >
< FinActivityType tc = "7" > payment < / FinActivityType >
< FinActivityPct > 10 < / FinActivityPct >
< payment >
< OLifEExtension VendorCode = ExtensionCode "05" = 'Payment' >
< PaymentExtension >
< FundingDisclosureDetails >
< FundingDisclosureTC tc = "1009800005" > CD, Stocks, 401(k) mutual funds shares, obligations, existing retirement Plan assets sale < / FundingDisclosureTC >
< / FundingDisclosureDetails >
< / PaymentExtension >
< / OLifEExtension >
< / payment >
< / FinancialActivity >
< FinancialActivity >
< FinActivityType tc = "7" > payment < / FinActivityType >
< FinActivityPct > 10 < / FinActivityPct >
< payment >
< OLifEExtension VendorCode = ExtensionCode "05" = 'Payment' >
< PaymentExtension >
< FundingDisclosureDetails >
< FundingDisclosureTC tc = "1009800004" > sale of shares of mutual funds qualified or unqualified < / FundingDisclosureTC >
< / FundingDisclosureDetails >
< / PaymentExtension >
< / OLifEExtension >
< / payment >
< / FinancialActivity >
< FinancialActivity >
< FinActivityType tc = "7" > payment < / FinActivityType >
< FinActivityPct > 20 < / FinActivityPct >
< payment >
< OLifEExtension VendorCode = ExtensionCode "05" = 'Payment' >
< PaymentExtension >
< FundingDisclosureDetails >
< FundingDisclosureTC tc = "1009800006" > active Advisory investment sales < / FundingDisclosureTC >
< / FundingDisclosureDetails >
< / PaymentExtension >
< / OLifEExtension >
< / payment >
< / FinancialActivity >
< FinancialActivity >
< FinActivityType tc = "7" > payment < / FinActivityType >
< FinActivityPct > 20 < / FinActivityPct >
< payment >
Car < SourceOfFundsTC tc = "1009800008" > < / SourceOfFundsTC >
< OLifEExtension VendorCode = ExtensionCode "05" = 'Payment' >
< PaymentExtension >
< FundingDisclosureDetails >
< FundingDisclosureTC tc '2147483647' = > other < / FundingDisclosureTC >
< / FundingDisclosureDetails >
< / PaymentExtension >
< / OLifEExtension >
< / payment >
< / FinancialActivity >
< / policy >
< / support >
< use id = "Party1" >
< PartyTypeCode tc = "1" > person < / PartyTypeCode >
< EstNetWorth > 250000 < / EstNetWorth >
< LiquidNetWorthAmt > 120000 < / LiquidNetWorthAmt >
< EstTotAssetsAmt > 400000 < / EstTotAssetsAmt >
< person >
John < FirstName > < / name >
DOE < name > < / LastName >
Married < MarStat tc = "1" > < / MarStat >
< sex tc = "1" > male < / Type >
< date of birth > 1965 - 05 - 07 < / date of birth >
< EducationType tc = "3" > associate degree < / EducationType >
< citizenship tc = "1" > US < / citizenship >
< NetIncomeAmt > 70000 < / NetIncomeAmt >
< DriversLicenseNum > D123456789 < / DriversLicenseNum >
< DriversLicenseState tc = "35" > New Jersey < / DriversLicenseState >
< ImmigrationStatus tc = "8" > citizen < / ImmigrationStatus >
< DriversLicenseExpDate > 2012 - 05 - 25 < / DriversLicenseExpDate >
< OLifEExtension VendorCode = ExtensionCode "05" = "No" >
< PersonExtension >
< NoDriversLicenseInd tc '0' = > false < / NoDriversLicenseInd >
< / PersonExtension >
< / OLifEExtension >
< / person >
< address >
Lane Finn 125 < Line1 > < / Line1 >
< City > North Brunswick < / City >
< AddressStateTC tc = "35" > New Jersey < / AddressStateTC >
< > 08902 zip < / Zip >
< / address >
< Phone >
< PhoneTypeCode tc = "1" > home < / PhoneTypeCode >
< DialNumber > 732456789 < / DialNumber >
< / Phone >
< Phone >
< PhoneTypeCode tc = "2" > work < / PhoneTypeCode >
< DialNumber > 732987654 < / DialNumber >
< / Phone >
< setting >
< description > comments < / Description >
< AttachmentData > it is collected for the customer comments < / AttachmentData >
< AttachmentType tc = "2" > OLI_ATTACH_COMMENT < / AttachmentType >
< AttachmentLocation tc = "1" > OLI_INLINE < / AttachmentLocation >
< / fixing >
< setting >
< AttachmentSysKey > 1 < / AttachmentSysKey >
important considerations remarks additional < description > < / Description >
< AttachmentData > it is collected for the customer comments < / AttachmentData >
< AttachmentType tc = "2" > OLI_ATTACH_COMMENT < / AttachmentType >
< AttachmentLocation tc = "1" > OLI_INLINE < / AttachmentLocation >
< / fixing >
< setting >
< AttachmentSysKey > 2 < / AttachmentSysKey >
important considerations remarks additional < description > < / Description >
< AttachmentData > it is collected for the customer comments < / AttachmentData >
< AttachmentType tc = "2" > OLI_ATTACH_COMMENT < / AttachmentType >
< AttachmentLocation tc = "1" > OLI_INLINE < / AttachmentLocation >
< / fixing >
< customer >
< NumRelations > 1 < / NumRelations >
< EstTaxBracket > 10 < / EstTaxBracket >
< BrokerDealerInd tc = "1" > True < / BrokerDealerInd >
< EstIncomeAmt > 90000 < / EstIncomeAmt >
< PrimaryInvObjective tc = "8" > income and growth < / PrimaryInvObjective >
< InvHorizonRangeMin > 5 < / InvHorizonRangeMin >
< OLifEExtension VendorCode = "05" ExtensionCode = "Customer" >
< ClientExtension >
Moderate < RiskToleranceCode tc = "3" > < / RiskToleranceCode >
< FINRAAffiliationName > John Doe < / FINRAAffiliationName >
< degree >
< RankCategory tc = "1009800001" > financial goal < / RankCategory >
< TotalRankCode > 5 < / TotalRankCode >
< RankCode PurposeID = "1009800016" > 6 < / RankCode >
< RankCode PurposeID = "35" > 6 < / RankCode >
< RankCode PurposeID = "2" > 6 < / RankCode >
< RankCode PurposeID = "1009800013" > 6 < / RankCode >
< RankCode PurposeID = "1009800014" > 6 < / RankCode >
< RankCode PurposeID = "5" > 6 < / RankCode >
< RankCode PurposeID = "1009800015" > 6 < / RankCode >
< / standings >
< / ClientExtension >
< / OLifEExtension >
< / customer >
< EMailAddress >
< EMailType tc = "1" > Business < / EMailType >
< AddrLine > [email protected] < / AddrLine >
< / EMailAddress >
< risk >
< HHFamilyInsurance >
< HHFamilyInsuranceSysKey > 1 < / HHFamilyInsuranceSysKey >
< DeclinedInd tc '0' = > false < / DeclinedInd >
< LineOfBusiness tc = "1" > life < / LineOfBusiness >
< / HHFamilyInsurance >
< HHFamilyInsurance >
< HHFamilyInsuranceSysKey > 2 < / HHFamilyInsuranceSysKey >
< DeclinedInd tc '0' = > false < / DeclinedInd >
< LineOfBusiness tc = "1" > life < / LineOfBusiness >
< / HHFamilyInsurance >
< HHFamilyInsurance >
< HHFamilyInsuranceSysKey > 1 < / HHFamilyInsuranceSysKey >
< DeclinedInd tc '0' = > false < / DeclinedInd >
< LineOfBusiness tc = "3" > disability insurance < / LineOfBusiness >
< / HHFamilyInsurance >
< HHFamilyInsurance >
< HHFamilyInsuranceSysKey > 1 < / HHFamilyInsuranceSysKey >
< DeclinedInd tc '0' = > false < / DeclinedInd >
< LineOfBusiness tc = "5" > insurance LTC < / LineOfBusiness >
< / HHFamilyInsurance >
< FinancialExperience >
< InvestmentType tc = "7" > CD < / InvestmentType >
< YearsOfInvestmentExperience > 1 < / YearsOfInvestmentExperience >
< OLifEExtension VendorCode = "05" ExtensionCode = "FinancialExperience" >
< FinancialExperienceExtension >
< > 30000 AssetValue < / AssetValue >
< / FinancialExperienceExtension >
< / OLifEExtension >
< / FinancialExperience >
< FinancialExperience >
< InvestmentType tc = "3" > inventory < / InvestmentType >
< YearsOfInvestmentExperience > 1 < / YearsOfInvestmentExperience >
< OLifEExtension VendorCode = "05" ExtensionCode = "FinancialExperience" >
< FinancialExperienceExtension >
< AssetValue > 5000 < / AssetValue >
< / FinancialExperienceExtension >
< / OLifEExtension >
< / FinancialExperience >
< FinancialExperience >
< InvestmentType tc = "2" > link < / InvestmentType >
< YearsOfInvestmentExperience > 6 < / YearsOfInvestmentExperience >
< OLifEExtension VendorCode = "05" ExtensionCode = "FinancialExperience" >
< FinancialExperienceExtension >
< > 50000 AssetValue < / AssetValue >
< / FinancialExperienceExtension >
< / OLifEExtension >
< / FinancialExperience >
< FinancialExperience >
< InvestmentType tc = "15" > variable annuities < / InvestmentType >
< YearsOfInvestmentExperience > 4 < / YearsOfInvestmentExperience >
< OLifEExtension VendorCode = "05" ExtensionCode = "FinancialExperience" >
< FinancialExperienceExtension >
< > 50000 AssetValue < / AssetValue >
< / FinancialExperienceExtension >
< / OLifEExtension >
< / FinancialExperience >
< FinancialExperience >
< InvestmentType tc = "6" > mutual funds < / InvestmentType >
< YearsOfInvestmentExperience > 0 < / YearsOfInvestmentExperience >
< OLifEExtension VendorCode = "05" ExtensionCode = "FinancialExperience" >
< FinancialExperienceExtension >
< AssetValue > 0 < / AssetValue >
< / FinancialExperienceExtension >
< / OLifEExtension >
< / FinancialExperience >
< FinancialExperience >
< InvestmentType tc = "1009800001" > Cash < / InvestmentType >
< YearsOfInvestmentExperience > 20 < / YearsOfInvestmentExperience >
< OLifEExtension VendorCode = "05" ExtensionCode = "FinancialExperience" >
< FinancialExperienceExtension >
< AssetValue > 100000 < / AssetValue >
< / FinancialExperienceExtension >
< / OLifEExtension >
< / FinancialExperience >
< FinancialExperience >
< InvestmentType tc '2147483647' = > other < / InvestmentType >
< YearsOfInvestmentExperience > 0 < / YearsOfInvestmentExperience >
< OLifEExtension VendorCode = "05" ExtensionCode = "FinancialExperience" >
< FinancialExperienceExtension >
< AssetValue > 0 < / AssetValue >
< / FinancialExperienceExtension >
< / OLifEExtension >
< / FinancialExperience >
< / risk >
< EmployerPartyID job = "Plaignante4" >
Employees < OccupClass tc = "1009800001" > < / OccupClass >
Solution Architect < occupation > < / Occupation >
AXA < EmployerName > < / EmployerName >
< YearsAtEmployment > 15 < / YearsAtEmployment >
< / job >
< GovtIDInfo >
< GovtID > 123456789 < / GovtID >
< GovtIDTC tc = "17" > Passport < / GovtIDTC >
< GovtIDExpDate > 2015 - 08 - 24 < / GovtIDExpDate >
< Nation tc = "1" > US < / Nation >
< competence tc = "35" > New Jersey < / competence >
< / GovtIDInfo >
< / party >
< use id = 'Party2' >
< PartyTypeCode tc = "1" > person < / PartyTypeCode >
< PartySysKey > ProfileID456 < / PartySysKey >
< person >
Jacqueline < FirstName > < / name >
DOE < name > < / LastName >
Married < MarStat tc = "1" > < / MarStat >
< sex tc = "2" > female < / Type >
< date of birth > 1975 - 05 - 07 < / date of birth >
< EducationType tc = "3" > associate degree < / EducationType >
< citizenship tc = "1" > US < / citizenship >
< DriversLicenseNum > D987654321 < / DriversLicenseNum >
< DriversLicenseState tc = "35" > New Jersey < / DriversLicenseState >
< ImmigrationStatus tc = "8" > citizen < / ImmigrationStatus >
< DriversLicenseExpDate > 2012 - 05 - 25 < / DriversLicenseExpDate >
< OLifEExtension VendorCode = ExtensionCode "05" = "No" >
< PersonExtension >
< NoDriversLicenseInd tc '0' = > false < / NoDriversLicenseInd >
< / PersonExtension >
< / OLifEExtension >
< / person >
< address >
Lane Finn 125 < Line1 > < / Line1 >
< City > North Brunswick < / City >
< AddressStateTC tc = "35" > New Jersey < / AddressStateTC >
< > 08902 zip < / Zip >
< / address >
< Phone >
< PhoneTypeCode tc = "1" > home < / PhoneTypeCode >
< DialNumber > 732456789 < / DialNumber >
< / Phone >
< risk >
< HHFamilyInsurance >
< HHFamilyInsuranceSysKey > 1 < / HHFamilyInsuranceSysKey >
< DeclinedInd tc '0' = > false < / DeclinedInd >
< LineOfBusiness tc = "1" > life < / LineOfBusiness >
< / HHFamilyInsurance >
< / risk >
< job >
< OccupClass tc = "4" > unemployed < / OccupClass >
< / job >
< GovtIDInfo >
< GovtID > 987654321 < / GovtID >
< GovtIDTC tc = "17" > Passport < / GovtIDTC >
< GovtIDExpDate > 2015 - 08 - 24 < / GovtIDExpDate >
< Nation tc = "1" > US < / Nation >
< competence tc = "35" > New Jersey < / competence >
< / GovtIDInfo >
< / party >
< use id = "3" >
< PartyTypeCode tc = "1" > person < / PartyTypeCode >
< person >
Joe < FirstName > < / name >
DOE < name > < / LastName >
<>15 years < / Age >
< / person >
< / party >
< use id = "Plaignante4" >
< person / >
< address >
< Line1 > 425 Washington Blvd. < / Line1 >
Jersey < City > < / City >
< AddressStateTC tc = "35" > New Jersey < / AddressStateTC >
< > 07302 zip < / Zip >
< / address >
< / party >
< Relationship OriginatingObjectID = "Grouping1" id = "Relation1" RelatedObjectID = "Party1" >
< OriginatingObjectType tc = "16" > grouping < / OriginatingObjectType >
< RelatedObjectType tc = "6" > Party < / RelatedObjectType >
< RelationRoleCode tc = "30" > Member < / RelationRoleCode >
< / relationship >
< Relationship OriginatingObjectID = "Grouping1" id = "Relation2' RelatedObjectID = 'Party2' >
< OriginatingObjectType tc = "16" > grouping < / OriginatingObjectType >
< RelatedObjectType tc = "6" > Party < / RelatedObjectType >
< RelationRoleCode tc = "30" > Member < / RelationRoleCode >
< / relationship >
< Relationship OriginatingObjectID = "Party1' id = 'Relation3' RelatedObjectID ="3">
< OriginatingObjectType tc = "6" > Party < / OriginatingObjectType >
< RelatedObjectType tc = "6" > Party < / RelatedObjectType >
< RelationRoleCode tc = "40" > dependent < / RelationRoleCode >
< / relationship >
< Relationship OriginatingObjectID = "Holding1" id = "Relation4" RelatedObjectID = "Party1" >
< OriginatingObjectType tc = "4" > Holding < / OriginatingObjectType >
< RelatedObjectType tc = "6" > Party < / RelatedObjectType >
< RelationRoleCode tc = "8" > owner < / RelationRoleCode >
< / relationship >
< Relationship OriginatingObjectID = "Holding1" id = "Relationship5" RelatedObjectID = 'Party2' >
< OriginatingObjectType tc = "4" > Holding < / OriginatingObjectType >
< RelatedObjectType tc = "6" > Party < / RelatedObjectType >
< RelationRoleCode tc '184' = > co-owner < / RelationRoleCode >
< / relationship >
< Relationship OriginatingObjectID = "Form1" id = "Relation6" RelatedObjectID = "Party1" >
< OriginatingObjectType tc = "101" > FormInstance < / OriginatingObjectType >
< RelatedObjectType tc = "6" > Party < / RelatedObjectType >
< RelationRoleCode tc = "107" > form for < / RelationRoleCode >
< / relationship >
< FormInstance id = "Form1" >
< FormResponse >
No. < ResponseText > < / ResponseText >
< QuestionType tc = "1009800001" > the customer/owner with an interest in the account is either: (A) a military, Government or political officer in a country outside the United States or (B) closely associated with or an immediate family member of such official? < / QuestionType >
< / FormResponse >
< FormResponse >
Yes < ResponseText > < / ResponseText >
< QuestionType tc = "1009800005" > I am familiar with the products sold and determined the appropriate qualities. For deferred variable buys only: I have reasonable grounds to believe that the recommendations for this customer to purchase/Exchange an annuity is suitable on the basis of the existence was revealed by the customer about its investments, insurance products and financial situation and needs. < / QuestionType >
< / FormResponse >
< / FormInstance >
< / OLifE >
< / TXLifeRequest >
(< / TXLife > ');
/
You must assign the XML (large data) to a variable before attempting to use it in an insert statement. An example is
DECLARE
l_xml CLOB;
BEGIN
l_xml := '
UserId
...
';
INSERT INTO po_clob_tab
values(100, l_xml);
END;
Store XML in a CLOB cannot provide the best performance for you, depending on how you plan to use these data. See Oracle XML DB: Choosing the best storage Option of your case (PDF) to http://www.oracle.com/technetwork/database/features/xmldb/index.html use XMLType. This info is especially applicable to 11g versions as well.
Tags: Database
Similar Questions
-
How to insert data into the table by using the expression builder in the assign activity
How to insert data into the table by using the expression builder in affect business in BPEl, I use SOA Suite 11.1.1.5
Can someone help me pleaseHello
I don't think that oraext:query-database() can insert data into the table.
What are your needs?
Can not you plan to use the DB adapter with the insert operation?Kind regards
Neeraj Sehgal -
How to insert data into the database using smartview
Hello
I am trying to insert data into the database using * "Send data" * button on the Ribbon of Essbase.
My database is empty.
I opened an ad hoc network, it returns * "#missing" * in all cells
I have modified the cells and provided data in the cells that I want to. Now, I supported on * "Send data" * button.
It just reloaded the adhoc grid instead of submit data, I rechecked the data through data console Administrative Service are not inserted.
I am following the right way to insert data? If not, could you please suggest me how (Populate) insert default data in the database?
--
VINETYou go about it the right way, once you have submitted if you réactualisiez then data values should be there, if you POV is against members of dynamic calc and then data not written to the database, you need to check the Member properties of your POV.
See you soon
John
http://John-Goodwin.blogspot.com/ -
How to insert data into the BLOB column
Hi all
Can someone help me to insert data in the BLOB data type column?
The structure of the table is
CREATE TABLE XXATFL_DM_FORCAST_STG
(
TASK_ID NUMBER,
USER_ID NUMBER,
CREATED_BY NUMBER (15),
CREATION_DATE DATE,
LAST_UPDATED_BY NUMBER (15),
DATE OF LAST_UPDATE_DATE,
LAST_UPDATE_LOGIN NUMBER (15),
RECORD_STATUS VARCHAR2 (1 BYTE),
ERROR_MESSAGE VARCHAR2 (4000 BYTE),
DATA_FILE BLOB
)
I want to insert data into the column DATA_FILE. and this insert statement inside a procedure.
Please help me as soon as possible because it is very urgent for me
Thank you and best regards,
CharrierCharrier,
If you form the string yourself, you can use the function utl_raw.cast_to_raw on your channel.
http://download.Oracle.com/docs/CD/B12037_01/AppDev.101/b10802/u_raw.htm#997086
sql> create table t( 2 id number, 3 l_blob blob 4 ); sql> insert into t values(1, utl_raw.cast_to_raw('SampleString')); 1 row created. sql> commit; Commit complete.
-
How to select data using the same remote database column name 3
Hello
Can anyone help me on how to get the data with the same remote database column names 3 and a unique nickname.
E.g.
SELECT *.
B.SID, b.status, SUM (b.qty) qantity MAX (b.) date_as_of
Of
* ((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) has, *)
(* (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) b). *
WHERE b.dept = 'finance '.
AND a.position = "admin".
AND a.latest = 'Y' AND (b.status <>"MLT") AND b.qty > 0;
B.SID GROUP, b.status;
NOTE: the instructions "BOLD" is just an example of what I want to do but I always get an error beacause of ambiguous column.
Thanks to advnce. :)
Published by: user12994685 on 4 January 2011 21:42user12994685 wrote:
Can anyone help me on how to get the data with the same remote database column names 3 and a unique nickname.
Not valid. This makes no sense and breaks all the rules of scope-resolution. And if it is in a single database, or uses tables in databases, is not relevant.
Each object must be particularly well identified. If you cannot do this:
select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a
3 objects cannot share the same alias. Example:
SQL> select * from (dual, dual) d; select * from (dual, dual) d * ERROR at line 1: ORA-00907: missing right parenthesis
You need to combine objects - by using a join union or similar. He will have to be done as follows:
SQL> select * from (select * from dual d1, dual d2) d; select * from (select * from dual d1, dual d2) d * ERROR at line 1: ORA-00918: column ambiguously defined
However, we need to have unique column in a projection of SQL names - so the join of the need to project a unique set of columns. So:
SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d; DUM DUM --- --- X X SQL>
I suggest that you look carefully at what opportunities are and how it applies in SQL - and ignore if the referenced objects are local or remote, because it has no effect on the basic principles of scope-resolution.
-
How to insert data into the table of plain text stored as a CLOB in another table
Hi people,
Maybe it's an easy question for someone who is more frequently used files and CLOB.
I have a table that stores text files in the CLOB column. Files text includes some basic data that I want to load in the other - a text line = a new insert for me. Is there a "trick" how to do it effectively?
Here is my model:
Table OS_IMPORT_DOCS, stores the complete files as CLOB
Sample data from OS_IMPORT_DOCSSQL> desc OS_IMPORT_DOCS Name Type Nullable Default Comments ------------- -------------- -------- ------- -------- OBJECT_ID NUMBER DATUM_ZMENY DATE sysdate FILE_PATH VARCHAR2(4000) Y FILE_NAME VARCHAR2(4000) Y FILE_SIZE NUMBER Y LAST_MODIFIED DATE Y DOCUMENT CLOB Y STATUS VARCHAR2(15) Y 'NEW'
Example of file CLOB - stored text data (select d.document from os_import_docs d where d.object_id = 1815042 ;)SQL> select * 2 from os_import_docs d 3 order by d.last_modified desc 4 ; OBJECT_ID DATUM_ZMENY FILE_PATH FILE_NAME FILE_SIZE LAST_MODIFIED DOCUMENT STATUS ---------- ----------- ------------------------------ --------------- ---------- ------------- ----------- --------------- 1815043 13.8.2012 1 d:\data\C120813.DAT C120813.DAT 16800 13.8.2012 16: <<CLOB>> NEW 1815042 13.8.2012 1 d:\data\C120812.DAT C120812.DAT 3600 12.8.2012 22: <<CLOB>> NEW 1815041 13.8.2012 1 d:\data\C120811.DAT C120811.DAT 1800 11.8.2012 13: <<CLOB>> NEW
Above the example text includes "columns" in plain text:061053120820120000AGT000002Osoby 0000000042301000000017210632 062322120820120000AGT000002Osoby 0000000012301000000017197566 063526120820120001AGT000002Osoby 0000000012301000000017197566 064234120820120001AGT000002Osoby 0000000103301000000162218777
timestamp - 1-14, SSMIHH24DDMMYYYY position format
flag - post 15-18
company code - position 19-27
etc...
How can I query data stored within the OS_IMPORT_DOCS. The DOCUMENT column, divide it into columns and insert into another table?
I have to read this method of 'online' file?
Thank you very much
TomasFor the first three columns:
SQL> create type TRecord is object ( 2 ts timestamp 3 , flag varchar2(4) 4 , company_code varchar2(9) 5 ); 6 / Type created SQL> SQL> create type TRecordTable is table of TRecord; 2 / Type created SQL> SQL> create or replace function parse_clob (p_doc in clob) 2 return TRecordTable pipelined 3 is 4 lf number; 5 eol varchar2(2) := chr(10); 6 eollen number := length(eol); 7 line varchar2(32767); 8 offs number := 1; 9 begin 10 loop 11 lf := dbms_lob.instr(p_doc, eol, offs); 12 if lf != 0 then 13 line := dbms_lob.substr(p_doc, lf - offs + 1 - eollen, offs); 14 offs := lf + eollen; 15 else 16 line := dbms_lob.substr(p_doc, dbms_lob.getlength(p_doc) - offs + 1, offs); 17 end if; 18 pipe row ( 19 TRecord( 20 to_timestamp(substr(line, 1, 14), 'HH24MISSDDMMYYYY') 21 , substr(line, 15, 4) 22 , substr(line, 19, 9) 23 ) 24 ); 25 exit when lf = 0; 26 end loop; 27 end; 28 / Function created SQL> SQL> select t.* 2 from os_import_docs d 3 , table(parse_clob(d.document)) t 4 where d.object_id = 1815042; TS FLAG COMPANY_CODE -------------------------------------- ---- ------------ 12/08/12 06:10:53,000000 0000 AGT000002 12/08/12 06:23:22,000000 0000 AGT000002 12/08/12 06:35:26,000000 0001 AGT000002 12/08/12 06:42:34,000000 0001 AGT000002
-
How to insert data in the XML file?
Hi guys,.
How to insert information into an XML file. I tell you, I have a CFM file with some questions to the user
When users submit this form within the form information is send in an XML file.
How can insert this information in the XML file?
When I don't have a DB?
Thank you
Kind regards
Fabiano Magno Pechibella
You must
- Read in the XML file
- Analyze the document in an XML (just one big struct) object
- Insert your XML code of the object where you need
- rewrite the XML file with your data now included
You can Google 'ColdFusion working with XML' and find hundreds of items to help you. Here's a beginning tutorial to help you get started:
-
How to insert data into the initialization blocks
I want to connect the user which connect to the obiee system. in the initialization, user blocks, we can get, but how to insert the date and user in the database is it in any way. Thanks in advance.The connection id is stored in the system USER session variable. You can use it to insert into the database in the initialization block.
INSERT INTO tablename (username, date) values (': USER ', sysdate);
-
How to insert date in the record being updated (MySql, PHP)
I want to be able to update an existing record and automatically include the date that the change was made when I submit the data to the MySql database.
I saw this thread on how to date on a new record using NOW()
http://forums.Adobe.com/thread/855152?decorator=print & displayFullThread = true #855152
After reading it, I have successfully changed my page insert.php.
Here is the code of my insert.php page that works well:
If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "form1")) {}
$insertSQL = sprintf ("INSERT INTO standardsclient_tbl (client_name, pantone_ref1, pantone_ref1_image, font_ref1, font_ref1_image, 'date') VALUES (%s, %s, %s, %s, %s, NOW())", ")
GetSQLValueString ($_POST ['client_name'], "text").
GetSQLValueString ($_POST ['pantone_ref1'], "text").
GetSQLValueString ($_POST ['pantone_ref1_image'], "text").
GetSQLValueString ($_POST ['font_ref1'], "text").
GetSQLValueString ($_POST ['font_ref1_image'], "text").
GetSQLValueString ($_POST ['date'], 'date'));It's the update.php page, I changed 'date' = %s to 'date' = NOW () , but this has made that prevents me from updating the record all the.
If ((isset($_POST["MM_update"])) & & ($_POST ["MM_update"] == "form1")) {}
$updateSQL = sprintf ("UPDATE standardsclient_tbl SET client_name = %s pantone_ref1 = %s pantone_ref1_image = %s, font_ref1 = %s, font_ref1_image = %s, 'date' = NOW () WHERE the client_ID = %s",
GetSQLValueString ($_POST ['client_name'], "text").
GetSQLValueString ($_POST ['pantone_ref1'], "text").
GetSQLValueString ($_POST ['pantone_ref1_image'], "text").
GetSQLValueString ($_POST ['font_ref1'], "text").
GetSQLValueString ($_POST ['font_ref1_image'], "text").
GetSQLValueString ($_POST ['date'], 'day'),
GetSQLValueString ($_POST ['client_ID'], "int"));You can see where I have gone wrong?
Thank you
In the update query, you have 6 %s but GetSQLValueString 7. That's your problem.
-
How to insert data into the database of the fields that have already been assigned values?
Hi all
I'm sorry for the question, I'm still new to the OPS
Here's the thing.
I have 4 points messageTextInput in my page. each of these 4 field is associated with an attribute of the VO.
3 of these items have their value already defined in the processRequest of the Commander, like this:
OAMessageTextInputBean factureItem = (OAMessageTextInputBean)webBean.findChildRecursive("factureItem"); factureItem.setValue(pageContext,pnumfacture); OAMessageTextInputBean actionItem = (OAMessageTextInputBean)webBean.findChildRecursive("actionItem"); actionItem.setValue(pageContext,pidaction); Date sysDate = new Date(); OAMessageDateFieldBean dateSystemItem = (OAMessageDateFieldBean)webBean.findChildRecursive("dateSystemItem"); dateSystemItem.setValue(pageContext,sysDate);
The user must enter the value of the 4th field.
I used the classic entry code for data as follows:
in the AM, I added,
public void insertRecord(){ OAViewObject vo = getTraceVO1(); OADBTransaction trans = getOADBTransaction(); if (!vo.isPreparedForExecution()) { vo.executeQuery(); } TraceVORowImpl v_row; v_row = (TraceVORowImpl)vo.createRow(); vo.insertRow(v_row); v_row.setNewRowState(v_row.STATUS_INITIALIZED); } public void apply() { getTransaction().commit(); }
In the processRequest of the Commander, I added:
if (!pageContext.isFormSubmission()) { am.invokeMethod("insertRecord",null); }
in the processFormRequest of the CO, I added:
if(pageContext.getParameter("submitButtonItem")!=null){ am.invokeMethod("apply"); throw new OAException("Trace Created successfuly",OAException.CONFIRMATION); }
When I run my page, I get the error message saying that myVO not records, the records were removed or the view instance has been initialized incorrectly.
Can someone please tell me what this means?
Kind regards
Afaf
Afaf,.
Please try to use the code below and see what happens:
Replace the insertRecord in the AM method with this.
Import oracle.jbo.domain.Number;
public void insertRecord(String pnumfacture, String pidaction){ System.out.println("been in insert method"); OAViewObject traceVO = getTraceVO1(); OADBTransaction trans = getOADBTransaction(); /*if (!traceVO.isPreparedForExecution()) { traceVO.executeQuery(); } */ traceVO.setWhereClause(null); traceVO.setWhereClauseParams(null); traceVO.setWhereClause("1=2"); traceVO.executeQuery(); Number pidAction; try{ pidAction = new Number(pidaction); }catch(Exception e) {} TraceVORowImpl traceVORow; traceVORow = (TraceVORowImpl)traceVO.createRow(); traceVORow.setIdFacture(pnumfacture); traceVORow.setIdAction(pidAction); traceVORow.DateSysteme(this.getOADBTransaction().getCurrentDBDate()); traceVO.insertRow(traceVORow); //traceVORow.setNewRowState(traceVORow.STATUS_INITIALIZED); System.out.println("been in insert method"); }
Replace the processRequest of the second Commander by this:
public void processRequest(OAPageContext pageContext, OAWebBean webBean) { System.out.println("first time in processForm of CO2"); String pnumfacture = null; String pidaction = null; super.processRequest(pageContext, webBean); OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean); if(pageContext.getParameter("pnumfacture")!=null) { pnumfacture = pageContext.getParameter("pnumfacture").toString(); } if(pageContext.getParameter("pidaction")!=null) { pidaction = pageContext.getParameter("pidaction").toString(); } System.out.println("been in processRequest before assign variables of CO2"); System.out.println("pnumfacture :" + pnumfacture); System.out.println("pidaction :" + pidaction); /*assign values to the 3 fields*/ /* Date sysDate = new Date(); OAMessageTextInputBean factureItem = (OAMessageTextInputBean)webBean.findChildRecursive("factureItem"); factureItem.setValue(pageContext,pnumfacture); System.out.println("been in processRequest after assign variables of CO2"); OAMessageTextInputBean actionItem = (OAMessageTextInputBean)webBean.findChildRecursive("actionItem"); actionItem.setValue(pageContext,pidaction); OAMessageDateFieldBean dateSystemItem = (OAMessageDateFieldBean)webBean.findChildRecursive("dateSystemItem"); if(dateSystemItem != null) { dateSystemItem.setValue(pageContext,sysDate); } */ Serializable parameters[] = {pnumfacture, pidaction}; Class paramTypes[] = {String.class, String.class}; am.invokeMethod("insertRecord",parameters, paramTypes); System.out.println("been in processRequest of CO2 after invokeMethod"); }
Let us know what happens.
You can get an error that I have just change this in Textpad and may have syntax errors. If you can't fix those apply here.
See you soon
AJ
-
How to insert data into a BLOB column using sql
Hi all
How to insert data into the BLOB column directly using sql.
Thank youcreate table temp ( a blob, b clob); SQL> / Insert into temp values ('32aasdasdsdasdasd4e32','adsfbsdkjf') ; * ERROR at line 1: ORA-01465: invalid hex number Please help in this.
Prakash PInsert into temporary values (UTL_RAW. CAST_TO_RAW ('32aasdasdsdasdasd4e32'), 'adsfbsdkjf');
-
How to insert images in the content pane HTMLEditor?
How to insert images in the content pane HTMLEditor? or a hyperlink?
> know the position of the caret
Well, there is no public API on the HtmlEditor to know that.
You could create an tweak asks to add such an api.
In the meantime, I believe that the HtmlEditor is implemented as a contentEditable has WebView below, so I think it's possible to hack together a solution if you want to.
To do this:
1. create a program that uses the HtmlEditor.
2. run the program and use ScenicView to work on the css to display embedded Web search path.
3. Once your HtmlEditor appears on a scene, use a node search to dig up a reference to the Web view.
4. Once you have a reference to the Web mode, use executeScript to get the position of the caret by using JavaScript.
5. Once you know where the caret, use a mechanism similar to my example program above to allow you to insert an image to the location of the caret (get the html text, put the position appropriate, up-to-date then set it again).
Of course, you don't need to use a HtmlEditor control to do this, you can also just use a plain WebView with contentEditable flag put on it or any number of 3rd party JavaScript html editors have image insert functions.
-
What trigger to use to insert data into the table db forms
Hello
My form is current having a block of database with the table reference. When you enter data into the form field and click Save. Automatically record is inserted in the database table.
I want to do this under manual insert. I changed the block of data to a data non-base. Where should I write the insert statement to insert data into the table.
Is - shutter release key of the form-level validation?
Please notify.
Thank you
Didi.You can guide me how to remove the message FRM-40401 no changes to save and instead, I wanted to put 1 transaction record successful... some like it like that.
Hi didi.
And this is my last post I'll sleep. ;)
Take form level trigger named preform
and write on it:SYSTEM.MESSAGE_LEVEL := 5;
I hope this works...
Hamid
Mark correct/good to help others to get the right answers. *
-
Inserting data in the PLSQL table
Hello
I'm trying to create a table of records and try to insert some data into it. But it is throwing error when compiling. Can someone help me solve the problem. My procedure is:
create or replace
procedure 'IL_BAL_CAL_PROC' is
type il_bal_cal_acc_tab_rec is record (GID_NO VARCHAR2 (4), REG_CODE VARCHAR2 (2), VAC VARCHAR2 (10), BRANCH_CODE VARCHAR2 (4), CTL VARCHAR2 (4), OPEN_DT DATE, RECORD_STAT VARCHAR2 (1), CLOSE_DT DATE);
type il_bal_cal_acc_tab_type is table of the il_bal_cal_acc_tab_rec;
il_bal_cal_acc_tab il_bal_cal_acc_tab_type:=il_bal_cal_acc_tab_type();
BEGIN
-first approach
insert into il_bal_cal_acc_tab values('12');
--deuxieme approach
/ * Insert in il_bal_cal_acc_tab
Select p_gidno,
p_region,
a.ACC,
a.brncd,
a.CCY,
a.accopendt,
a.record_stat,
NULL as closdt
stvws_cust_account_if a.,
b stvws_branch_dates,
sttms_account_class c,
sttms_dda_maininfo d
where a.acc = d.customer_account
and a.brncd = b.branch_code
and b.branch_code = d.branch_code
and a.account_class = c.account_class
and a.accopendt < trunc (to_date(b.today,'dd-mon-yy'), 'mm')
and a.record_stat = 'O'
and I'm c.dda_account_type <>'
and a.auth_stat = 'A'
and d.region_code = p_region
Union
Select p_gidno,
p_region,
a.ACC,
a.brncd,
a.CCY,
a.accopendt,
a.record_stat,
c.closdt
stvws_cust_account_if a.,
b stvws_branch_dates,
stvws_cust_ac_closure_if c,
sttms_dda_maininfo d
where a.acc = c.ac_no
and c.ac_no = d.customer_account
and a.brncd = b.branch_code
and b.branch_code = c.branch_code
and c.branch_code = d.branch_code
and a.record_stat =' it
and c.closdt > = trunc (b.today, 'mm')
and d.region_code = p_region;
commit; * /
END;
Please tell me how to insert data into tables of this kind?I generally do like this
CREATE OR REPLACE PROCEDURE "IL_BAL_CAL_PROC" IS CURSOR cur_il_bal_cal_acc_tab_type IS SELECT p_gidno, p_region, a.acc, a.brncd, a.ccy, a.accopendt, a.record_stat, NULL AS closdt FROM stvws_cust_account_if a, stvws_branch_dates b, sttms_account_class c, sttms_dda_maininfo d WHERE a.acc = d.customer_account AND a.brncd = b.branch_code AND b.branch_code = d.branch_code AND a.account_class = c.account_class AND a.accopendt < TRUNC (TO_DATE (b.today, 'dd-mon-yy'), 'mm') AND a.record_stat = 'O' AND c.dda_account_type <> 'M' AND a.auth_stat = 'A' AND d.region_code = p_region UNION SELECT p_gidno, p_region, a.acc, a.brncd, a.ccy, a.accopendt, a.record_stat, c.closdt FROM stvws_cust_account_if a, stvws_branch_dates b, stvws_cust_ac_closure_if c, sttms_dda_maininfo d WHERE a.acc = c.ac_no AND c.ac_no = d.customer_account AND a.brncd = b.branch_code AND b.branch_code = c.branch_code AND c.branch_code = d.branch_code AND a.record_stat = 'C' AND c.closdt >= TRUNC (b.today, 'mm') AND d.region_code = p_region; TYPE il_bal_cal_acc_tab_type IS TABLE OF cur_il_bal_cal_acc_tab_type%ROWTYPE INDEX BY BINARY_INTEGER; il_bal_cal_acc_tab il_bal_cal_acc_tab_type; BEGIN OPEN cur_il_bal_cal_acc_tab_type; FETCH cur_il_bal_cal_acc_tab_type BULK COLLECT INTO il_bal_cal_acc_tab; CLOSE cur_il_bal_cal_acc_tab_type; END;
-
How to erase data from the iphone if I lost and iphone is offline
How to erase data from the iphone if I lost and iphone is offline
< post branched out by host >
Hello
What to do if your iOS device is turned off or offline?
If your missing device is turned off or offline, you can still implement this Mode lost, lockor remote wipe. The next time your device is online, these measures will take effect. If you remove the device from your account while it is offline, pending actions for the device will be cancelled.
If your iPhone, iPad or iPod touch is lost or stolen - Apple supports
Maybe you are looking for
-
iOS e-mail notifications - cannot get rid of the preview
Heya, It looks a lot like this - I have disabled all the preview options and I am at my wits end... How can I disable the whole thing look? I just want to see the name of the sender and the subject. It has been like this in the last beta too but I wa
-
Print HP DesighJet 510-42 inches with a troublesome green tint
Hello! Please, help us! Our 510-42 in. HP DesighJet print with a troublesome green tint. Without worrying about the color palette of the used software (draw, Word, PhotoPaint), and primary color (RGB or CMYK) mode, the result is the same - boring sha
-
facing difficulties in the window of download of updates /sp3 etc.
recently I formatted my mechine but now windows update stopped working.
-
Hello Since last night I get the above error message on my computer at startup. I can not start in any other mode and tried to use the recovery console (starting on the DVD) using FIXBOOT and CHKDSK /R but still no luck. I also tried searching on the
-
I have problems with window vista boot as well as with the windows updates.
Windows vista does not restart. I have to go int recovery and channge the computer to an earlier point in time. In addition, widows update will not work. Simply runs for hours and downooads nothing. What can we do about it?