Arithmetic Overflow error converting float to data type numeric
Hi,
Am facing strange issue,I have function which returns money datatype and assigning the return money value to float datatype in table.
Error msg:
Msg 8115, Level 16, State 6, Procedure GBCalcCatalogPriceNewV2, Line 204
Arithmetic overflow error converting float to data type numeric.
The statement has been terminated.
Strange thing is the same stored procedure is working fine in production environment,but in the deveopment i see this error.Am scared if the same happens in the production environment.Please advice and advance
thanks
Regards
RAj
Strange thing is the same stored procedure is working fine in production environment,
How could that be strange? This is an error that occurs depending on the data. Accidents that are waiting to happen will happen sooner or later.
Then again, a development database may be more prone to such errors, because data that entered are completely out of whack with real life data. Still it is a warning sign. If you have some place where you convert data from float to numeric, you must consider
the risk that the float value is outside the range for the numeric data type. How do you prevent that from happening? Maybe a CHECK constraint on the column? Of if the data origins from a money column, use a numeric data type with sufficient precision.
Erland Sommarskog, SQL Server MVP, [email protected]
Similar Messages
-
CAST Not working for me - Arithmetic overflow error converting int to data type numeric - error
GPM is DECIMAL(5,2)
PRICE is DECIMAL(11,4)
COST is DECIMAL(7,2)
Trying to update the Gross Profit Margin % field and I keep getting the "Arithmetic overflow error converting int to data type numeric" error.
UPDATE SMEMODETAIL SET SMD_GPM = (SMD_PRICE-SMD_COST) / SMD_PRICE * 100
FROM SMEMODETAIL WHERE SMD_PRICE<>0 AND SMD_QUANTITY<>0
Example record:
SMD_PRICE SMD_COST GPM%
1.8500 1.62 12.4324324324324300
I added cast and I still get the error.
How do I format to get this to work?
Thanks!Hi GBerthume,
The error is caused by some value such as 1000.01 of the expression (SMD_PRICE-SMD_COST) / SMD_PRICE * 100 exceeds the
precision of the column(DECIMAL(5,2)). The example data doesn't cause the overflow error for the value of the expression is 12.43 which is in the scope of DECIMAL(5,2).
USE TestDB
CREATE TABLE SMEMODETAIL
SMD_PRICE DECIMAL(11,4),
SMD_COST DECIMAL(7,2),
SMD_GPM DECIMAL(5,2)
INSERT INTO SMEMODETAIL(SMD_PRICE,SMD_COST) SELECT 1.8500,1.62
UPDATE SMEMODETAIL SET SMD_GPM = (SMD_PRICE-SMD_COST) / SMD_PRICE * 100
FROM SMEMODETAIL WHERE SMD_PRICE<>0-- AND SMD_QUANTITY<>0
SELECT * FROM SMEMODETAIL
DROP TABLE SMEMODETAIL
The solution of your case can be either scale the DECIMAL(5,2) or follow the suggestion in Scott_morris-ga's to check and fix your data.
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
Arithmetic overflow error converting expression to data type int
Hi
iam creating on sp for the database total size , used mb and free size . percentage free .
in this purpose i was creating on sps, with in the sp iam was writing one select statement . it statement is
SELECT [Drivename] ,[DataSizedUsedMB],[DriveFreeSizeMB],DriveTotalSizeMB,
CAST( (DriveFreeSizeMB/DriveTotalSizeMB)* 100 AS NUMERIC(5,2))
As
[PercentFree] ,[DateRecorded] FROM
SELECT SUBSTRING([physical_name],1,1) AS Drivename,
CAST(((SUM(COALESCE(size,0)))*8)/1024 AS NUMERIC(20,2)) AS DriveTotalSizeMB,
CAST(((SUM( COALESCE( FILEPROPERTY( [name],'SpaceUsed'),0)))*8)/1024 AS NUMERIC(20,2)) AS DataSizedUsedMB,
CAST(((SUM(COALESCE(size,0))-SUM(COALESCE(fileproperty([name],'spaceused'),0)))*8/1024)AS NUMERIC(20,2)) AS DriveFreeSizeMB
,SYSDATETIME() AS [DateRecorded]
FROM sys.master_files
GROUP BY SUBSTRING([physical_name],1,1)) AS Data
it was executive one server with out error but the same select statement is writing antoher server iam geeting belo error.
"@ErrorDesc: Line 24 - Line 13- Arithmetic overflow error converting expression to data type int."
how to slove this issue..
please help me...Change 8 to 8E0, to make it a float literal. The data type of
SUM(COALESCE(size,0)))*8)
is int, since all components are int, and it can easily overflow the size for an int. If you use 8E0, you get a float, and the entire expression will be float.
Erland Sommarskog, SQL Server MVP, [email protected] -
Arithmetic overflow error converting expression to data type int. Why in this case?
Hi guys, it is Friday and I am really tired but..
WITH CTE AS (
SELECT LEN(CONS_ID) AS PROCA FROM TryCons)
SELECT SUM(PROCA) FROM CTE
Why I retrieve
Arithmetic overflow error converting expression to data type int.
Len should returns a number and so sum should work. It can be because I am trying to read 500 millions rows? But it wouldn't make sense..Len should returns a number and so sum should work. It can be because I am trying to read 500 millions rows? But it wouldn't make sense..
If the average length of the field exceeds 4.29, that statement will explode. Since I don't know what's in CONS_ID, I can't say whether it makes sense or not. Although, I will have to say that from my uninitiated position, this seems like an
accident to happen.
Erland Sommarskog, SQL Server MVP, [email protected] -
SQL 8115 : Arithmetic overflow error when running index analysis
Hi experts,
I got an error: "SQL 8115 : Arithmetic overflow error converting float to data type numeric
row 1, col -1 [WP3 ] [sap_index_recommend:BUILD_N_E", please help.Hi João,
It has been done. -
MBVOutPut Error PopulateFromRecordset, Err msg :Arithmetic overflow error
Hi all
We are experiencing technical difficulties. ie We have an Orchestration based Web Service,
That sporadically consumes lots of Memory.
An Initial Analysis with Message Box Viewer.. Shows the following msg below.
Any idea how one, can Interpret the message, locate and fix it?
Thank in Advance
ERROR : PopulateFromRecordset, Err msg :Arithmetic overflow error
converting int to data type numeric. (STAGE : Executing SQL Query)
MSGBOX DB 1 (MASTER) "BizTalkMsgBoxDb" on zx1000\BizTalkServer
Col1
NULL
1 Rows
AKEHere is part of the scenario.
Type: = WCF-Basic-Http
SOAP Action Header
<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" mlns:xsd="http://www.w3.org/2001/XMLSchema">
<Operation Name="StartInsertBizTalk" Action="http://schemas.myOpertion.com/StartInsertBizTalk" />
Request response via Web Service
Send Pipeline = XMLTransmit
ReceivePipeline = XMLReceive.
The Orchestration sends message
We receives a response.. However, as soon as the response arrive.
The message hangs and the process start consuming up to 8 Gig of memory.
Hope it helps
AKE -
Hi all,
The below is suppose to generate random dates but I receive the following error:
Msg 8115, Level 16, State 2, Line 7
Arithmetic overflow error converting expression to data type datetime.
SQL Below - if is this happening?
DECLARE
@MinDate INT, @MaxDate INT;
DECLARE
@RANGE INT = DATEDIFF(DD, @MinDate, @MaxDate);
SET @MaxDate =20141212
SET @MinDate = 20140101
SELECT CONVERT(DATE, DATEADD(DD, ROUND(RAND(CAST(NEWID() AS VARBINARY)) * @RANGE,0,-1), @MinDate));Reason is because you've declared variable as int. An integer value of 0 represents a base date of 19000101. SO maximum possible integer value you can convert to date is 2958463 which is why it throws error for values 20141212,20140101
etc
convert them to string and they all work fine
DECLARE
@MinDate INT, @MaxDate INT;
SET @MaxDate =20141212
SET @MinDate = 20140101
DECLARE
@RANGE INT = DATEDIFF(DD,CAST( @MinDate AS varchar(8)), CAST(@MaxDate AS varchar(8)));
SELECT CONVERT(DATE, DATEADD(DD, ROUND(RAND(CAST(NEWID() AS VARBINARY)) * @RANGE,0,-1), CAST(@MinDate AS varchar(8))));
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
I remember that when Java was first introduced, one of the major design goals of the language was to eliminate common programmer errors. For example, instead of trusting the programmer to read the documentation of a given function to learn that they needed to test for a negative return value as an error, java included a very rigorous exception handling requirement. The developer who wrote a method would declare which exceptions it could throw and those using the method were required to account for those exceptions.
I'm now starting to work with Java on a full time basis and was reviewing the arithmetic rules. I couldn't believe it when I discovered that overflowing an integer value doesn't cause an arithmetic overflow error!
Am I missing something, or is that a major deviation from the stated language design goals?!David.Wendelken wrote:
I remember that when Java was first introduced, one of the major design goals of the language was to eliminate common programmer errors. For example, instead of trusting the programmer to read the documentation of a given function to learn that they needed to test for a negative return value as an error, java included a very rigorous exception handling requirement.Uhhh... not quite - programmers do have to read the documentation nevertheless, because otherwise they don't know what the result of a call or valid parameters would be.
The developer who wrote a method would declare which exceptions it could throw and those using the method were required to account for those exceptions.Yeah...
I'm now starting to work with Java on a full time basis and was reviewing the arithmetic rules. I couldn't believe it when I discovered that overflowing an integer value doesn't cause an arithmetic overflow error!Why should it?
Am I missing something, or is that a major deviation from the stated language design goals?!Your design goals are a little off. Nobody aimed to make Java to be usable without reading the docs/specs. They aimed at keeping things simple and cleanly designed, not exactly as self-explanatory. There are many things in the JLS that aren't. -
"Arithmetic Overflow" error getting AVG of field - how to solve?
After some research, it appears that the problem is in a precision mis-match between Oracle floats and .NET floats, and that OracleDecimal should be used. I'm just using C# ExecuteScalar to get an average out of a table's field.
Can someone show me a concrete-but-simple example of how to get an average w/o getting Arithmetic Overflow?
thanks much,
cdjHi,
If you want to use ExecuteScalar, you could wrap the AVG call with a call to ROUND or TRUNC to keep it under 28 digits. for example
select round(1/3,28) from dual;
Here's an example that gets 38 digits without overflow.
Hope it helps,
Greg
using System;
using System.Collections.Generic;
using System.Text;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
class Program
static void Main(string[] args)
using (OracleConnection con = new OracleConnection())
con.ConnectionString = "user id=scott;password=tiger;data source=orcl";
con.Open();
using (OracleCommand cmd = new OracleCommand())
cmd.CommandText = "select 1/3 from dual";
cmd.Connection = con;
using (OracleDataReader rdr = cmd.ExecuteReader())
while (rdr.Read())
Console.WriteLine(rdr.GetOracleDecimal(0).ToString());
} -
Activation error while changing the data type of a field of a table
hi friends,
i am facing one problem while changing a data type of a field of a table.
i just created one table(Yqm32) .i have assigned charcter data type to one field(ztotal_count) .now i want to change this charcter data type to numeric data type.
while changing to NUMC data type activation error is comming as below.
Table is not yet classified
Field ZTOTAL_COUNT: Type change
ALTER TABLE is not possible
Structure change at field level (convert table YQM32)
Check on table YQM32 resulted in errors
Table YQM32 could not be activated
(E- Structure change at field level (convert table YQM32)
plz suggest.i need to change the data type from char to numc.
Thanks & RegardsHi Pabitra......
From the SE11 change the table as u wanted and then from menubar select
UTILITIES--> DATABASE UTILITY
It will open database utility
there u select the Activate and adjust database button.
then the database table will get adjusted.
just try it once.........
Suresh...... -
Convert/Cast string data type from file to DT_GUID into table
Hi to all
is there anyone who help me please?!?
I'm not able to resolve the following problem.
I have a .csv file with a string field A and its values are GUID.
I must export this .csv file into SQL Server Table which have a uniqueidentifier (GUID) field B.
I must map string field A to GUID field B of table.
But I get an error like this: "Error at Data Flow Task [Derived Column [xxx]]: Error code 0x800401F3 occurred attempting to convert from data type DT_WSTR to data type DT_GUID.".
I read other posts like this in this forum and i also tried the solution suggested in those posts.
The proposed solution had suggested of insert in the expression field of "Derived Column" Transformation this expression (DT_GUID) ("{" + [YourGuid] + "}") in place of (DT_GUID) [YourGuid].
But i get always the same error.
is there anyone who help me please to resolve this issue?!?The derived column expression should work if the yourGuid column contains a real guid.
Does the source looks something like: 25892e17-80f6-415f-9c65-7395632f0223
And are all rows filled with a correct value or are there also empty strings or null values?
Please mark the post as answered if it answers your question | My SSIS Blog:
http://microsoft-ssis.blogspot.com |
Twitter -
Error;invaild number. different data type: how to insert
In testtable, ID(number(12), amount(number(12))
Now I want to insert the following record. I got error,a invalid number .
insert into testtable(id,amount) values('111','9,000.00');
I think data type is different. amount is number type but '9,000.00' is varchar2.
How can i insert '9,000.00' to number data type?
I do insert to_number('9,000.00'). It doesn't work.
Would you help me for this problem.as amount is a number field it will only take data of type number only.so if ue data is not number type u need to convert it to number and insert it.
however u can select it in the same format(original),using something like this:
SQL> SELECT ename employee, TO_CHAR(sal, '99,990.99') from emp;
EMPLOYEE TO_CHAR(SA
SMITH 800.00
ALLEN 1,600.00
WARD 1,250.00
JONES 2,975.00
MARTIN 1,250.00
BLAKE 2,850.00
CLARK 2,450.00
SCOTT 3,000.00
KING 5,000.00
TURNER 1,500.00
ADAMS 1,100.00
EMPLOYEE TO_CHAR(SA
JAMES 950.00
FORD 3,000.00
MILLER 1,300.00
14 rows selected. -
Bit stumped; data overflow error with DATETIME vs DATE or DATETIME2
I find myself in a slightly perplexing situation. In trying to replicate data to a SQLServer 2008 database I have no problems doing so for a date column on the Oracle side to either a DATE or DATETIME2 datatype on the SQLServer side. However, upon trying a DATETIME column I'm given the errors below. Essentially a -2147217887 but Goldengate marks it as a data overflow error. The thing is, a datetime2 is more like a TIMESTAMP column in Oracle and the DATETIME is essentially a DATE. Why it would work with a DATE (less precise) or DATETIME2 (more precise) yet not a DATETIME (same precision) is a bit of a head scratcher. The same defs file is used for each of the options.
Before anyone suggests using either destination datatype that works, I've no choice; it has to be a DATETIME column. The customer is always right, even when they are infuriatingly wrong.
Anyone seen this before or have any suggestions?
Thanks very much in advance!!
Cheers,
Chris
trace
10:55:36.538 (366244) * --- entering READ_EXTRACT_RECORD --- *
10:55:36.538 (366244) exited READ_EXTRACT_RECORD (stat=0, seqno=-1, rba=-1156485006)
10:55:36.538 (366244) processing record for QA1_DW_MS_MAY04.LIEN
10:55:36.538 (366244) mapping record
10:55:36.538 (366244) entering perform_sql_statements (normal)
10:55:36.538 (366244) entering execute_statement (op_type=5,AWO_CUBE.LIEN)
10:55:36.599 (366305) executed stmt (sql_err=-2147217887)
10:55:36.599 (366305) exited perform_sql_statements (sql_err=-2147217887,recs output=6018)
10:55:36.599 (366305) aborting grouped transaction
10:55:36.619 (366325) aborted grouped transaction
10:55:36.619 (366325) committing work
10:55:36.619 (366325) Successfully committed transaction, status = 0
10:55:36.619 (366325) work committed
10:55:36.619 (366325) writing checkpoint
10:55:36.619 (366325) * --- entering READ_EXTRACT_RECORD --- *
10:55:36.619 (366325) exited READ_EXTRACT_RECORD (stat=400, seqno=-1, rba=-1156490736)
ggserr.log:
2012-06-02 10:55:36 WARNING OGG-00869 Oracle GoldenGate Delivery for ODBC, lien.prm: Parameter #: 1 Data Type: 129 DB Part: 5 Length: 9 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable Parameter #: 2 Data Type: 129 DB Part: 5 Length: 9 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable Parameter #: 3 Data Type: 129 DB Part: 7 Length: 5 Max Length: 128 Status: 8 Precision: 128 Scale: 0 Unavailable Parameter #: 4 Data Type: 129 DB Part: 5 Length: 6 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable Parameter #: 5 Data Type: 129 DB Part: 7 Length: 8 Max Length: 56 Status: 8 Precision: 56 Scale: 0 Unavailable Parameter #: 6 Data Type: 129 DB Part: 5 Length: 6 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable Parameter #: 7 Data Type: 129 DB Part: 7 Length: 9 Max Length: 128 Status: 8 Precision: 128 Scale: 0 Unavailable Parameter #: 8 Data Type: 129 DB Part: 7 Length: 8 Max Length: 15 Status: 8 Precision: 15 Scale: 0 Unavailable Parameter #: 9 Data Type: 129 DB Part: 5 Length: 23 Max Length: 29 Status: 8 Precision: 23 Scale: 3 Unavailable Parameter #: 10 Data Type: 129 DB Part: 5 Length: 5 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable Parameter #: 11 Data Type: 129 DB Part: 5 Length: 23 Max Length: 29 Status: 6 Precision: 23 Scale: 3 Data Overflow Parameter #: 12 Data Type: 129 DB Part: 7 Length: 13 Max Length: 512 Status: 8 Precision: 0 Scale: 0 Unavailable Parameter #: 13 Data Type: 129 DB Part: 5 Length: 23 Max Length: 29 Status: 8 Precision: 23 Scale: 3 Unavailable Parameter #: 14 Data Type: 129 DB Part: 7 Length: 1 Max Length: 1 Status: 8 Precision: 1 Scale: 0 Unavailable Native Error: 0, 0 State: 0, 22007 Class: 0 Source: Line Number: 0 Description: Invalid date format.
2012-06-02 10:55:36 WARNING OGG-01004 Oracle GoldenGate Delivery for ODBC, lien.prm: Aborted grouped transaction on 'AWO_CUBE.LIEN', Database error -2147217887 ([SQL error -2147217887 (0x80040e21)] Parameter #: 1 Data Type: 129 DB Part: 5 Length: 9 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable Parameter #: 2 Data Type: 129 DB Part: 5 Length: 9 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable Parameter #: 3 Data Type: 129 DB Part: 7 Length: 5 Max Length: 128 Status: 8 Precision: 128 Scale: 0 Unavailable Parameter #: 4 Data Type: 129 DB Part: 5 Length: 6 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable Parameter #: 5 Data Type: 129 DB Part: 7 Length: 8 Max Length: 56 Status: 8 Precision: 56 Scale: 0 Unavailable Parameter #: 6 Data Type: 129 DB Part: 5 Length: 6 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable Parameter #: 7 Data Type: 129 DB Part: 7 Length: 9 Max Length: 128 Status: 8 Precision: 128 Scale: 0 Unavailable Parameter #: 8 Data Type: 129 DB Part: 7 Length: 8 Max Length: 15 Status: 8 Precision: 15 Scale: 0 Unavailable Parameter #: 9 Data Type: 129 DB Part: 5 Length: 23 Max Length: 29 Status: 8 Precision: 23 Scale: 3 Unavailable Parameter #: 10 Data Type: 129 DB Part: 5 Length: 5 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable Parameter #: 11 Data Type: 129 DB Part: 5 Length: 23 Max Length: 29 Status: 6 Precision: 23 Scale: 3 Data Overflow Parameter #: 12 Data Type: 129 DB Part: 7 Length: 13 Max Length: 512 Status: 8 Precision: 0 Scale: 0 Unavailable Parameter #: 13 Data Type: 129 DB Part: 5 Length: 23 Max Length: 29 Status: 8 Precision: 23 Scale: 3 Unavailable Parameter #: 14 Data Type: 129 DB Part: 7 Length: 1 Max Length: 1 Status: 8 Precision: 1 Scale: 0 Unavailable Native Error: 0, 0 State: 0, 22007 Class: 0 Source: Line Number: 0 Description: Invalid date format ).
report:
2012-06-02 10:55:36 WARNING OGG-01004 Aborted grouped transaction on 'AWO_CUBE.LIEN', Database error -2147217887 ([SQL error -2147217887 (0x80040e21)]
Parameter #: 1 Data Type: 129 DB Part: 5 Length: 9 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable
Parameter #: 2 Data Type: 129 DB Part: 5 Length: 9 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable
Parameter #: 3 Data Type: 129 DB Part: 7 Length: 5 Max Length: 128 Status: 8 Precision: 128 Scale: 0 Unavailable
Parameter #: 4 Data Type: 129 DB Part: 5 Length: 6 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable
Parameter #: 5 Data Type: 129 DB Part: 7 Length: 8 Max Length: 56 Status: 8 Precision: 56 Scale: 0 Unavailable
Parameter #: 6 Data Type: 129 DB Part: 5 Length: 6 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable
Parameter #: 7 Data Type: 129 DB Part: 7 Length: 9 Max Length: 128 Status: 8 Precision: 128 Scale: 0 Unavailable
Parameter #: 8 Data Type: 129 DB Part: 7 Length: 8 Max Length: 15 Status: 8 Precision: 15 Scale: 0 Unavailable
Parameter #: 9 Data Type: 129 DB Part: 5 Length: 23 Max Length: 29 Status: 8 Precision: 23 Scale: 3 Unavailable
Parameter #: 10 Data Type: 129 DB Part: 5 Length: 5 Max Length: 21 Status: 8 Precision: 20 Scale: 0 Unavailable
Parameter #: 11 Data Type: 129 DB Part: 5 Length: 23 Max Length: 29 Status: 6 Precision: 23 Scale: 3 Data Overflow
Parameter #: 12 Data Type: 129 DB Part: 7 Length: 13 Max Length: 512 Status: 8 Precision: 0 Scale: 0 Unavailable
Parameter #: 13 Data Type: 129 DB Part: 5 Length: 23 Max Length: 29 Status: 8 Precision: 23 Scale: 3 Unavailable
Parameter #: 14 Data Type: 129 DB Part: 7 Length: 1 Max Length: 1 Status: 8 Precision: 1 Scale: 0 Unavailable
Native Error: 0, 0
State: 0, 22007
Class: 0
Source: Line Number: 0
Description: Invalid date format
Edited by: chris.baron on Jun 3, 2012 10:36 AMNot sure if this helps at all...
Datetime Pairs in Oracle BI (OBIEE) - Days, Hours, Minutes, Seconds
http://www.kpipartners.com/blog/bid/83328/Datetime-Pairs-in-Oracle-BI-OBIEE-Days-Hours-Minutes-Seconds
UPDATE: Sorry... didn't see this was for GoldenGate.
Edited by: 829166 on Jun 22, 2012 7:36 AM -
Error while transporting a data type
Hello all SAP PI Experts,
I'm trying to transport a data type but I'm getting the below mentioned error.
This is happening even when I gave the proper name of SWCV that contains this data type.
Please suggest how this problem can be solved.
Thanks,
Ajeya G VHi Ajeya,
An easy trick is to open the DataType on your Enterprise Service Builder, and once it is opened, (not edit, just open) go to Tools --Export Design Object
The correct SC will be filled as default. -
Error in getting Long data type from Table
Hi All,
I have one table say xx_long. In this table one column is having Long data type.
Now I want this values will get in to the PL/SQL variable. I taken variable data type as long but it is showing error "ORA-00997: illegal use of LONG datatype".
Sample code with which I tried:
declare
a long;
begin
select slno into a from xx_long where slno = 100;
dbms_output.put_line('Value:'||a);
end;
Please help me on this.
Thanks in advance.
Regards,
HariLONG columns cannot appear in certain parts of SQL statements:
WHERE clauses, GROUP BY clauses, ORDER BY clauses, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements
The UNIQUE operator of a SELECT statement
The column list of a CREATE CLUSTER statement
The CLUSTER clause of a CREATE MATERIALIZED VIEW statement
SQL functions (such as SUBSTR or INSTR)
Expressions or conditions
SELECT lists of queries containing GROUP BY clauses
SELECT lists of subqueries or queries combined by the UNION, INTERSECT, or MINUS set operators
SELECT lists of CREATE TABLE ... AS SELECT statements
SELECT lists in subqueries in INSERT statements
Maybe you are looking for
-
Start Routine Logic Updating Field in Target ODS
Hi, I am creating a Start Routine to Update Field (date) from one ODS to another based on the Key Structure: Document Number, Line Item Number. I am encountering a situation as follows: Source Doc Num 1 Line Item 10 Date 1/1/1 Target Doc Num 1 Line
-
10.4.8 and RealPlayer
Hi all, I upgraded to 10.4.8 last night and everything seems to have pretty much worked apart from RealPlayer. I upgraded RealPlayer to 10.1 this morning but to no avail. The problem is, whenever I go to the BBC Radio 1 pages I get the message: Safar
-
Duty Rate in J1iex for Imports
Hi friends ... expericing strange problem at my end ... I am doing imports process ....I created a PO with two materials with same values of below 7 conditions types (import duties) Basic , ECess on Basic , HSECSS on basic CVD , ECESS on CVD , HESCES
-
Packaging large files ( 200mb) using dataPath mode
Hi... I have a problem when trying to package an eBook >200mb to my test environment with Adobe Content Server. Here's the XML I have constructed for the eBook: <?xml version="1.0" encoding="UTF-8"?> <package xmlns="http://ns.adobe.com/adept"> <
-
Hi people! Just a tip or trick to find easily and quick free icons! When I was making Subvi I was always strucked by the fact that I had to make an icon, or find it somewhere where I always had to pay for it. Now, if you go to Google, and then -> im