Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 6th, 2004, 09:58 PM
Friend of Wrox
Join Date: Sep 2003
Location: , , .
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default truncating

I am querying data from sql there i want to display output with 2 decimal points .Doing like this
ex: select round(sales,2) from x


here i am getting 123456.68000 but i need to dispaly 123456.68 only.Sales data is not fixed length so i cant use left or right function.How to get with 2 decimal points?

Reply With Quote
  #2 (permalink)  
Old July 6th, 2004, 10:59 PM
Authorized User
Join Date: Jul 2004
Location: Aurangabad, MAharashtra, India.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jhawar


select cast(round(sales,2,0) as decimal(Max,2)) from x
where max could be any number

hope this helps!!

Amit Jhawar
Reply With Quote
  #3 (permalink)  
Old July 7th, 2004, 02:10 AM
Friend of Wrox
Join Date: Sep 2003
Location: , , .
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts

works good thanks

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Truncating Transaction Log ninel SQL Server 2000 1 November 18th, 2006 01:26 PM
Truncating Transaction Log sgsandeep SQL Server 2000 2 July 11th, 2006 08:51 AM
truncating to 2 decimals msrnivas Classic ASP Components 4 July 7th, 2004 02:29 AM
truncating database data Adam H-W Classic ASP Databases 4 June 20th, 2004 01:28 PM
Date Format - Truncating - Plz Help - THNX ! ank2go VB.NET 2002/2003 Basics 2 March 30th, 2004 11:26 PM

All times are GMT -4. The time now is 08:09 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.