Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 14th, 2008, 11:44 AM
Registered User
 
Join Date: Aug 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default computed column help

joefawcet was helping me out on this (I have all of 5 hours exp with SQL. I am a poor network Admin that got roped into solving this)

I am 80 percent there with a resolve. I am taking column 1 and column 2 in a table and having them shop up in a added column 4 to look like this

000987.88890


newColumn AS col1 + '.' + col2
 (thanks Joe)

while this does work for what I want, I cannot figure out why some cells show correctly as 000987.88890 and other have a large space in them like "000987 .88890"

is this a problem with the way the data was input?

should I move to a direction of creating a "view"?


 
Old August 15th, 2008, 02:00 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

newColumn AS ltrim(rtrim(col1)) + '.' + ltrim(rtrim(col2))







Similar Threads
Thread Thread Starter Forum Replies Last Post
Computed Column Specification olisav ASP.NET 2.0 Basics 0 May 14th, 2007 04:00 PM
Placing a computed sum in a table field cuzintone SQL Language 1 April 15th, 2005 05:02 AM
template column and bound column hidayah ASP.NET 1.x and 2.0 Application Design 1 April 9th, 2005 03:50 PM
Compare two Items of data(in column A and column B ever Excel VBA 6 February 13th, 2004 02:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.