Dear All,
In my Item Master table, the item column has values like 'printing' in more
than 1000 rows. This was a data entry error. Now my user want all the
instances of 'printing' to be replace by 'printed'. Is there any ways to
update the entire rows in one go, or I will have to change the name from VB
ror by row, or using cusror in SQL.
Please help.
Thanks & Regards,
PramodYou didn't provide much details, but assuming you have a column named "x" fo
r which some rows
currently have the string "printing" and you want to change that string to "
printed", then it is
dead simple:
UPDATE tblname
SET x = 'printed'
WHERE x = 'printing'
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<pramod@.luxoroffice.com> wrote in message news:%235smP8lHFHA.3500@.TK2MSFTNGP14.phx.gbl...[c
olor=darkred]
> Dear All,
> In my Item Master table, the item column has values like 'printing' in mor
e
> than 1000 rows. This was a data entry error. Now my user want all the
> instances of 'printing' to be replace by 'printed'. Is there any ways to
> update the entire rows in one go, or I will have to change the name from V
B
> ror by row, or using cusror in SQL.
> Please help.
> Thanks & Regards,
> Pramod
>[/color]|||If when you say "values like 'printing'", you mean that
'printing' is not the entire column value, you may need
something like this.
update ItemMaster set
item = replace(item, 'printing', 'printed')
where item like '%printing%'
Steve Kass
Drew University
pramod@.luxoroffice.com wrote:
>Dear All,
>In my Item Master table, the item column has values like 'printing' in more
>than 1000 rows. This was a data entry error. Now my user want all the
>instances of 'printing' to be replace by 'printed'. Is there any ways to
>update the entire rows in one go, or I will have to change the name from VB
>ror by row, or using cusror in SQL.
>Please help.
>Thanks & Regards,
>Pramod
>
>|||try this:-
update <tablename>
set <fieldname> = replace(<fieldname>, 'Printing', 'Printed')
from table
steve
"Steve Kass" <skass@.drew.edu> wrote in message
news:%23d4ofZmHFHA.1392@.TK2MSFTNGP10.phx.gbl...
> If when you say "values like 'printing'", you mean that
> 'printing' is not the entire column value, you may need
> something like this.
> update ItemMaster set
> item = replace(item, 'printing', 'printed')
> where item like '%printing%'
> Steve Kass
> Drew University
> pramod@.luxoroffice.com wrote:
>|||Dear Steve,
My Problem is sloved by the query u provided:
UPDATE ItemMaster
SET ItemName = REPLACE(ItemName, 'Printing', 'Printed')
FROM ItemMaster
WHERE ItemName LIKE '%Printing%'
Thanks,
"Steven Richardson" <steve@.cheltenhamdirectory.com> wrote in message
news:Ocz9w2mHFHA.1860@.TK2MSFTNGP15.phx.gbl...
> try this:-
> update <tablename>
> set <fieldname> = replace(<fieldname>, 'Printing', 'Printed')
> from table
>
> steve
>
> "Steve Kass" <skass@.drew.edu> wrote in message
> news:%23d4ofZmHFHA.1392@.TK2MSFTNGP10.phx.gbl...
>
Showing posts with label printing. Show all posts
Showing posts with label printing. Show all posts
Wednesday, March 21, 2012
Monday, March 12, 2012
Repeating Footer on every page when printing
Using RS2005, but the same thing happened on RS2000.
This report has 4 matrices and 4 charts which causes the report to print on
3 pages of 11in by 8.5in paper (landscape). I have a Footer that references a
textbox in the body of the report, but when the report is printed, the footer
only appears on the last page. The textbox that the footer is referring to
has an aggregate expression in it such as First(Fields!REVIEW_MONTH.Value,
"Datasetname"). The Footer has the following expression: "= ReportItems!textbox53.value". I have tried everything including vertically
stretching textbox53 across all of the objects in the body. This almost
worked because the footer did appear on pages 1 & 2, but not page 3.
Can someone please help me. Thanks.
--
-RB
:)FYI - I found the solution by contacting MSN support.
The key is to create a hidden report parameter. In the default values
section, use "From Query" and select the dataset and the field that is
desired to be displayed in the footer. Then just reference the Hidden
parameter within a Textbox of the Page Footer. Now, the Page Footer will
repeat on every page of the report regardless of the number of different data
regions. The report parameter is treated like a Global variable in this
scenario.
--
-RB
:)
"capricorn" wrote:
> Using RS2005, but the same thing happened on RS2000.
> This report has 4 matrices and 4 charts which causes the report to print on
> 3 pages of 11in by 8.5in paper (landscape). I have a Footer that references a
> textbox in the body of the report, but when the report is printed, the footer
> only appears on the last page. The textbox that the footer is referring to
> has an aggregate expression in it such as First(Fields!REVIEW_MONTH.Value,
> "Datasetname"). The Footer has the following expression: "=> ReportItems!textbox53.value". I have tried everything including vertically
> stretching textbox53 across all of the objects in the body. This almost
> worked because the footer did appear on pages 1 & 2, but not page 3.
> Can someone please help me. Thanks.
> --
> -RB
> :)
This report has 4 matrices and 4 charts which causes the report to print on
3 pages of 11in by 8.5in paper (landscape). I have a Footer that references a
textbox in the body of the report, but when the report is printed, the footer
only appears on the last page. The textbox that the footer is referring to
has an aggregate expression in it such as First(Fields!REVIEW_MONTH.Value,
"Datasetname"). The Footer has the following expression: "= ReportItems!textbox53.value". I have tried everything including vertically
stretching textbox53 across all of the objects in the body. This almost
worked because the footer did appear on pages 1 & 2, but not page 3.
Can someone please help me. Thanks.
--
-RB
:)FYI - I found the solution by contacting MSN support.
The key is to create a hidden report parameter. In the default values
section, use "From Query" and select the dataset and the field that is
desired to be displayed in the footer. Then just reference the Hidden
parameter within a Textbox of the Page Footer. Now, the Page Footer will
repeat on every page of the report regardless of the number of different data
regions. The report parameter is treated like a Global variable in this
scenario.
--
-RB
:)
"capricorn" wrote:
> Using RS2005, but the same thing happened on RS2000.
> This report has 4 matrices and 4 charts which causes the report to print on
> 3 pages of 11in by 8.5in paper (landscape). I have a Footer that references a
> textbox in the body of the report, but when the report is printed, the footer
> only appears on the last page. The textbox that the footer is referring to
> has an aggregate expression in it such as First(Fields!REVIEW_MONTH.Value,
> "Datasetname"). The Footer has the following expression: "=> ReportItems!textbox53.value". I have tried everything including vertically
> stretching textbox53 across all of the objects in the body. This almost
> worked because the footer did appear on pages 1 & 2, but not page 3.
> Can someone please help me. Thanks.
> --
> -RB
> :)
Subscribe to:
Posts (Atom)