Hi All
I have table Tab1 with a column Col1 of data type VARCHAR. I want to
replace every "Kop " string in that column with "HY". Is there an easy way to
do this. Below is an example with column Col1 with 2 rows of data:
Col1
---
J Dixion
K Kop
I got some helpful scripts on replacing a string within a TEXT column last
time like the one below. I have tried those scripts on other data types of
data like VARCHAR and it did not work.
http://aspfaq.com/show.asp?id=2445
Thank you in advance.MittyKom,
Try the T-SQL REPLACE function.
HTH
Jerry
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:8F17586A-F6F6-46D1-A47D-5C85F3D36E9D@.microsoft.com...
> Hi All
> I have table Tab1 with a column Col1 of data type VARCHAR. I want to
> replace every "Kop " string in that column with "HY". Is there an easy way
> to
> do this. Below is an example with column Col1 with 2 rows of data:
> Col1
> ---
> J Dixion
> K Kop
> I got some helpful scripts on replacing a string within a TEXT column last
> time like the one below. I have tried those scripts on other data types of
> data like VARCHAR and it did not work.
> http://aspfaq.com/show.asp?id=2445
> Thank you in advance.
>
Showing posts with label col1. Show all posts
Showing posts with label col1. Show all posts
Wednesday, March 28, 2012
Replacing all occurrences of a string in a VARCHAR column?
Hi All
I have table Tab1 with a column Col1 of data type VARCHAR. I want to
replace every "Kop " string in that column with "HY". Is there an easy way to
do this. Below is an example with column Col1 with 2 rows of data:
Col1
J Dixion
K Kop
I got some helpful scripts on replacing a string within a TEXT column last
time like the one below. I have tried those scripts on other data types of
data like VARCHAR and it did not work.
http://aspfaq.com/show.asp?id=2445
Thank you in advance.
MittyKom,
Try the T-SQL REPLACE function.
HTH
Jerry
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:8F17586A-F6F6-46D1-A47D-5C85F3D36E9D@.microsoft.com...
> Hi All
> I have table Tab1 with a column Col1 of data type VARCHAR. I want to
> replace every "Kop " string in that column with "HY". Is there an easy way
> to
> do this. Below is an example with column Col1 with 2 rows of data:
> Col1
> J Dixion
> K Kop
> I got some helpful scripts on replacing a string within a TEXT column last
> time like the one below. I have tried those scripts on other data types of
> data like VARCHAR and it did not work.
> http://aspfaq.com/show.asp?id=2445
> Thank you in advance.
>
I have table Tab1 with a column Col1 of data type VARCHAR. I want to
replace every "Kop " string in that column with "HY". Is there an easy way to
do this. Below is an example with column Col1 with 2 rows of data:
Col1
J Dixion
K Kop
I got some helpful scripts on replacing a string within a TEXT column last
time like the one below. I have tried those scripts on other data types of
data like VARCHAR and it did not work.
http://aspfaq.com/show.asp?id=2445
Thank you in advance.
MittyKom,
Try the T-SQL REPLACE function.
HTH
Jerry
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:8F17586A-F6F6-46D1-A47D-5C85F3D36E9D@.microsoft.com...
> Hi All
> I have table Tab1 with a column Col1 of data type VARCHAR. I want to
> replace every "Kop " string in that column with "HY". Is there an easy way
> to
> do this. Below is an example with column Col1 with 2 rows of data:
> Col1
> J Dixion
> K Kop
> I got some helpful scripts on replacing a string within a TEXT column last
> time like the one below. I have tried those scripts on other data types of
> data like VARCHAR and it did not work.
> http://aspfaq.com/show.asp?id=2445
> Thank you in advance.
>
Replacing all occurrences of a string in a VARCHAR column?
Hi All
I have table Tab1 with a column Col1 of data type VARCHAR. I want to
replace every "Kop " string in that column with "HY". Is there an easy way t
o
do this. Below is an example with column Col1 with 2 rows of data:
Col1
---
J Dixion
K Kop
I got some helpful scripts on replacing a string within a TEXT column last
time like the one below. I have tried those scripts on other data types of
data like VARCHAR and it did not work.
http://aspfaq.com/show.asp?id=2445
Thank you in advance.UPDATE tab1
SET col1 = REPLACE(col1,'Kop','HY')
WHERE col1 LIKE '%Kop%' ;
David Portas
SQL Server MVP
--|||Thank you Dave. It got the job. Thank you once again.
--
5 years experience with SQL Server 2000 and SAP BW/SEM
"David Portas" wrote:
> UPDATE tab1
> SET col1 = REPLACE(col1,'Kop','HY')
> WHERE col1 LIKE '%Kop%' ;
> --
> David Portas
> SQL Server MVP
> --
>
>
I have table Tab1 with a column Col1 of data type VARCHAR. I want to
replace every "Kop " string in that column with "HY". Is there an easy way t
o
do this. Below is an example with column Col1 with 2 rows of data:
Col1
---
J Dixion
K Kop
I got some helpful scripts on replacing a string within a TEXT column last
time like the one below. I have tried those scripts on other data types of
data like VARCHAR and it did not work.
http://aspfaq.com/show.asp?id=2445
Thank you in advance.UPDATE tab1
SET col1 = REPLACE(col1,'Kop','HY')
WHERE col1 LIKE '%Kop%' ;
David Portas
SQL Server MVP
--|||Thank you Dave. It got the job. Thank you once again.
--
5 years experience with SQL Server 2000 and SAP BW/SEM
"David Portas" wrote:
> UPDATE tab1
> SET col1 = REPLACE(col1,'Kop','HY')
> WHERE col1 LIKE '%Kop%' ;
> --
> David Portas
> SQL Server MVP
> --
>
>
Replacing all occurrences of a string in a VARCHAR column?
Hi All
I have table Tab1 with a column Col1 of data type VARCHAR. I want to
replace every "Kop " string in that column with "HY". Is there an easy way t
o
do this. Below is an example with column Col1 with 2 rows of data:
Col1
---
J Dixion
K Kop
I got some helpful scripts on replacing a string within a TEXT column last
time like the one below. I have tried those scripts on other data types of
data like VARCHAR and it did not work.
http://aspfaq.com/show.asp?id=2445
Thank you in advance.MittyKom,
Try the T-SQL REPLACE function.
HTH
Jerry
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:8F17586A-F6F6-46D1-A47D-5C85F3D36E9D@.microsoft.com...
> Hi All
> I have table Tab1 with a column Col1 of data type VARCHAR. I want to
> replace every "Kop " string in that column with "HY". Is there an easy way
> to
> do this. Below is an example with column Col1 with 2 rows of data:
> Col1
> ---
> J Dixion
> K Kop
> I got some helpful scripts on replacing a string within a TEXT column last
> time like the one below. I have tried those scripts on other data types of
> data like VARCHAR and it did not work.
> http://aspfaq.com/show.asp?id=2445
> Thank you in advance.
>
I have table Tab1 with a column Col1 of data type VARCHAR. I want to
replace every "Kop " string in that column with "HY". Is there an easy way t
o
do this. Below is an example with column Col1 with 2 rows of data:
Col1
---
J Dixion
K Kop
I got some helpful scripts on replacing a string within a TEXT column last
time like the one below. I have tried those scripts on other data types of
data like VARCHAR and it did not work.
http://aspfaq.com/show.asp?id=2445
Thank you in advance.MittyKom,
Try the T-SQL REPLACE function.
HTH
Jerry
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:8F17586A-F6F6-46D1-A47D-5C85F3D36E9D@.microsoft.com...
> Hi All
> I have table Tab1 with a column Col1 of data type VARCHAR. I want to
> replace every "Kop " string in that column with "HY". Is there an easy way
> to
> do this. Below is an example with column Col1 with 2 rows of data:
> Col1
> ---
> J Dixion
> K Kop
> I got some helpful scripts on replacing a string within a TEXT column last
> time like the one below. I have tried those scripts on other data types of
> data like VARCHAR and it did not work.
> http://aspfaq.com/show.asp?id=2445
> Thank you in advance.
>
Friday, March 23, 2012
Replace or Subtract string
I have 2 columns being pulled in from mssql and need only a portion of
one column listed, for example I have:
Col1 Col2
--
--
BUILTIN_Administrators_master BUILTIN_Administrators_
sa_master sa_
DBA_msdb DBA_
...etc
I would like to, for lack of a better word, subtract column 2 from 1 to
leave "master", "msdb", etc.
Is this possible with SRS, and if so how?
Apparently I am new to this and not very skilled with the programming
aspect either, still learning. So any help would be appreciated.Got it using:
=Replace( Fields!path_leaf.Value, Fields!New.Value,"")sql
one column listed, for example I have:
Col1 Col2
--
--
BUILTIN_Administrators_master BUILTIN_Administrators_
sa_master sa_
DBA_msdb DBA_
...etc
I would like to, for lack of a better word, subtract column 2 from 1 to
leave "master", "msdb", etc.
Is this possible with SRS, and if so how?
Apparently I am new to this and not very skilled with the programming
aspect either, still learning. So any help would be appreciated.Got it using:
=Replace( Fields!path_leaf.Value, Fields!New.Value,"")sql
Monday, March 12, 2012
repeating Group Values
Hi,
I am having a problem with grouping in reporting services. I have data like
below
Col1 Col2 Col3
A B 1
A B 3
K L 1
K L 1
I am creating group on Col1 and Col2.
I nreport I am select 3 columns
Col1 Col2 Sum(Col3)
My results look like below
Col1 Col2 Col3
A B 3
A B 3
K L 2
K L 2
I am not sure why I am getting duplicate data. I want to sum col3 by col1 an
col2. I only want to get one result row per group like in SQL group by result
set.
Please help.
Thanks,
--
SRaniPWhich band are the duplicate rows being displayed in? You will most likely
want to move the display of tCol1, Col2 and SUM(COl3) the 2nd group's footer
band.
"SRaniP" <SRaniP@.discussions.microsoft.com> wrote in message
news:3551D311-578B-4336-B272-347F85FF2100@.microsoft.com...
> Hi,
> I am having a problem with grouping in reporting services. I have data
> like
> below
> Col1 Col2 Col3
> A B 1
> A B 3
> K L 1
> K L 1
> I am creating group on Col1 and Col2.
> I nreport I am select 3 columns
> Col1 Col2 Sum(Col3)
> My results look like below
> Col1 Col2 Col3
> A B 3
> A B 3
> K L 2
> K L 2
> I am not sure why I am getting duplicate data. I want to sum col3 by col1
> an
> col2. I only want to get one result row per group like in SQL group by
> result
> set.
> Please help.
> Thanks,
> --
> SRaniP
I am having a problem with grouping in reporting services. I have data like
below
Col1 Col2 Col3
A B 1
A B 3
K L 1
K L 1
I am creating group on Col1 and Col2.
I nreport I am select 3 columns
Col1 Col2 Sum(Col3)
My results look like below
Col1 Col2 Col3
A B 3
A B 3
K L 2
K L 2
I am not sure why I am getting duplicate data. I want to sum col3 by col1 an
col2. I only want to get one result row per group like in SQL group by result
set.
Please help.
Thanks,
--
SRaniPWhich band are the duplicate rows being displayed in? You will most likely
want to move the display of tCol1, Col2 and SUM(COl3) the 2nd group's footer
band.
"SRaniP" <SRaniP@.discussions.microsoft.com> wrote in message
news:3551D311-578B-4336-B272-347F85FF2100@.microsoft.com...
> Hi,
> I am having a problem with grouping in reporting services. I have data
> like
> below
> Col1 Col2 Col3
> A B 1
> A B 3
> K L 1
> K L 1
> I am creating group on Col1 and Col2.
> I nreport I am select 3 columns
> Col1 Col2 Sum(Col3)
> My results look like below
> Col1 Col2 Col3
> A B 3
> A B 3
> K L 2
> K L 2
> I am not sure why I am getting duplicate data. I want to sum col3 by col1
> an
> col2. I only want to get one result row per group like in SQL group by
> result
> set.
> Please help.
> Thanks,
> --
> SRaniP
Subscribe to:
Posts (Atom)