Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Simple Inquiry

Author  Topic 

cutiebo2t
Constraint Violating Yak Guru

256 Posts

Posted - 2010-02-24 : 22:08:59
I have this in the table:

, test1

I want to create a view that would results to this:

test1

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-02-24 : 22:26:59
just remove the comma in front ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2010-02-24 : 22:46:34
create view YourView
as
select REPLACE(columname,',','')from yourtable

PBUH
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-02-25 : 02:07:15
quote:
Originally posted by cutiebo2t

I have this in the table:

, test1

I want to create a view that would results to this:

test1



Post all possible set of data with expected result

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-25 : 09:05:36
quote:
Originally posted by cutiebo2t

I have this in the table:

, test1

I want to create a view that would results to this:

test1



will you be always having single value alone? or is it storing a comma separated string of values

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -