Invalid data type
I have the following code working perfectly fine:
CREATE TYPE mytype IS TABLE OF INT;
SELECT * FROM TABLE(mytype(1,2));
When I declare the type in a package, however, I get invalid data type. For example,
CREATE OR REPLACE mypackage AS
TYPE mytype IS TABLE OF INT;
END mypackage;
SELECT * FROM TABLE(mypackage.mytype(1,2));
I need to include the type in a package because I have a function in the same package that will take the nested table as in parameter.
YS
When you need to select from a type, that type has to be created as a SQL type.
This is true in SQL
Re: how to use a collection in procedure
And in a stored procedure
Re: Passing an array to an Oracle stored procedure
Similar Messages
-
ORDImageSignature Invalid data type in Oracle 8i
hi there,
i have just started working on Intermedia, i am using Oracle 8i. i have configured the intermedia and executed the ordwebutl.sql file. all othe media data types are working perfectly like, ORDAudio, ORDImage,ORDVideo, but the ORDIMageSIgnature is not working at all. when i use it as data type in any table it says Invalid data type. which means oracle 8i is not recognizing ORDImageSIgnature at all. plz help me as soon as possible. Thanks in advance.The ordimagesignature is not something you can see or hear. It is strictly binary metadata about the image, used only to compare images to each other.
What are you trying to do?
Larry -
what are the invalid data type conversions in ABAP ???
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on Mar 10, 2012 6:01 PMNo Amanda,
The values that I see in message monitor are also those that comes to XSLT programs as input.
I investigated our problem a little further myself:
1) XI always converts messages into XML format - this everybody knows.
2) In XI documentation it is declared that XI uses ISO 8601 for DATE type formatting. That's why you see dates in format YYYY-MM-DD in XML data in message monitoring.
3) The appearance of those decimal values are not that obvious for me. If XI uses ABAP transformation for message content then applies the rules for converting ABAP data types into XML. For this there is a SAP document 'ABAP - XML mapping' from TechEd2004. This document seems to describe how ABAP data types are handled by XML transformation.
Anyway, we currently need to play with decimal values in XSLT mapping programs inside XI:
a) add leading 0 integer if source value < 1
RFC returns 0.123 -> XI converts to XML '.123' -> XSLT mapper should return '0.123' ->SOAP response returns '0.123'
b) add decimal point and trailing zeros
RFC returns 0.000 -> XI converts to XML '0' -> XSLT mapper should return '0.000' ->SOAP response return '0.000'
With dates, the problem is actually on documenting mapping rules when writing interface specifications. If you would write an EAI-solution-independent conversion rule (RFC/date->SOAP/char) for date field it could sound like: YYYYMMDD -> dd.mm.yyyy. This works semantically between these systems but would not work for XI-developer, because he get YYYY-MM-DD from the RFC.
Additionally the decimal type conversion requirements in XSLT mapping programs probably only applies XI and are therefore not reusable in other EAI environments.
I would be glad if somebody would still have further comments for this data type conversion issue.
br: Kimmo -
Data error (invalid data type 17) in a Remote Function Call
Hi,
I am passing 2 select-option tables to RFC.
Tables have structures -
Table1 SIGN(C1)
OPTION(C2)
HIGH(C6)
LOW(C6)
Table2 SIGN(C1)
OPTION(C2)
HIGH(C20)
LOW(C20)
At the destination side, I have created two table types which have same structure.
But when I call the RFC , program terminates with error - "Data error (invalid data type 17) in a Remote Function Call"
Not able to understand the reason for this error. Please help.
Thanks,
SujeetHi,
check out this example
[LINK|http://abap.googlar.eu/viewtopic.php?f=5&t=28]
You have several ranges that you can use like RANGE_AUF.
Function example:
FUNCTION zexemple.
*"*"Interface local:
*" IMPORTING
*" REFERENCE(R_HORA) TYPE FLAG
*" REFERENCE(R_DIA_1) TYPE FLAG
*" REFERENCE(P_IDOC) TYPE FLAG
*" EXPORTING
*" REFERENCE(MSG) TYPE CHAR255
*" TABLES
*" T_OIFSPBL STRUCTURE OIFSPBL
*" SL_PBLNR STRUCTURE RANGE_PBLNR
*" SL_MATNR STRUCTURE RANGE_MATNR
*" SL_HORA STRUCTURE RANGE_UZEIT
*" T_ERROS STRUCTURE ZARSTRING
ENDFUNCTION.
Report:
SELECT-OPTIONS: sl_pblnr FOR oirbpblb-pblnr,
sl_matnr FOR a361-matnr.
~
Final question:
You are passing the values using TABLES and not IMPORTING right? -
Invalid Data Type Exception Error in SAPBC
Hi All:
We are using SAPBC as our middleware for communication between SAP and external billing application.
We are trying to send PO in the form of IDocs (ORDERS) from SAP to the external application through SAPBC.
The message type ORDERS in SAPBC has a "rolled back" status indicating that there is some error.
The error we are getting in this case is:
"com.wm.util.coder.InvalidDatatypeException: com.wm.lang.xml.WMDocumentException: Received null IDocXML document"
I spoke to our technical lead who is responsible for maintaining the external billing application. He told me that there is no problem with his systems/servers/external application and that it is some internal problem with SAP and SAPBC.
This maybe an inappropriate forum to post this thread, but we dont have a forum for SAPBC.
We need to fix this asap. Any help in this regard will be highly appreciated.
Thanks,
VjHi Vj,
Looks like emply messages are getting generated. This might cause the error. So check on the source which is generating the PO thru IDOC.
Hope this helps.
Regards,
Binay Agarwal -
Getting Incorrect data type error while trying to do a CAST in table
Getting an error while trying to compile the following piece of code
CREATE OR REPLACE PACKAGE BODY A_pkg AS
FUNCTION A(O_error_message IN OUT varchar2)
RETURN BOOLEAN IS
--Declaring the local variables and CURSORs used in the program unit
L_attrib_tbl CFA_SQL.TYP_attrib_tbl;
cursor c1 is
select list_first1.number_11
from TABLE (CAST (L_attrib_tbl AS "CFA_SQL.TYP_attrib_tbl")) list_first1;
BEGIN
L_group_id = '22'
IF L_merch_type_value = 'G' OR L_merch_type_value = 'I' THEN
CFA_SQL.QUERY_ATTRIB(L_attrib_tbl,
L_group_id) ;
END IF;
open C1;
Fetch C1 into L_number;
close C1;
return true;
END A;
END;
Also pasting the Spec for CFA_SQL which contains TYP_attrib_tbl
TYPE TYP_attrib_rec IS RECORD
group_id CFA_ATTRIB_GROUP.GROUP_ID%TYPE,
varchar2_1 VARCHAR2,
number_11 number(10,0));
TYPE TYP_attrib_tbl is TABLE of TYP_attrib_rec INDEX BY BINARY_INTEGER;
The error is coming in the line
cursor c1 is
select list_first1.number_11
from TABLE (CAST (L_attrib_tbl AS "CFA_SQL.TYP_attrib_tbl")) list_first1;
with the error as Invalid data type pointing to CFA_SQL.TYP_attrib_tbl as invalid, but I have initialized L_attrib_tbl as of that datatype only. Ahy help would be greatly appreciated.
Regards,
JoydeepHi Kelly,
There is no data that is entered in that period.The data will be entered for that period next month.
POV is also not set to that period,but still the problem persists.
Thanks -
Handle null value in char infoobject -data type DATE(ora-01722 invalid num)
Hi,
We have a DSO with a info object in the Data fields. The char info object has the data type DATE and most often it has the null value. but some times it has data in it.
When ever we were trying to run a report on the DSO it throws a error as ORA- 01722 INVALID NUMBER.
we tried editing PSA data and placing 00000000 for null values - and had a message invalid date.
suggestions pls
Regards.Hello,
Please check the note given below
https://service.sap.com/sap/support/notes/1327167.
If null value is the problem, change the query setting for not to show the null values. Just add a filter in ZDAT to exclude "NULL"
Thanks
Nidhi -
DSP Web Service Data Source runtime error "Invalid xsi:type qname"
I have created a DSP data service that uses a web service as a data source.
The web service wraps an Oracle PL/SQL package and works when tested independantly of the DSP data service.
When I test the DSP data service using the weblogic workshop test view I get the error below:
weblogic.xml.query.exceptions.XQueryDynamicException: {err}XQ0027: Validation failed: error: cvc-elt.4.2: Invalid xsi:type qname: 'ns0:EmpRecUser' in element getEmpResponseElement@http://hr/EmpWebService.wsdl/types/
(The full stack trace and the WSDL imported into DSP are at the bottom of this posting)
I am new to DSP but I have created data services from the DSP tutorials succesfully before.
This is the first data service I have tried to create which is not from a DSP tutorial.
I dont really understand the error message.
It appears to me that type EmpRecUser is being prefixed by the wrong name space. In the WSDL the namespace is 'tns:' in the error message the namespace is: 'ns0'.
<element name="getEmpResponseElement">
<complexType>
<sequence>
<element name="result" type="tns:EmpRecUser" nillable="true"/>
</sequence>
</complexType>
</element>
I created the web service in Oracle J Developer from the tutorial URL below.
http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm#p
weblogic.xml.query.exceptions.XQueryDynamicException: {err}XQ0027: Validation failed: error: cvc-elt.4.2: Invalid xsi:type qname: 'ns0:EmpRecUser' in element getEmpResponseElement@http://hr/EmpWebService.wsdl/types/
at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.giveToken(XMLValidatorForXMLBeans.java:169)
at weblogic.xml.query.schema.ValidatingIterator.fetchNext(ValidatingIterator.java:148)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at com.bea.ld.wrappers.ws.JAXRPCWebserviceIterator.fetchNext(JAXRPCWebserviceIterator.java:104)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:134)
at weblogic.xml.query.runtime.sequences.Subsequence.fetchNext(Subsequence.java:101)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:238)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.core.QueryIterator.fetchNext(QueryIterator.java:127)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
at weblogic.xml.query.xdbc.util.Serializer.processNamespaces(Serializer.java:340)
at weblogic.xml.query.xdbc.util.Serializer.processElement(Serializer.java:262)
at weblogic.xml.query.xdbc.util.Serializer.process(Serializer.java:206)
at weblogic.xml.query.xdbc.util.Serializer.serializeItems(Serializer.java:152)
Caused by: weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans$ValidationException: null
at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans$ExceptionCollection.add(XMLValidatorForXMLBeans.java:340)
at org.apache.xmlbeans.impl.validator.Validator.emitError(Validator.java:175)
at org.apache.xmlbeans.impl.validator.Validator.emitFieldError(Validator.java:207)
at org.apache.xmlbeans.impl.validator.Validator.emitFieldError(Validator.java:193)
at org.apache.xmlbeans.impl.validator.Validator.beginEvent(Validator.java:458)
at org.apache.xmlbeans.impl.validator.Validator.nextEvent(Validator.java:246)
at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.processBeginElementToken(XMLValidatorForXMLBeans.java:1205)
at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.processToken(XMLValidatorForXMLBeans.java:1322)
at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.processTokensOnHold(XMLValidatorForXMLBeans.java:1349)
at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.gotBeginElementToken(XMLValidatorForXMLBeans.java:772)
at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.giveToken(XMLValidatorForXMLBeans.java:100)
at weblogic.xml.query.schema.ValidatingIterator.fetchNext(ValidatingIterator.java:148)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at com.bea.ld.wrappers.ws.JAXRPCWebserviceIterator.fetchNext(JAXRPCWebserviceIterator.java:104)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:134)
at weblogic.xml.query.runtime.sequences.Subsequence.fetchNext(Subsequence.java:101)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:238)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.core.QueryIterator.fetchNext(QueryIterator.java:127)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
at weblogic.xml.query.xdbc.util.Serializer.processNamespaces(Serializer.java:340)
at weblogic.xml.query.xdbc.util.Serializer.processElement(Serializer.java:262)
at weblogic.xml.query.xdbc.util.Serializer.process(Serializer.java:206)
at weblogic.xml.query.xdbc.util.Serializer.serializeItems(Serializer.java:152)
at com.bea.ld.server.QueryInvocation.getResult(QueryInvocation.java:461)
<definitions
name="EmpWebService"
targetNamespace="http://hr/EmpWebService.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://hr/EmpWebService.wsdl"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns0="http://hr/EmpWebService.wsdl/types/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://hr/EmpWebService.wsdl/types/"
elementFormDefault="qualified" xmlns:tns="http://hr/EmpWebService.wsdl/types/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">
<element name="getEmpElement">
<complexType>
<sequence>
<element name="empNo" type="decimal" nillable="true"/>
</sequence>
</complexType>
</element>
<element name="getEmpResponseElement">
<complexType>
<sequence>
<element name="result" type="tns:EmpRecUser" nillable="true"/>
</sequence>
</complexType>
</element>
<complexType name="EmpRecUser">
<complexContent>
<extension base="tns:EmpRecBase">
<sequence>
<element name="departmentId" type="decimal" nillable="true"/>
<element name="managerId" type="decimal" nillable="true"/>
<element name="hireDate" type="dateTime" nillable="true"/>
<element name="jobId" type="string" nillable="true"/>
<element name="employeeId" type="decimal" nillable="true"/>
<element name="commissionPct" type="decimal" nillable="true"/>
<element name="salary" type="decimal" nillable="true"/>
<element name="lastName" type="string" nillable="true"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="EmpRecBase">
<sequence/>
</complexType>
</schema>
</types>
<message name="EmpWebService_getEmp">
<part name="parameters" element="tns0:getEmpElement"/>
</message>
<message name="EmpWebService_getEmpResponse">
<part name="parameters" element="tns0:getEmpResponseElement"/>
</message>
<portType name="EmpWebService">
<operation name="getEmp">
<input message="tns:EmpWebService_getEmp"/>
<output message="tns:EmpWebService_getEmpResponse"/>
</operation>
</portType>
<binding name="EmpWebServiceSoapHttp" type="tns:EmpWebService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getEmp">
<soap:operation soapAction="http://hr/EmpWebService.wsdl/getEmp"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="EmpWebService">
<port name="EmpWebServiceSoapHttpPort" binding="tns:EmpWebServiceSoapHttp">
<soap:address location="http://localhost:8888/PL_SQL_WS-GetEmployee-context-root/EmpWebServiceSoapHttpPort"/>
</port>
</service>
</definitions>DSP validates the results from webservices. Whatever you tested the webservice with outside of DSP, probably does not.
Can you capture the output of the webservice and attach it as well? You can capture the webservice response by running the wls server with the command-line property -Dweblogic.webservice.verbose=true
Can you also open a case with customer support for this? I will not likely have much time to look at it.
- Mike
btw - the namespace prefixes are just place-holders that are defined with xmlns:prefix="some-uri". It is the namespace uri's that must be equivalent. If, in one case you have the definition xmlns:tns="myUri" and in another case xmlns:ns0="myUri" - then tns:EmpRecUser is equivalent to ns0:EmpRecUser.
Perhaps in the webservice result there is no definition, or an incorrect definition for the namespace prefix ns0 - that would explain the complaint about the QName ns0:EmpRecUser. According to the wsdl, there should be a definition for ns0 as :
xmlns:ns0="http://hr/EmpWebService.wsdl"
in the webservice response. -
Invalid or no mapping to system data types found.
Hello Netweaver gurus.
One of my client faces this issue. Has anybody come across similar error types ?
Regards,
Nitin KoushikHello Nitin,
In my opinion the error is because you would not be using an appropriate Entity to perform respective operation and can also be due to invalid mapping e.g. NUMC to Edm.Decimal
Lets say you have an Entity 'A' to Update a media content to BE. You can use the same Entity 'A' to Read the updated media content as well.
Leta say now you want to Read set of data from BE ( Not a Media content )
You cannot use the Entity 'A' to perform this. You need to have a different Entity which will get the info needed from BE.
Even if you forcefully try to map the response in code level, you will get the error ' Invalid or no mapping to system data types found '. This is because Entity 'A' would have got the special semantics to Read the media content not the set of data.
Kindly check this and also the Types , Type Lengths , No of Decimal Places etc...used in Model
Regards,
Ashwin -
Error occurs when updating grid Data Table - invalid value type [66000-150]
I am receiving the below error when using SetValue method of the Grid.DataTable object
Error No:-7768
Error Desc:Data Table - invalid value type [66000-150]
Any idea on why this error will ocurr
the data that I am trying to set is text and column data type is also text
sincerely yours
RayHi Ray,
I kind of faced a similar problem wherein, my functionalities work perfectly fine in the devt. environ but doesn't even reflects in the production environ. I kind of tried installing VS and removed it and things started working fine later.
Reason might be that some of the devt. components are missing in the production environ, other than .NET framework. If possible, you can try this.
Regards,
Satish. -
Getting error "Invalid or no mapping to system data types found" after sending file
Dear Experts,
I am successfully able to send file from client to gateway using "CREATE_STREAM". After request is completed i am receiving reponse like this
"Invalid or no mapping to system data types found". I dont know where i went wrong.
Did anyone experience same issue?
Pleases suggest.
Regards
PrabaharanHi Peter,
Good to know that it helped you.
Problem i am having is I dont have this method "SET_AS_CONTENT_TYPE( )" in class "/IWBEP/IF_MGW_ODATA_PROPERTY" because of my SAP Gateway system SP release level is less.
So i wasn't able to use this snippet.
IF lo_entity is BOUND.
lo_property = lo_entity->GET_PROPERTY( IV_PROPERTY_NAME = 'ContentType' ).
lo_property->SET_AS_CONTENT_TYPE( ).
ENDIF.
Is this the reasin i am not getting correct XML response back?
Regards
Prabaharan -
Argument data type varchar is invalid for argument 1 of formatmessage function
So, I have a need to parameterize my templates so I can dynamically compile and execute them as needed. I have read on some blogs that it is possible to use FORMATMESSAGE for user string formatting but I can't seem to get that working on my end and
would appreciate help getting this running.
I continually run into the following error message
Msg 8116, Level 16, State 1, Line 9
Argument data type varchar is invalid for argument 1 of formatmessage function.
when I try to execute either of the queries below
1)
SELECT FORMATMESSAGE ( CAST('%s' AS VARCHAR(10)), 'name' );
2)
-- printf formatting %[[flag][width][.precision]]typeDECLARE @Format CHAR(1) = '' -- '',+,-,0,#,' ' , @Width INT = 6 -- display field size , @Precision INT = 3 -- characters to display , @Type CHAR(1) = 'X' -- s, d, i, u, o, x, X , @Binary VARBINARY(128) = 0x1239 , @Int INT = 11 , @String NVARCHAR(128) = N'test'; DECLARE @$QL NVARCHAR(256) = ( SELECT FORMATMESSAGE( N'SELECT FORMATMESSAGE(''%%s -->%%%s*.*%s<--'', @$QL, %i, %i, %s)' , s.Flag , f.Type , @Width , @Precision , CASE WHEN @Type = 's' THEN FORMATMESSAGE('''%s''', @String) WHEN @Type = 'd' THEN FORMATMESSAGE('%d', @Int) WHEN @Type = 'i' THEN FORMATMESSAGE('%i', @Int) WHEN @Type = 'u' THEN FORMATMESSAGE('%u', @Int) WHEN @Type = 'o' THEN FORMATMESSAGE('%o', @Int) WHEN @Type = 'x' THEN FORMATMESSAGE('%x', @Binary) WHEN @Type = 'X' THEN FORMATMESSAGE('%X', @Binary) END ) FROM (SELECT ('') AS Flag UNION ALL SELECT ('+') UNION ALL SELECT ('-') UNION ALL SELECT ('0') UNION ALL SELECT ('#') UNION ALL SELECT (' ') ) AS s CROSS JOIN (SELECT ('s') AS Type UNION ALL SELECT ('d') UNION ALL SELECT ('i') UNION ALL SELECT ('u') UNION ALL SELECT ('o') UNION ALL SELECT (LOWER('x')) UNION ALL SELECT (UPPER('X')) ) as f WHERE CHARINDEX(@Format,s.Flag) > 0 AND ASCII(f.Type) = ASCII(@Type) );EXEC sp_executesql @$QL, N'@$QL NVARCHAR(256)', @$QL;
[email protected]Hi Databyter,
Based on my testing, the first query runs fine in a SQL Server 2012 while I got the same error in your post when trying to run it in a SQL Server 2008R2.
After going through the BOL of the FORMATMESSAGE for both versions, something came into my sight. The note below was removed in the 2012 BOL.
FORMATMESSAGE works only with messages created using
sp_addmessage.
BOL:FORMATMESSAGE(2008)
BOL:FORMATMESSAGE(2012)
The messages created using sp_addmessage can be viewed by using the sys.messages. Thus in SQL Server 2008, you have to follow the example to use the function or you get the error in your post.
SELECT * FROM sys.messages WHERE message_id = 20009 AND language_id = 1033;
DECLARE @var1 VARCHAR(200);
SELECT @var1 = FORMATMESSAGE(20009, 'First Variable', 'Second Variable');
SELECT @var1;
For some reason the limitation is removed in SQL Server 2012, that's why your first query runs fine.
If you have any feedback on our support, you can click
here.
Eric Zhang
TechNet Community Support -
Operand data type char is invalid for sum operator
can someone help me re-writing the following so I wont keep getting thie baopv ementioned error: here is the statement:
RIGHT('0000000000'+REPLACE(CAST(SUM(PAID_AMT) AS VARCHAR),'.',''),14) AS TOT_NET_PAID
+
RIGHT('0000000000'+REPLACE(CAST(SUM(PAID_AMT)
AS
VARCHAR),'.',''),14)
AS TOT_NET_PAID
It keeps retuning he following error messages:
Operand data type char is invalid for sum operatorAs Jingyang said, you cannot sum a non numeric field. Cast it to a numeric first (INT maybe?)
+ RIGHT('0000000000'+REPLACE(CAST(SUM(CAST(PAID_AMT AS INT)) AS VARCHAR),'.',''),14) AS TOT_NET_PAID
Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question. -
How to display images in BI Publisher from a LONG data type
We are storing images in Oracle Database as LONG data type. When I am giving query in BI Publisher and view the XML generated, I am getting the following error.
name was started with an invalid character. Error processing resource 'http://.......
<X_SIGNATURE>"N!0$$$$$$$#B!0$$$"X$$$$!3$$$!2$$#a$$$!1$!1$$$$$d$$$$#7$"X!0$"}@E$e"1"XM">K#@!P!P!Ga}!1!@!P!C#C"O!>...
Can anyone suggest the solution?Hi
my problem is, for each job_id there is many users. Oh that's something completlty different...
I Strongly Recommand to_
1.*create 2 tables Jobs & users*
2.*create a relation between them* 1 to many to get for each job more than a user that's the way that Must be -- execuse me the bad design of the db pulled u into this trap -
3.then u can deal with it normally no need to a sample code but just a form with Jobs as (Master) and Users as (detail) with a relation and with a simple query u can display each job_id is for many users.
no null values no commas r needed.
Hope this helps...
Regards,
Amatu Allah. -
Need to convert long data type to varchar2
I need to convert a long datatype in an existing table to a
varchar2, in either another table or view. I have a 3rd party
application which needs to query the data in the long data type,
but it can "handle" the long.
What is the best way to do this? I tried to make a trigger, but
I must be missing something. Here is the trigger.
CREATE OR REPLACE TRIGGER "PROD".SV_GET_RTG_COMNT
BEFORE INSERT OR UPDATE ON PROD.RELS_RTG_SEQ_COMNT
FOR EACH ROW
WHEN (OLD.rels_rtg_no = NEW.rels_rtg_no)
DECLARE
-- DECLARE VARIABLES
RTG_COMNT_VAR VARCHAR2(32);
RTG_COMNT_LONG LONG;
BEGIN
Select COMNT_TXT into RTG_COMNT_LONG
from rels_rtg_seq_comnt;
RTG_COMNT_VAR := 'TEXT' || substr(RTG_COMNT_LONG,1,32);
-- If INSERTING
Insert into SV_RTG_SEQ_COMNT (print_cd, comnt_no,
seq_no, rtg_no, comnt_txt) values
(:new.print_cd, :new.comnt_no, :new.seq_no, :new.rels_rtg_no,
rtg_comnt_var);
END;
I tried to use the substr command on the comnt_txt in view but
received an invalid datatype error.
Any help would be greatly appreciated.
Dougcreate another table with clob datatype
1)create table clob_tab(pkval number,clob_col clob);
2) insert into clob_tab (select pkval,to_lob(long_col) from
long_tab);
3) use dbms_lob package to do string manipulation using
substr,instr functions on clob column.
Maybe you are looking for
-
Printing barcode in oracle report 6i in character mode
Hi there, I am new in oracle reports, especially in printing it in character mode. I am trying to create a report for ticketing purposes, so I have to put barcode on it. So far, I did follow this link Printing in character mode (urgent) and yes, I di
-
Cancel Message in Adapter Module
Hi, I want to set the Status of a message to Canceled from within an Adapter Module. Is this possible? The problem I have is with a Mail receiver sending messages with blank attachments. I want the adapter module to check if the attachment is empty,
-
Hello: I just downloaded a movie but I cannot any video when trying to watch it. I just get n image of white and grey squares. Sound is ok ???
-
AADC Shown on .PQR report but Not within mailstream's endorsement line
We are mailing 1st class letters, palletized mail that qualifies for Full Service discounts. An interesting thing happened recently. on a job of 853 pieces, the PQR report listed 3 trays of 597 pieces that qualified for the auto 3-digit rate, 1 tray
-
Confused about OCA, OCP & OCM (Need some clarifications)
I want to do Oracle Certification. I have following queries and would appreciate, if someone can answer me in detail. 1. Do I need to pass OCA first and then only I can appear for OCP? Cann't I directly just pass OCP exams and become OCP? 2. For OCP,