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
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Replace Function

Author  Topic 

Latha27
Starting Member

20 Posts

Posted - 2012-01-25 : 13:42:17
Hi

How do you replace this in report builder expression
AAAA (123,AB) into 123, AB
AAAA (256,VC) into 256, VC
AAAA (9999) into 9999

Basically i need the one in the ()only.

Thanks

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-01-25 : 14:03:11
In report builder I don't know.
In T-SQL I would use SUBSTRING() and CHARINDEX() for this.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-25 : 17:01:13
you've Replace() function which can use for this in report expressions

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

Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-01-25 : 17:09:13
so there is a replace() function with regular expressions or how should it work?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-26 : 09:05:53
quote:
Originally posted by webfred

so there is a replace() function with regular expressions or how should it work?


No, you're never too old to Yak'n'Roll if you're too young to die.


whats the need of regular expression? as i see above pattern is static isnt it?

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

Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-01-26 : 09:17:26
OK, so we are looking at the same post and we see different things... I can see nothing static because we see obviously only examples.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -