473,396 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

C/C++ DataType for DB2 DECIMAL(18,3)

Hi

We are trying to convert our DB2 code to C/C++. We are facing a problem
of DECIMAL conversion. When we try to compile the C++ program with
<decimal.h> file , it 's giving the following error

main()
{
decimal(18,3) x1;
---> Syntax error - expected ";" and found "x1"
Pls. suggest as we are in the midst of a performance exercise &
completely stuck up.

Rgds
Ram

Nov 15 '05 #1
1 2071
Ramz wrote:
Hi

We are trying to convert our DB2 code to C/C++. We are facing a problem
of DECIMAL conversion. When we try to compile the C++ program with
<decimal.h> file , it 's giving the following error

main()
{
decimal(18,3) x1;
---> Syntax error - expected ";" and found "x1"
Pls. suggest as we are in the midst of a performance exercise &
completely stuck up.

Rgds
Ram

I think you should ask in the comp.lang.c++ instead. And maybe read a
book on C++ before you try using it, then it would be pretty obvious
that you've put the '(18, 3)' part in the wrong position. Try moving it
a bit later on the line. Read the error message, it pretty much tells
you what the problem is.
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Chris Kennedy | last post by:
I am pulling a decimal value from SQL server and trying to use the format currency and format number function. I am using these values in a large string of HTML to be used in a CDONTS Email. If I...
35
by: Don Vaillancourt | last post by:
Over the years I have always used the decimal(18,0) as the datatype for primary keys. Aside from the number of significant numbers involved, would BigInt type be better for performance or is...
3
by: Artek | last post by:
Hello, after installing .net 1.1, ASP.NET works fine, but there is a problems with extra zeros added to the numbers at the end. In Sql 2000 SP3a there is for example a table with one column ...
3
by: vellons | last post by:
hi all, I want to do the following statement "ALTER TABLE TT ALTER COLUMN CC DECIMAL (18,2)" but doesn´t work. I´ve tried it on differents ways but keep not working. I don´t know if I can do...
1
by: dmitri | last post by:
I am importing a bunch of data which is all in varchar format which I cast into the relevant type on transfer to the production table. One of these columns contains decimals, but some of them are...
2
by: Randy Smith | last post by:
Hi, Does anyone have any good techniques on how to convert an SQL Server 2005 "money" datatype into the ASP.Net "double" datatype? OR, should we be using "decimal" at both ends? TIA, Randy...
2
by: pax | last post by:
Hello there! Here is my problem, in the simplest scenario: - an Access 2000 format database (created with Access 2003) - a simple table that contains one single field defined as Number, Decimal,...
1
by: iquttaineh | last post by:
Hi, I have a stored procedure that executed in SQL Server 2000 that returns a decimal SUM value, the stored procedure executed successfully in Query Analyzer and returns the correct value, but when...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.