473,383 Members | 1,762 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,383 software developers and data experts.

Converting a type (e.g. Decimal) BEFORE writing to ResultSet ?

As well known a DATE or TIMESTAMP type can be converted (to VARCAHR) after selection but BEFORE
writing to the ResultSet by using the CONVERT function e.g.

SELECT CONVERT(char(10), MYTIMESTAMP, 101)) FROM ... WHERE ....

Is there something similar if the original field is a DECIMAL/NUMERIC field?

E.g.

SELECT DEC_CONVERT(char(30), MYDECIMAL, '###########0.00') FROM ..... WHERE ....

George

Jul 19 '05 #1
0 2283

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

Similar topics

2
by: Mariusz Sakowski | last post by:
I'm writing class which will be able to store large numbers (my ambition is to make it able to operand on thousands of bits) and perform various operations on it (similiar to those available with...
1
by: Zeng | last post by:
Hello, I have many fields in my SQL database that are of type decimal(9,3). How do I detect a decimal value (type decimal in C#) will overflow the db column of sql type decimal (9,3)? Is...
4
by: Spufi | last post by:
I have read several messages on converting packed decimals (EBCDIC) in a C++ program, but they were all for AS400 systems. I am looking for a way to convert the packed decimals in a COBOL program...
1
by: mdawoodk | last post by:
i am getting error "input string was not in correct format" when converting a string decimal into integer value. code is like this: string strVal = ""; int nVal = 0; strVal = "14.9"; nVal...
2
jeffbroodwar
by: jeffbroodwar | last post by:
Hi everyone ! i need help on how can i convert xml data to resultset.. actually i was able to convert ResultSet to XML (using MySQL database) the problem is how can i make my client program consume...
3
by: Ady1 | last post by:
Hi, I'm getting this error intermitantly in a custom configuration section in my ASP.NET website. From what I can see 0.175 is a valid string to be converted to a decimal! And most of the time...
2
by: Tukeind | last post by:
Hello, I am receiving the following error: error C2065: 'to_binary' : undeclared identifier while running the code below. If anyone can help I'll appreciate it? Thank you, Tukeind
4
by: Jeff | last post by:
Hey ..NET 2.0 In my code am I trying to convert an int value into a decimal: decimal d = 0; int k = 87664; d = Convert.ToDecimal(k/100);
4
by: aext | last post by:
Hi please If you know how to convert from Decimal format of DateTime to a real Datetime Format reply please because i'm reading a decimal value of time from a file like this one (2448220711) and I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.