Conversion Problem from character to number
Dear All,
I have a file which i have loaded in the table through SQL loader.
After using substring function, i got the desired information.
Now I want to put the extracted information in another table.
Following is my table defination:
RECORD VARCHAR2(3)
COUNTRY_CODE VARCHAR2(3)
CUSTOMER_ID NUMBER(11)
CONTRACT_ID NUMBER(11)
ORDER_TYPE VARCHAR2(3)
ORDER_ID NUMBER(20)
AUTH_ID NUMBER(20)
AMOUNT NUMBER(12,2)
TAX NUMBER(12,2)
TOTAL_AMOUNT NUMBER(12,2)
CURRENCY VARCHAR2(3)
PAYMENT_METHOD VARCHAR2(1)
INSERT_UPDATE_DATE DATE
NET_CREDIT_AMOUNT NUMBER(12,2)
NET_CREDIT_TAX NUMBER(12,2)
NET_CREDIT_TOTAL NUMBER(12,2)
GROSS_CREDIT NUMBER(12,2)
But I an getting the error like ORA-00932: inconsistent datatypes: expected - got NUMBER
Any one can help me????????
Regards
Gaurav
I have forgotten to show you the record that I am trying to insert into table
I have date in following format in file 2005/09/30 08:10:55
Amont in this format 0000000000026.07
Similar Messages
-
Conversion error, from character set 4102 to character set 4103
Hi,
We've developed a JCO server(in Java) with an ABAP report the function provided by the JCO server.
MetaData:
static {
repository = new Repository("SMSRepository");
fmeta = new JCO.MetaData("ZSMSSEND");
fmeta.addInfo("TO", JCO.TYPE_CHAR, 255, 0, 0, JCO.IMPORT_PARAMETER, null);
fmeta.addInfo("CONTENT", JCO.TYPE_CHAR, 255, 0, 0, JCO.IMPORT_PARAMETER, null);
fmeta.addInfo("RETN", JCO.TYPE_CHAR, 255, 0, 0, JCO.EXPORT_PARAMETER, null);
repository.addFunctionInterfaceToCache(fmeta);
Server parameters:
Properties prop = new Properties();
prop.put("jco.server.gwhost","shaw2k07");
prop.put("jco.server.gwserv","sapgw01");
prop.put("jco.server.progid","JCOSERVER01");
prop.put("jco.server.unicode","1");
srv = new SMSServer(prop,repository);
If we run JCO server in both my client machine(from developer studio) and in the WAS machine(stand alone Java program), everything is ok. In the Abap side, the SM59 unicode test return the destination is an unicode system, and the ABAP report call the function can run smoothly.
But we package this JCO server to a web application and deploy to WAS, problem occured. The SM59 unicode test still say the destination is an unicode system. But the ABAP report runs with an ABAP DUMP:
Conversion error between two character set
RFC_CONVERSION_FIELD
Conversion error "RETN" from character set 4102 to character set 4103
A conversion error occurred during the execution of a Remote Function
Call. This happened either when the data was received or when it was
sent. The latter case can only occur if the data is sent from a Unicode
system to a non-Unicode system.
I read the jrfc.trc log, it shows it receives data in unicode 4103(that's ok), but send data in unicode 4102(that's the problem).4102 is UTF-16 Big Endian and 4103 UTF-16 Little Endian. Our system is windows on intel 32 aritechture, so based on Note 552464, it should be 4103.
Why it sends data (Java JCO server send output parameter to ABAP) in 4102?????
What's the problem??? Thank you very much!!
Best Regards,
Xiaoming Yang
Message was edited by:
Xiaoming YangHello Experts,
Any replies on this?
I am also getting a similar kind of error.
Do you have any idea on this?
Thanks and Best Regards,
Suresh -
Enterprise application conversion problem from WLS 10.3.0 to WLS 10.3.2
Hi all,
I'm posting this just to document a problem I had when converting an Enterprise Application from WLS 10.3.0 across to WLS 10.3.2 environment.
Upon deployment of the application I was getting this error:
Caused By: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.ApplicationParamBeanImpl@b720894d(/ApplicationParams[webapp.encoding.default])"
at weblogic.descriptor.internal.ReferenceManager.registerBean(ReferenceManager.java:227)
at weblogic.j2ee.descriptor.wl.WeblogicApplicationBeanImpl.setApplicationParams(WeblogicApplicationBeanImpl.java:560)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.staxb.runtime.internal.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:48)
at com.bea.staxb.runtime.internal.RuntimeBindingType$BeanRuntimeProperty.setValue(RuntimeBindingType.java:536)
at com.bea.staxb.runtime.internal.AttributeRuntimeBindingType$QNameRuntimeProperty.fillCollection(AttributeRuntimeBindingType.java:381)
at com.bea.staxb.runtime.internal.MultiIntermediary.getFinalValue(MultiIntermediary.java:52)
at com.bea.staxb.runtime.internal.AttributeRuntimeBindingType.getFinalObjectFromIntermediary(AttributeRuntimeBindingType.java:140)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalBindingType(UnmarshalResult.java:200)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:169)
at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:150)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:323)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:409)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
at weblogic.application.ApplicationDescriptor.getWeblogicApplicationDescriptor(ApplicationDescriptor.java:329)
at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:181)
at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:88)
at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:66)
at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:314)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:81)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:97)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
It turns out this was an issue with the META-INF/weblogic-application.xml having duplicate entries for the "webapp.encoding.default" parameter.
This obviously got duplicated when my app was re-imported into the Eclipse OPEP environment for WLS 10.3.2
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd">
<!-- server-version: 10.3 -->
<!--weblogic-version:10.3.2-->
<wls:application-param>
<wls:param-name>webapp.encoding.default</wls:param-name>
<wls:param-value>UTF-8</wls:param-value>
</wls:application-param>
<wls:application-param>
<wls:param-name>webapp.encoding.default</wls:param-name>
<wls:param-value>UTF-8</wls:param-value>
</wls:application-param>
</wls:weblogic-application>
Removing the duplicate entry resolved this problem.
I hope this helps anyone else that experiences this issue.
Regards,
PaulBelow link might be helpful.
http://kr.forums.oracle.com/forums/thread.jspa?threadID=1049509&tstart=0
Regards,
Anandraj
http://weblogic-wonders.com/ -
Loading EMF and Conversion Problem from EMF to SVG in Adobe illustrator CC
Hello,
I have downloaded trial version of adobe illustrator CC.
I am importing .emf file into adobe illustrator CC. it loads an emf file properly with its content but my emf file contains some lines(--------) also..imported emf file doesn't show any line.
My main motive is convert this emf file into svg file. but as because my emf file is not imported properly, so as with SVG.
Ask one more important thing, why converted svg file from emf appears to be having different fonts and margins.
Kindly helpThe problem is once I finished with the art, I deleted the template, and there's a big art board there and it's in the way, I don't want it to affect the size and dimensions of the channel art. I just need it to be 2560px by 1440px wide, is there any way I can save it exactly like that?
Not sure what you mean by "it's in the way."
The size of the artboard doesn't necessarily affect the "size of the art." (There are some workflow scenarios where the artboard size is recognized and utilized, but for the most part it is simply a 'passive' boundary.)
If your art is 2560px X 1440px, and you want the artboard to match, double-click the artboard tool and choose "Fit to Artwork Bounds" at the top of the preset menu. -
Conversion problem from 8.5 to 10.0
Hello,
I have a report that was created in 8.5. We're upgrading our manufacturing software (SQL database) and the report needs to be converted to Crystal 10.0 to be compatible. I also have to change the datasource location. The 8.5 report has 16 parameter fields.
When I open the report in 10.0 and change datasource location, the mapping seems to work ok. But when I go to refresh the data, only two of the parameter fields show up. If I look at the SHOW SQL QUERY in both versions, they look quite different.
Any ideas on this will be greatly appreciated.
Thanks !
- BOB -Hi Bob -
That sounds whacko. I've never worked with 10 - only 8.5, 9, and XI. I remember hearing lots that 10 had issues - maybe this was one? Right now I'm stuck with 9 because of compatibility issues in our company. You've probably already tried this, but can you recreate the params in 10? Better yet, drop them in the 8.5 version, THEN do the conversion, then recreate the params? Be sure you don't get stuck with the report needing to run without the params because you'll be liabel to sit there all day (or dump out) while the report runs without them.
I might be way off the track. I think I'll go back and review your original question. Too bad I can't from here!
Have a great day -
Alex -
Conversion problem from AppleWorks document
I have a number of documents in Appleworks format that I have opened in Pages and then saved as a Pages document. I viewed and worked on them several times, but now when I open them, some of the images are thumbnail size and some have changed places with others. I went back to the original AW document to go through the process again and the same thing happens after saving and reopening.
Am I missing something about those images? I can't place them from a media file as they exist only in the original AW file, so what am I to do? I have tried closing the file and reopening it, but the same mistakes are there.
Any ideas?Hi Scott,
Is this happening while exporting the reports or while viewing?
However, if it is while exporting then you can use this with Crystal Reports XI (version greater than 10) by manipulating the
ExcelFormatOptions.ExportPageHeadersAndFooters
Hope it helps!
AG. -
Conversion problem from PM7 Win to InD CS3
My client sent 400 CAD images to a design company in India to have them converted into PM7 sheets to for printed here in the US!!!!
I just received the PM files-I do have a copy of PM 7 on an XP Win PC.
The printer also happens to have PM7 but is having difficulty converting the files to .PDF for printing. My solution, I think, is to open the .PMD (PM7) on my Mac using InD CS3, making page order changes, and converting to .PDF for printing. Seems there is distortion when I open in CS3. I understand there is a FREE Plug-in for Pagemaker 7 that is available. I have never configured a Plug in-only used native ones. Can anyone advise or does anyone have another fix?
Many thanks
Gail BOH YEAH! IDIOTIC from my point of view.
They brought the files into PM& (because this is what they have and
this company does not want to spend $ on upgrading-which if fine if
they were only working in house-a manufacturer) that's why they sent
it India-thought they could save $ NOT! I could have done it right
in the first place.) They needed borders and text and logos etc place
on the final pages. The India firm mis-placed certain pages-this is a
double side print and they neglected to take into consideration that T
of C and others are single sided print- and so on. So do you think I
have to stay in PM7 . I thought the reason the distortion was
happening was because they DID NOT embed the CAD images.
Thanks for any help on this lovely Sunday morning in NJ -
Digital Classroom Lesson Conversion Problem from Premiere Pro CS5 to CS5.5?
I have the book Premiere Pro CS5 and CS5.5 Digital Classroom. The project lessons on the dvd do not convert for use with my Premiere Pro CS5.5 program. Has anyone had this issue and found a resolve?
Thanks
jimI did copy the lessons to drive and tried to open project then this comes up:
This project was saved from a previous version of Adobe Premiere Pro and must be converted. The original project file will not be modified. Continue?
It gives you a file to convert.... but it does not convert. That is there is a project in form but no videos or images.
Importing the project will skip the question above but end result the same. -
When I attempt to convert a pdf file to a word file it does not let me and I am re-directed to the purchase page. I already paid for this service and It will not let me convert. What is going on here ?
I guess I do not matter. You all have my money and that is all you care about. Forget it. I'll call tomorrow and somehow get this figured out myself. Sorry for the harsh attitude but this is so frustrating and there is no reason why I should not be able to do this. Buenos Noches
-
Numeric or value error: character to number conversion error
I'm having problems inserting a value from a date picker field (DD-MON-YYYY HH MI )
i'm submitting this value to a packaged procedure that accepts this field as VARCHAR2 .
on the insert, i do a to_date( P_DATE, 'DD-MON-YYYY HH:MI PM' )
and i get the numeric conversion error.
If I change the to_date on the procedure side, I get the :could not read the end of the format mask - which I've found threads about on this site.
I've tried using HH24 and different formats, but I get one of the two above errors on the insert.
If I don't fill in the datepicker field at all, it works fine.
help is appreciated !
BillHere is the trace anyway:
*** ACTION NAME:(application 4000, page 1) 2004-09-24 12:58:44.052
*** MODULE NAME:(HTML DB) 2004-09-24 12:58:44.052
*** SERVICE NAME:(TOPS) 2004-09-24 12:58:44.052
*** SESSION ID:(151.1) 2004-09-24 12:58:44.052
*** 2004-09-24 12:58:44.052
ksedmp: internal or fatal error
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
Current SQL statement for this session:
declare
rc__ number;
begin
owa.init_cgi_env(:n__,:nm__,:v__);
htp.HTBUF_LEN := 255;
null;
null;
null;
null;
f(p=>:p);
if (wpg_docload.is_file_download) then
rc__ := 1;
wpg_docload.get_download_file(:doc_info);
null;
null;
null;
commit;
else
rc__ := 0;
null;
null;
null;
commit;
owa.get_page(:data__,:ndata__);
end if;
:rc__ := rc__;
end;
----- PL/SQL Call Stack -----
object line object
handle number name
6A3C4A00 532 package body FLOWS_010500.WWV_FLOW_UTILITIES
6A3C4A00 2502 package body FLOWS_010500.WWV_FLOW_UTILITIES
6A3C4A00 2748 package body FLOWS_010500.WWV_FLOW_UTILITIES
6A0E63C8 991 package body FLOWS_010500.WWV_FLOW_FORMS
6A11675C 932 package body FLOWS_010500.WWV_FLOW_DISP_PAGE_PLUGS
6A11675C 247 package body FLOWS_010500.WWV_FLOW_DISP_PAGE_PLUGS
6A4B54E0 8341 package body FLOWS_010500.WWV_FLOW
6A2A99F0 102 procedure FLOWS_010500.F
6A2B9E54 10 anonymous block
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
ksedmp+524 CALLrel ksedst+0 1
ksedmptracecb+15 CALLrel _ksedmp+0 C
_ksddoa+118 CALLreg 00000000 C
ksdpcg+143 CALLrel ksddoa+0
ksdpec+180 CALLrel ksdpcg+0 1966 6D7D208 1
__PGOSF3__ksfpec+11 CALLrel _ksdpec+0 0
8
_kgerev+77 CALLreg 00000000 7474210 1966
kgerec1+18 CALLrel kgerev+0 7474210 6DCE5EC 1966 1
6D7D260
peirve+465 CALLrel kgerec1+0
pevmCVTCN+346 CALLrel _peirve+0
pfrinstrCVTCN+36 CALLrel pevmCVTCN+0 6E6E604 71CE370 7160F0C
pfrrunno_tool+51 CALL??? 00000000
pfrrun+1834 CALLrel pfrrun_no_tool+0 6E6E604 6A3C010A 6E6E640
plsqlrun+1051 CALLrel _pfrrun+0 6E6E604
peicnt+179 CALLrel plsql_run+0 6E6E604 1 0
kkxexe+477 CALLrel peicnt+0
opiexe+4896 CALLrel kkxexe+0 6A2B9E54
kpoal8+1705 CALLrel opiexe+0 49 3 6D7E06C
_opiodr+977 CALLreg 00000000 5E 14 6D7E7CC
_ttcpip+1827 CALLreg 00000000 5E 14 6D7E7CC 0
_opitsk+1098 CALL??? 00000000
opiino+938 CALLrel opitsk+0 0 0 747ABC0 6DEFB14 D8 0
_opiodr+977 CALLreg 00000000 3C 4 6D7FBBC
opidrv+479 CALLrel opiodr+0 3C 4 6D7FBBC 0
sou2o+45 CALLrel opidrv+0 3C 4 6D7FBBC
opimai+237 CALLrel sou2o+0
OracleThreadStart@ CALLrel opimai+0
4+899
77E7D338 CALLreg 00000000 -
ORA-06502: PL/SQL: numeric or value error: character to number conversion
Hello,
I am new to Oracle Apex so I decided to read and do the tutorials that are on the apex.oracle.com site.
Now I am at the tutorial 6: How to Work with Check Boxes of the Advanced Tutorials.
At a certain point you have to add a new radio button.
At the Item Source Value you have to add SELECT 'Y' FROM DUAL WHERE :P2_LIST_PRICE*0.75=:P2_MIN_PRICE.
But when I try to create the item, I keep getting the following error:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
Error creating item.
Does anybody know what could be the problem.
Thanks in advance.CREATE OR REPLACE PROCEDURE xxbb_query (
p_branch_code XXBOB_HRMS_APPRAISALS_DATA.Branch_code%TYPE,
p_PERIOD_NAME XXBOB_HRMS_APPRAISALS_DATA.PERIOD_NAME%TYPE
IS
emp_refcur SYS_REFCURSOR;
v_deposits XXBOB_HRMS_APPRAISALS_DATA.deposits%TYPE :=0;
v_branch_code XXBOB_HRMS_APPRAISALS_DATA.branch_code%TYPE:=0;
p_query_string VARCHAR2(500);
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello' || ' ' || '...');
p_query_string := 'SELECT Avg(deposits) Dep,branch_code FROM XXBOB_HRMS_APPRAISALS_DATA WHERE ' ||
*' Branch_code = :branch_code '||*
*' AND PERIOD_NAME = SubStr( :PERIOD_NAME ,1,4))||(SubStr( :PERIOD_NAME ,InStr( :PERIOD_NAME ,'-',1,1)+3,5)) ' ||*
*' group BY SubStr(PERIOD_NAME,5),BRANCH_CODE ';*
DBMS_OUTPUT.PUT_LINE('Hi' || ' ' || '...');
OPEN emp_refcur
FOR p_query_string USING p_branch_code,v_p_PERIOD_NAME,v_p_PERIOD_NAME,v_p_PERIOD_NAME;
-- DBMS_OUTPUT.PUT_LINE('----- -------');
Here I m passing a string variable to pass the select statement for the ref cursor.
There seems some problem in the substr conversion in the statement.
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
But when i run as a independent staement passing real values in the place of placeholders
i get the result right.
The *:PERIOD_NAME* format is *'Jan-2009-10'* .
And I need to pass the *:PERIOD_NAME* to the query as *'Jan-09-10'*
Pls suggest.
Edited by: user7391361 on Jul 23, 2009 8:28 AM -
Conversion failed when converting date and/or time from character string
Hi experts,
I'm trying running a query in Microsoft Query but it gives the following error message:
"conversion failed when converting date and/or time from character string"
when asks me the data I'm inserting 31-01-2014
i've copy the query form the forum:
SELECT T1.CardCode, T1.CardName, T1.CreditLine, T0.RefDate, T0.Ref1 'Document Number',
CASE WHEN T0.TransType=13 THEN 'Invoice'
WHEN T0.TransType=14 THEN 'Credit Note'
WHEN T0.TransType=30 THEN 'Journal'
WHEN T0.TransType=24 THEN 'Receipt'
END AS 'Document Type',
T0.DueDate, (T0.Debit- T0.Credit) 'Balance'
,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')<=-1),0) 'Future'
,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=0 and DateDiff(day, T0.DueDate,'[%1]')<=30),0) 'Current'
,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>30 and DateDiff(day, T0.DueDate,'[%1]')<=60),0) '31-60 Days'
,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>60 and DateDiff(day, T0.DueDate,'[%1]')<=90),0) '61-90 Days'
,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>90 and DateDiff(day, T0.DueDate,'[%1]')<=120),0) '91-120 Days'
,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=121),0) '121+ Days'
FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
WHERE (T0.MthDate IS NULL OR T0.MthDate > ?) AND T0.RefDate <= ? AND T1.CardType = 'C'
ORDER BY T1.CardCode, T0.DueDate, T0.Ref1Hi,
The above error appears due to date format is differnt from SAP query generator and SQL server.
So you need convert all date in above query to SQL server required format.
Try to convert..let me know if not possible.
Thanks & Regards,
Nagarajan -
I have a table-valued function that run in sql 2005 and when try to execute in sql 2008 r2, return the next "Conversion failed when converting date and/or time from character string".
USE [Runtime]
GO
/****** Object: UserDefinedFunction [dbo].[f_Pinto_Graf_P_Opt] Script Date: 06/11/2013 08:47:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[f_Pinto_Graf_P_Opt] (@fechaInicio datetime, @fechaFin datetime)
-- Declaramos la tabla "@Produc_Opt" que será devuelta por la funcion
RETURNS @Produc_Opt table ( Hora datetime,NSACOS int, NSACOS_opt int)
AS
BEGIN
-- Crea el Cursor
DECLARE cursorHora CURSOR
READ_ONLY
FOR SELECT DateTime, Value FROM f_PP_Graficas ('Pinto_CON_SACOS',@fechaInicio, @fechaFin,'Pinto_PRODUCTO')
-- Declaracion de variables locales
DECLARE @produc_opt_hora int
DECLARE @produc_opt_parc int
DECLARE @nsacos int
DECLARE @time_parc datetime
-- Inicializamos VARIABLES
SET @produc_opt_hora = (SELECT * FROM f_Valor (@fechaFin,'Pinto_PRODUC_OPT'))
-- Abre y se crea el conjunto del cursor
OPEN cursorHora
-- Comenzamos los calculos
FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
/************ BUCLE WHILE QUE SE VA A MOVER A TRAVES DEL CURSOR ************/
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status = -2)
BEGIN
-- Terminamos la ejecucion
BREAK
END
-- REALIZAMOS CÁLCULOS
SET @produc_opt_parc = (SELECT dbo.f_P_Opt_Parc (@fechaInicio,@time_parc,@produc_opt_hora))
-- INSERTAMOS VALORES EN LA TABLA
INSERT @Produc_Opt VALUES (@time_parc,@nsacos, @produc_opt_parc)
-- Avanzamos el cursor
FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
END
/************ FIN DEL BUCLE QUE SE MUEVE A TRAVES DEL CURSOR ***************/
-- Cerramos el cursor
CLOSE cursorHora
-- Liberamos los cursores
DEALLOCATE cursorHora
RETURN
ENDYou can search the forums for that error message and find previous discussions - they all boil down to the same problem. Somewhere in your query that calls this function, the code invoked implicitly converts from string to date/datetime. In general,
this works in any version of sql server if the runtime settings are correct for the format of the string data. The fact that it works in one server and not in another server suggests that the query executes with different settings - and I'll assume for
the moment that the format of the data involved in this conversion is consistent within the database/resultset and consistent between the 2 servers.
I suggest you read Tibor's guide to the datetime datatype (via the link to his site below) first - then go find the actual code that performs this conversion. It may not be in the function you posted, since that function also executes other functions.
You also did not post the query that calls this function, so this function may not, in fact, be the source of the problem at all.
Tibor's site -
Error ORA-06502, numeric or value error character to number conversion
I have been trying to create an email including data from a table as part of the body. Whenever I try to send it, I get an error ORA-06502, numeric or value error, character to number conversion. If I take out the part referencing the table, the email will go without error, but if I put it back in I get the error.
There is the code:
DECLARE
v_email_body CLOB;
v_from_email_address VARCHAR2(100) := v('APP_USER');
v_id NUMBER;
BEGIN
v_email_body := 'Please pay the attached invoice from FY '||:P14_FY||' funds
Date: '||:P14_PURCHASE_DATE||'
Vendor: '||:P14_VENDOR||'
Invoice Number: '||:P14_INVOICE||'
Invoice Date: '||:P14_INVOICE_DT||'
Due Date: '||:P14_INVOICE_DUE_DT||'
KSR Number: '||:P14_KSR||'
DTS PO: '||:P14_DTS_PO||'
FINANCE DO: '||:P14_FINANCE_PO||'
FOR detail IN(SELECT OB_CODE
FROM BUDGET_USED
WHERE P_ID = :P14_ID)
v_email_body := v_email_body||detail.OB_CODE||utl_tcp.crlf;
LOOP
FOR detail2 IN (SELECT ob_code, amount
FROM budget_used
WHERE p_id = :P14_ID)
LOOP
v_email_body := v_email_body||detail2.ELCID||' - '||detail2.AMOUNT||utl_tcp.crlf;
END LOOP;
END LOOP;
v_email_body := v_email_body
'||:P14_EMAIL_NOTES||'
Thanks.
v_id := APEX_MAIL.SEND
(p_to => :P14_SUBMIT_TO
,p_cc => v('APP_USER')
,p_bcc => '[email protected]'
,p_from => v_from_email_address
,p_body => v_email_body
,p_subj => 'Invoice, '||:P14_VENDOR||', '||:P14_INVOICE||'');
--Having set up your email, now add one (or more) attachments...
FOR c1 in (SELECT FILENAME
,BLOB_CONTENT
,MIME_TYPE
FROM file_subjects f, apex_application_files a
where a.name = f.name
and f.P_ID = :P14_ID) LOOP
IF c1.blob_content IS NOT NULL THEN
APEX_MAIL.ADD_ATTACHMENT( p_mail_id => v_id,
p_attachment => c1.blob_content,
p_filename => c1.filename,
p_mime_type => c1.mime_type);
END IF;
END LOOP;
END;
Apex_mail.push_queue();
This is important to my company to be able to put this data into an email. If anyone can help me, I would greatly appreciate it. Thank you in advance.Lets isolate the erroring line by running the code in debug mode and adding some debug lines at various stages in the code
Apex has a builtin function named wwv_flow.debug which can print messages to the debug stack and would be visible when the page is run in debug mode.
DECLARE
v_email_body CLOB;
v_from_email_address VARCHAR2(100) := v('APP_USER');
v_id NUMBER;
BEGIN
wwv_flow.debug('BEGIN');
v_email_body := 'Please pay the attached invoice from FY '||:P14_FY||' funds
Date: '||:P14_PURCHASE_DATE||'
Vendor: '||:P14_VENDOR||'
Invoice Number: '||:P14_INVOICE||'
Invoice Date: '||:P14_INVOICE_DT||'
Due Date: '||:P14_INVOICE_DUE_DT||'
KSR Number: '||:P14_KSR||'
DTS PO: '||:P14_DTS_PO||'
FINANCE DO: '||:P14_FINANCE_PO||'
'||:P14_EMAIL_NOTES||'
Thanks.
wwv_flow.debug('Before sending mail');
v_id := APEX_MAIL.SEND
(p_to => :P14_SUBMIT_TO
,p_cc => v('APP_USER')
,p_bcc => '[email protected]'
,p_from => v_from_email_address
,p_body => v_email_body
,p_subj => 'Invoice, '||:P14_VENDOR||', '||:P14_INVOICE||'');
wwv_flow.debug('Before attachements');
--Having set up your email, now add one (or more) attachments...
FOR c1 in
(SELECT FILENAME
,BLOB_CONTENT
,MIME_TYPE
FROM file_subjects f, apex_application_files a
where a.name = f.name
and f.P_ID = :P14_ID)
LOOP
IF c1.blob_content IS NOT NULL THEN
APEX_MAIL.ADD_ATTACHMENT( p_mail_id => v_id,
p_attachment => c1.blob_content,
p_filename => c1.filename,
p_mime_type => c1.mime_type);
END IF;
END LOOP;
wwv_flow.debug('Finished attachements');
Apex_mail.push_queue();
END;What is the last message you see in the debug after running the page in debug mode and submitting it ? -
PL/SQL: numeric or value error: character to number conversion error in TRG
Hi,
I've got strange issue with one trigger which during update of table reports (DB is 9.2.0.8):
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "UDR_LOG", line 345
ORA-04088: error during execution of trigger 'UDR_LOG'but line 345 is:
END IF;
so its kind of strange
the code looks like
343 IF nvl(to_char(:old.PKD_ID),'''') <> nvl(to_char(:new.PKD_ID),'''') THEN
344 v_zmn := v_zmn || 'PKD_ID''' || to_char(:old.PKD_ID) || '''' || to_char(:new.PKD_ID) || '''';
345 END IF;
so its concatenation not to_number usage .error is triggered by update statement on any column .
I'm sorry I cant provide You with whole trigger code .
So if You could only recommend any investigation method that would be great .
Regards
GregHi, Greg,
When there's an error in a trigger, the line numbers in the error messages are relative to the first DECLARE or BEGIN statement; often, that's a few lines after CREATE OR REPLACE TRIGGER. Post a few lines after what you already posted.
If you can't find the error, then create another table for testing this, and create a smaller trigger on that table, which does only enough to cause the error. Then you'll be able to post the complete trigger, and the code needed to re-create the problem.
Maybe you are looking for
-
BAdI Implementation for Customer/Vendor Basic Data
My requirement is, In vendor and Customer Invoices I need to include a Employee Data [z table] which is a item data and this employee data will be in a table control in the BAdI - BADI_FDCB_SUBBAS01. For doing this, I need a program specifications an
-
LIke the title says, attempting to load https://www.google.com/contacts results in the page load sticking at "Loading ..." This works fine in Internet Explorer and Chrome. I emptied the cache and cookies and tried Cntrl-F5 and none of those worked.
-
When u2018Basic date Schedulingu2019 is used & when u2018Lead time schedulingu2019 is used in PP-Scheduling process?
-
My Ipod Shuffle requires Itunes 10 but with my Mac OS 10.4.11 I can not run itunes 10. Is there another way to load this ipod shuffle without updating to Snow Leapord?
-
hello all, this is 10g on AIX(RAC). i have been trying to use a index on a query forcefully by using a HINT ..here is the query. SELECT m.* FROM law.messages m inner join law.log_events l on l.bod_id = m.bod_id and l.type = 'LogEventException' WHERE