Solved

sql number conversion

Posted on 2011-03-14
1
304 Views
Last Modified: 2012-05-11
UPDATE db_table123
SET [longNumber] = CAST([original_longNumber] as nvarchar(13))

when I copy the original column across I get for example:

153881579694 --> 1.53882e+011
0
Comment
Question by:amillyard
1 Comment
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
ID: 35132716
because it is not a long integer, it is float

try casting to bigint first

UPDATE db_table123
SET [longNumber] = CAST(cast([original_longNumber] as bigint) as nvarchar(13))
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now