Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server & have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for

How To Change A Decimal Number To Percent Format Number?

in my sql, i want to change a decimal number to percent format number, just so it is convenient for users. for example there is a decimal number 0.98, i want to change it to 98%, how can i complete it?


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Percent Field Rounds To Whole Number
I am having a problem retaining the right 2 decimal places in my datagrid field. I have it defined as a decimal but when the update happens it rounds the decimal places back to .00.
Dim NewMarkup As String
'retrieve the new values
NewMarkup = CType(e.Item.FindControl("Markup"), TextBox).Text
'create the objects
Dim command As New SqlCommand("UpdatePricing", connection)
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add("@Markup", SqlDbType.Decimal, 5)
command.Parameters("@Markup").Value = CDec(NewMarkup)

View Replies !   View Related
Format A Number For Use As Number In Excel
I want to format a number like "#,##0.00" in order to handle it in Excel as a number (i.e. compute a sum).

Excel is able to show a number in a specail format and still allow to compute with ...

Thanks in advance,


View Replies !   View Related
Column With A Number And 2 Decimal Like 10.10 Or 150.30
Hello,How should I create a column to save data with the folowing format   10.10 or 10.20 or 10.30 or 150.30  or 10 or 150.It is basically  process step in a diagram flow.I tried with decimal but with 10.10 , it removes automatically the 0.Thanks

View Replies !   View Related
Casting Decimal Number
When I declare a VB variable Dim s as Decimal,
I want to cast d like this : 1452,4141,0045,47756544,04
Only with to digits after the ","
How can I perform this

View Replies !   View Related
How To Set Precision Of A Decimal Number
there is a column which type is float in a table, i want to set the precision of its value, for example if its value is 10.333888, i want to get its value as 10.33, how to complete it in a select Sql?


View Replies !   View Related
Data Type For Number With 1 Decimal Place
I have just loaded my db table from an excel file using the import wizard. Prior to the import, I set my data types and in the field that I need a number with 1 decimal place I chose a decimal data type.

Made since to me

However, now my numbers do not have the decimals.
Please help.

View Replies !   View Related
How To Disable Autmatic Round Of Of A Decimal Number In Sql Server Using
Hi all,
I am sorry if i am posting this error in an inappropriate froum.
Well in my intranet web application i want to enter a number to the database(sql sever 2005) that has a column(schoolkm) whose type is decimal(9, 2). Now if i want to enter the value 1.5 in the text box and enter that value to the database through interface then that value automatically rounds to 2. But when i get into the table and enter that value by hand then that value enters perfectly i.e. without rounding of. I want to know the reason and how can i cure this problem.
Regards & thanks in advance

View Replies !   View Related
Adding Number Of Decimal Places During Table Design

Nice easy one (hopefully) from a newbie on SQL 2000.

I have a table HolidayTakenBooked which is populated from a stored procedure via the following statement;

TRUNCATE TABLE HolidayTakenBooked
INSERT INTO HolidayTakenBooked
SELECT * FROM #TMP_HolidayTakenBooked ORDER BY ABR_Clock_No

I am finding that for certain values in the HolidayTakenBooked table decimals are not being transferred correctly. ie. 0.5 in the TMP table appears as 1 in the HolidayTakenBooked table.

I'm pretty sure that this is down to the data definition of the table see sample field below;
[HOL_DaysTaken1] [decimal](18, 0) NULL ,

So the simple question here is how do I define decimal places when I define a new table. When designing a new table in Enterprise Manager I select decimal and the server does not allow me to change the value of 9 it defaults to.

What simple thing I am not doing ?


View Replies !   View Related
Limit The Number Of Digits After Decimal Point In Flaot Data Type
I have a column in the data base with the type Float,
I want to limit the number of digits after decimal point to 2 when I display the value in ASP.NET but I don't know how!?
the number that appear after calculation llike "93.333333"
I use decimal(2,2) as data type but an error accour and this is the message
"- Unable to modify table.  Arithmetic overflow error converting float to data type numeric.The statement has been terminated."
 Can you help me..

View Replies !   View Related
Format Number
I am doing some simple arithmatic for a query that I am working on. What I have below describes the arithmatic that is taking place withing a portion of the query:

select(o.sales_val/o.qty_sales) as 'Unit_Price', (o.acctng_cost_val/o.qty_sales) as 'Unit_Cost'
from opcsahf as o

The division is correct. My only issue is that the results for 'Unit Price' or 'Unit Cost' may be formatted like example: 4.25000000.

How can I have my nubers show up with only to 2 decimal places instead of all the zeros at teh end?

View Replies !   View Related
Format Number
I need to change a number that looks like 1365 and make it look like 1,365 without any decimal or trailing zeros. Then number can even be a 7 digit number. It seems like the only way I know is the money to varchar conversion using style 1, but this adds trailing zeros and a decimal point. Can anyone help on this



View Replies !   View Related
Format Number
how can I get 1,33 for 12/9

sql server gives 1

View Replies !   View Related
Number Format
In the report Layout, if I right-click a cell that is located in the table details row, click Properties, and select the Format tab, there is an option for the Format code. I click on the little dot-dot-dot icon (...) and it brings up the Choose Format option. The choices are Default, Number, Date, Time, Percentage, and Currency. The format that I am interested in is Number, so I click on Number. Now, it shows '1234' ; '1,234.00' ; '1234' ; '1234.00' ; and finally '1.234123e+003'. The choice that I am looking for (or desire) is something that would show 9,452 and that is it. No decimals, but want the comma. I do not see an option for this. The option '1,234.00' has decimals. The two options '1234' and '1234' appear to not have decimals, but they do not appear to have commas either. Further, what is the difference between the first '1234' and the second '1234'?
*** Also, I have a couple formulas that I have entered. I have tried to change the Number Format for these cells in the table details row and nothing changes. Still the same format.

View Replies !   View Related
Number Format
When setting the format property for a textbox containing a number the first parameter relates to a positive number, the second negative and the third to zero. 

eg #,###; (#,###); 0

Is there a way of also formatting Null values in the same way without writing custom code?

View Replies !   View Related
Number Format

I have number field that I am trying to format.  The number currently shows -7899.99.  I would like it to show (7,899.99) for negative and 7,899.99 for positive.
Any ideas on how to do this? 

View Replies !   View Related
Format Phone Number
Hi Everyone,
   I have a phone number coming from the database coming in the format of 2132563111. How can I do this in sql query213-563-3111
Please let me know if there is any function that does it.

View Replies !   View Related
Format Number On Select
I have a price field that when I query it, it returns the price as"5.0000". What function can I use to return the price as "5.00"?THANKS

View Replies !   View Related
Format Phone Number
How to format phone numbers in sql? in current fields some phone number entered like this:
1 800 7894564
1800blue etc...
I am trying to get into uniform like this:

View Replies !   View Related
Keep Phone Number Format

 I have phone number column in Excel file. The phone number is in this format: 523-349-0212. When this data imported in to SQLServer file, it is not keeping the format, storing it as 5233490212. The data type of this column is varchar. How to keep this format?
Thanks in advance

View Replies !   View Related
Format Date And Number!
Dear Friens,

I'm having some problem to format my date and number fields!! :-(

In my column I have a date in the format 2007-05-28 00:00:00, and I want it to 28-05-2007.


And the field number I have in the format 28377497636.4987 and I need or 28.377.497.636,4987


or ‚¬ 28.377.497.636.4987.


Could you help me?


View Replies !   View Related
Need To Change Once A Month The Number From 1 - 4
hi need help
i have table employee
i need to change to the employee Once a month the number from 1  to 2 (once a month)
in the first day of the month evry month
and loop  back to 1 . 2 .3 .4
evry month next number from 1 to 4
empid        val_Number      date
11111           1                 17/01/2008
2222             4                 19/12/2007
3333             3                 19/12/2007
i need to see it like next  month (in the first day of next the month)
empid        val_Number      date                    new_val
11111           1                 17/01/2008             2
2222             4                 19/12/2007             1
3333             3                 19/12/2007             4

View Replies !   View Related
Number Are Displayed In The Wrong Format
HiI'm not sure if this is a .net or a SQL issue. My development machine is using SQL 2005 while the live server is SQL2000. I have a smallmoney field in the database for holding a house rent. The following is used to display the contents on the page<asp:Label ID="lblrent" runat="server" Text='<%# Bind("rent", "(0:0.00)") %>'></asp:Label>In development, the number is displayed correctly, with the decimal place, .e.g. 200.50 but on the live server the number is displayed as 20050,00. What I have noticed in the database is that the number is held differentlySQL 2005 - 200.5000SQL 2000 - 20050Is there a difference between SQL 2000 and 2005? How do I get around this problem?

View Replies !   View Related
Auto-Number Format Problem
I have an autonumber in the format /100, which displays the first entry as 101 2nd as 102 and so on,

When i come to retrieve the data and display it on an aspx webpage it displays the values as 1,2,3,4 etc....

Is this an access thing or should i ask in the .net section?

many thanks

View Replies !   View Related
How To Format The Phone Number In The Result?
like (###) ###-####.

I know that

SELECT phone
FROM author

however, the results will be like

408 496-7223.

but I do not know how to format the phone number.

can you help me to figure it out please?


View Replies !   View Related
Changing The Number Format In SQL Query

I have query
SELECT  col1, a.Inv_Amount as Amount
FROM SPS_Oustandings a
I can get the result values for example as 12345.67 as result, but i need it in german format with , used as decimal point and . as thousand seperator
i need output as 12.345,67 
My DataGrid (ASP.NET) is directly bound to SP which have this query, i want to show amount in above format in grid.
Please Help,

View Replies !   View Related
Format The Number In Matrix's Subtotal
It looks like by default the subtotal number inherits the number format from the main column. Is there a way to override it?
In my case I am displaying percents with a decimal point in a column and sometimes the total comes out to 99.9% instead of 100%. I just want to round of the total to alway show 100%.
Is there a way to do it?


View Replies !   View Related
Number Format While Representing Two Different Field

    I need to represent two different (number) fields in the same textbox ,  one number format is C0 (Currency) and other one is Percentage(P1), how can i keep this number format applicable to appropriate fields?
for exaple this is the expression to represent the two fiels in one textbox.

=Fields!Amount01.Value & vbCrLf & Fields!Amount01Percentage.Value
Thanks in advance.

View Replies !   View Related
How To Change The Sql-server Port Number?
Hi there,
I want to change the default sql-server port number 1433 to a new one. Can i do that? If yes, how?
Also, i have noticed that there is no port number option in the sql server 2005 management studio login window. So, what if the server has changed its port number?
Any suggestions would be appreciated. thanks

View Replies !   View Related
Change SQL Server Serial Number
Good morning !Anyone knows how can i change a SQL Server Serial number without uninstallit ?Thanks in advancedJLuis

View Replies !   View Related
How To Change The Default Port Number
hai all,
I need to change the default port number of the SQL server from 1433 to some other port number. i know that it can be done thru SERVER NETWORK UTILITY. Can some one confirm that. It will be helpful.
Also i want to make sure that port to given is free port. how can i find that particular port is free.

Thanking in Advance, awaiting Quick response.

Signing Off

View Replies !   View Related
Change Of Port Number For Replication .
Hello ,

How can i define a different TCP/IP port number , other than the default 1433; to replicate the database over a firewall on the source and the destination servers ? My source servers are SQL SERVER 7.0 with SP3 on Windows NT Server 4.0 and the destination servers are SQL 2000 with SP2 on Windows 2000 .

Where do i have to make changes in SQL server and Windows NT ? And further how secured it is to use this way for security ?

Can i get some on this matter please .

Thanks in advance
Sandra .

View Replies !   View Related
Change Number Of Concurrent Connections
Does anyone know how to change the number of conccurent connections on SQL Server 7. We have purchased 10 additional licenses and I need to change the concurrent users from 10 to 20. Any help would be appreciated. Thanks


View Replies !   View Related
Change The Number Of User Propertie

I'm new in all this, I have sql server 2005 and have a problem I need let access to more users to the database, in the properties page of my DB I hava a Number of user field with 5, how can change this to up number?

I hope can help me.

View Replies !   View Related
Percent - 2 Decimal

How can I convert my number results to Percent (%) with 2 decimal places?


View Replies !   View Related
How To Find 'x' Number Of Days From 'yyyymmdd' Format?
I need to find out the count of number of records older than 100 days from a table having 'order_date' as yyyymmdd format eg. 20041115. Thanks in advance.

View Replies !   View Related
Format Number With Thousands Separator? 10000 --&&> 10,000

I would like to select a BIGINT type and get a formatted result with commas.  Anyone have ideas?
declare @i bigint
set @i = 123456789
select @i
--Would like to get

View Replies !   View Related
How To Convert Number Into Fixed Format String.
I would like to convert a number into fixed format string. Say for example if I have number 5, I would like to show it as four charactered string:


In case if I have 33, then I would like to have a result like '0033'. Please let me know the string functions with which I can acheive this.

View Replies !   View Related
How To Enter More Number Of Rows In A Table Having More Number Of Columns At A Time

I want to enter rows into a table having more number of columns
For example : I have one employee table having columns (name ,address,salary etc )
                     then, how can i enter 100 employees data at a time ?

Suppose i am having my data in .txt file (or ) in .xls

( SQL Server 2005)

View Replies !   View Related
How Do You Change The Number Per Seating License After Installation?
I have more CAL for the SQL Server 2000 software. I was wondering, how or where do I about to change the number per seating for the software? thanks in advance.

View Replies !   View Related
Limitations In Term Of Number Of Tasks And Number Of Columns

I am currently designing a SSIS package to integrate data into a data warehouse fact table. This fact table has about 70 columns among which 17 are foreign keys for dimension tables.

To insert data in that table, I have to make several transformations and lookups. Given the fact that the lookups I have to make are a little complicated, I have about 70 tasks in my Data Flow.
I know it's a lot, but I can't find a way to make it simpler. It seems I really need all these tasks.
Now, the problem is that every new action I try to make on the package takes a lot of time. At design time, everything is very slow. My processor is eavily loaded each time I change a single setting in one of the tasks, and executing the package in debug mode takes for ages. If I take a look at the size of my package file on disk, it's more than 3MB.

Hence my question : Are there any limitations in terms of number of columns or number of tasks that can be processed within a Data Flow ?

If not, then do you have any idea why it's so slow ?

Thanks in advance for any answer.

View Replies !   View Related
Format Money MS SQL Field Data As Number With Commas And No Decimals
If I pull a value from a MSSQL field with is defined as money, how can I get it to display in a textbox with commas and NO decimals?
87000.0000 = 87,000
I can currently remove the decimals like below but is there a way to add the commas as well?
decRevenue = drMyData("Revenue")
txtRevenue.Text = decRevenue.ToString("f0")
It current shows "87000".

View Replies !   View Related
Displaying Extra Characters With COLUMN-defined Number Format?
Here's a tricky SQL question that has definitely driven me to the end ofmy rope. I'm using Oracle 9i and I need to perform some simplemultiplication on a field and then display it with a percent sign usingthe COLUMN command. Here's the code thus far:COLUMN price format 9,999.99 HEADING 'Charged%'SELECT pricecharged * .231 as priceFROM VT_examdetailThe output from this reads:Charged%---------23.1034.6534.65....The kicker here is that I need to add a percent sign to the right of theoutput, so that it reads:Charged%---------23.10%34.65%34.65%....I thought I could do this by just adding "|| ('%')" into the SELECTstatement, but when I do this the decimal position defined in the COLUMNcommand is lost. Does anyone know another way around this?Thanks,Alex

View Replies !   View Related
Incorrect Host-column Number Found In BCP Format-file
Hi guys, would appreciate if you can shed some light on this.Sorry to be a pain, can you tell me what is wrong with the following:for /F %%i in ('dir /b /on c:cppc*.txt') do bcp Inventory..pc in%%i -fc:cpcp.fmt -T -S CHICKYywhere CHICKYy is the serverbcp.fmt8.00.19461 SQLCHAR 0 20 ", " 0 filler_1 ""2 SQLCHAR 0 8 "
" 1 computer_name ""3 SQLCHAR 0 20 ", " 0 filler_2 ""4 SQLCHAR 0 16 "
" 2 ip_address ""5 SQLCHAR 0 20 ", " 0 filler_3 ""6 SQLCHAR 0 60 "
" 3 operating_system ""pc1.txt and other *.txt format is:JW_193801,,Windows XP,when I run it I get:C:cp>for /F %i in ('dir /b /on c:cppc*.txt') do bcp Inventory..pc in%i -fc:cpcp.fmt -T -S CHICKYyC:cp>bcp Inventory..pc in pc1.txt -fc:cpcp.fmt -T -S CHICKYySQLState = S1000, NativeError = 0Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column numberfound in BCP format-fileC:cp>bcp Inventory..pc in pc2.txt -fc:cpcp.fmt -T -S CHICKYySQLState = S1000, NativeError = 0Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column numberfound in BCP format-fileC:cp>bcp Inventory..pc in pc3.txt -fc:cpcp.fmt -T -S CHICKYySQLState = S1000, NativeError = 0Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column numberfound in BCP format-fileC:cp>bcp Inventory..pc in pc4.txt -fc:cpcp.fmt -T -S CHICKYySQLState = S1000, NativeError = 0Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column numberfound in BCP format-fileC:cp>bcp Inventory..pc in pc5.txt -fc:cpcp.fmt -T -S CHICKYySQLState = S1000, NativeError = 0Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column numberfound in BCP format-fileThe sql table has 3 columns:Sorry to be a pain.-----------------------------------------------------------------------"Are you still wasting your time with spam?...There is a solution!"Protected by GIANT Company's Spam InspectorThe most powerful anti-spam software available.

View Replies !   View Related

Copyright © 2005-08, All rights reserved