?
Solved

Select as money in view

Posted on 2007-04-02
6
Medium Priority
?
173 Views
Last Modified: 2010-03-19
Have a view in SQL that is going into a merged MS Word document.

Is there a way to format a field as money in the view?

0
Comment
Question by:lrbrister
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18839243
money can be part of a view with no problem, so what is your exact problem?
0
 

Author Comment

by:lrbrister
ID: 18839295
The sql database field is a varchar and I need the merged document to have the currency formatting.

Is there a convert I can plase in the view?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18839310
can you post samples of what data the field has, and what you want it to have as output?
0
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 

Author Comment

by:lrbrister
ID: 18839322
Merged Word doc field:    «ListPrice»

Output is                        1222000
Want                             $1,222,000
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 18839347
please try this:
select replace ( convert ( varchar(10) , cast ( cast ( ListPrice as int ) as money ,  1 ) , '.00' , '' ) as ListPrice
from yourtable
0
 

Author Comment

by:lrbrister
ID: 18847379
angelIII:
Sorry for not getting back sooner.  Points being awarded now
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

765 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