[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Select as money in view

Posted on 2007-04-02
6
Medium Priority
?
175 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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

650 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