Showing posts with label removing. Show all posts
Showing posts with label removing. Show all posts

Friday, March 30, 2012

How to removing document map

I add document map to my report but I forgot

how can I remove it

thanks!I believe that you put something in the label property of something to make it appear in the documents map. If you delete what you entered in the label property you should be okay.|||I removed all of the entries in the Document Map label fields. When I run the report in RS, the document map pane is still displayed with the report name on the document map pane. Any idea how to make the document pane not show at all?|||Once I removed all of the labels for the testboxes showing in the document map, I was able to view my report without viewing the document map.

How to removing document map

I add document map to my report but I forgot

how can I remove it

thanks!I believe that you put something in the label property of something to make it appear in the documents map. If you delete what you entered in the label property you should be okay.|||I removed all of the entries in the Document Map label fields. When I run the report in RS, the document map pane is still displayed with the report name on the document map pane. Any idea how to make the document pane not show at all?|||Once I removed all of the labels for the testboxes showing in the document map, I was able to view my report without viewing the document map.sql

Monday, March 26, 2012

How to remove a partition completely

Hello,

I'm testing partitions and all works well except removing partitions. My steps for removing the oldest partition of a partitioned table:

a) CREATE TABLE I'm creating a new temporary table with the same structure and indexes as the partitioned one - in the same filegroup as the first partition ==> OK

b) ALTER TABLE I'm switching out the oldest partition to the new table => OK

c) ALTER PARTITION FUNCTION I'm merging the oldest boundary value == OK

I have checked, that all old data rows are "removed" from the partitioned table. Then I drop the temporary table and remove the file from the file group.

Checking Database Properties > Filegroups shows there are 0 files in the file group. When I try to remove the file group I get an error

Quote: Drop failed for FileGroup 'fgtrans000000'. (Microsoft.SqlServer.Smo)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The filegroup 'fgtrans000000' cannot be removed because it is not empty. (Microsoft SQL Server, Error: 5042)

Thank you

Eckard

I managed to solve the problem:

When the partition function is defined AS RANGE RIGHT, then merging the oldest partitions means removing the second oldest file group from the partition scheme! Since the oldest file group is reused I could not remove the file group. It's descibed in the documentation, ok.

But that was not what I excepected. I thought the oldest file group would be removed. It's symmetric with the other end: If I split the newest partition the new file group gets inserted before (!) the newest one if I get RANGE RIGHT or LEFT wrong.

IMHO this should not depend on the RANGE RIGHT or LEFT definition.

Eckard

sql

How to remove a partition completely

Hello,

I'm testing partitions and all works well except removing partitions. My steps for removing the oldest partition of a partitioned table:

a) CREATE TABLE I'm creating a new temporary table with the same structure and indexes as the partitioned one - in the same filegroup as the first partition ==> OK

b) ALTER TABLE I'm switching out the oldest partition to the new table => OK

c) ALTER PARTITION FUNCTION I'm merging the oldest boundary value == OK

I have checked, that all old data rows are "removed" from the partitioned table. Then I drop the temporary table and remove the file from the file group.

Checking Database Properties > Filegroups shows there are 0 files in the file group. When I try to remove the file group I get an error

Quote: Drop failed for FileGroup 'fgtrans000000'. (Microsoft.SqlServer.Smo)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The filegroup 'fgtrans000000' cannot be removed because it is not empty. (Microsoft SQL Server, Error: 5042)

Thank you

Eckard

I managed to solve the problem:

When the partition function is defined AS RANGE RIGHT, then merging the oldest partitions means removing the second oldest file group from the partition scheme! Since the oldest file group is reused I could not remove the file group. It's descibed in the documentation, ok.

But that was not what I excepected. I thought the oldest file group would be removed. It's symmetric with the other end: If I split the newest partition the new file group gets inserted before (!) the newest one if I get RANGE RIGHT or LEFT wrong.

IMHO this should not depend on the RANGE RIGHT or LEFT definition.

Eckard

How to remove a ' from a field

I need help removing a ' from a field
Here is an example that should get you started:
create table #sometable (somecolumn varchar(80))
insert into #sometable (somecolumn) values ('lets try to remove the '' =
additional text'' within this column')
insert into #sometable (somecolumn) values ('lets try to remove the '''' =
additional text'''' within this column')
select * from #sometable=20
GO
UPDATE #sometable SET somecolumn =3D REPLACE(somecolumn, '''', '')
select * from #sometable=20
--=20
Keith
"Jon Hirasaki" <jhirasaki@.homecaresupply.com> wrote in message =
news:7CBE1935-9FD2-474F-9C19-99AAB3A3736E@.microsoft.com...
> I need help removing a ' from a field
|||I used the update command
update table set name = replace (name,'''','')
and it puts a blank space in the field where the ' was. How do I remove the blank space? I other blank spaces in the field that I need to keep.
"Keith Kratochvil" wrote:

> Here is an example that should get you started:
>
> create table #sometable (somecolumn varchar(80))
> insert into #sometable (somecolumn) values ('lets try to remove the '' additional text'' within this column')
> insert into #sometable (somecolumn) values ('lets try to remove the '''' additional text'''' within this column')
> select * from #sometable
> GO
> UPDATE #sometable SET somecolumn = REPLACE(somecolumn, '''', '')
> select * from #sometable
>
> --
> Keith
>
> "Jon Hirasaki" <jhirasaki@.homecaresupply.com> wrote in message news:7CBE1935-9FD2-474F-9C19-99AAB3A3736E@.microsoft.com...
>
|||I am not sure what you mean. The update sets this value:
lets try to remove the ' additional text' within this column
To this:
lets try to remove the additional text within this column
As you can see, the apostrophe after "text" has been removed and =
replaced with nothing. There is still one space between "text" and =
"width."
The apostrophe after "the" was removed and replaced with nothing, =
however there are two spaces between "the" and "additional" because =
there were two spaces between the original string "the ' additional."
The update works as expected...the layout of the original data causes =
the end result to look a bit strange.
Do you have two spaces when you only want one? If so, try this:
UPDATE #sometable SET somecolumn =3D REPLACE(somecolumn, ' ', ' ')
select * from #sometable=20
--=20
Keith
"Jon Hirasaki" <Jon Hirasaki@.discussions.microsoft.com> wrote in message =
news:D804BB8F-C783-4D63-8DF0-0EC2BBAE69FE@.microsoft.com...
> I used the update command
> update table set name =3D replace (name,'''','')
> and it puts a blank space in the field where the ' was. How do I =
remove the blank space? I other blank spaces in the field that I need =
to keep.[vbcol=seagreen]
>=20
> "Keith Kratochvil" wrote:
>=20
'' additional text'' within this column')[vbcol=seagreen]
'''' additional text'''' within this column')[vbcol=seagreen]
news:7CBE1935-9FD2-474F-9C19-99AAB3A3736E@.microsoft.com...[vbcol=seagreen]
|||What I have is value: let's try to remove the additional text within this column
I run: update #sometable set somecolumn= replace(somecolumn, '''', ' ')
This code removes the ' but it leave a blank space so the value look like this:
let s try to remove the additional text within this column
"Keith Kratochvil" wrote:

> I am not sure what you mean. The update sets this value:
> lets try to remove the ' additional text' within this column
> To this:
> lets try to remove the additional text within this column
> As you can see, the apostrophe after "text" has been removed and replaced with nothing. There is still one space between "text" and "width."
> The apostrophe after "the" was removed and replaced with nothing, however there are two spaces between "the" and "additional" because there were two spaces between the original string "the ' additional."
> The update works as expected...the layout of the original data causes the end result to look a bit strange.
> Do you have two spaces when you only want one? If so, try this:
> UPDATE #sometable SET somecolumn = REPLACE(somecolumn, ' ', ' ')
> select * from #sometable
> --
> Keith
>
> "Jon Hirasaki" <Jon Hirasaki@.discussions.microsoft.com> wrote in message news:D804BB8F-C783-4D63-8DF0-0EC2BBAE69FE@.microsoft.com...
>
|||Try removing the space from the "replace" character (as I had done =
within my original sql statement):
update #sometable set somecolumn=3D replace(somecolumn, '''', '')
--=20
Keith
"Jon Hirasaki" <Jon Hirasaki@.discussions.microsoft.com> wrote in message =
news:F41CC89E-0926-4D24-B624-1052A48DD57B@.microsoft.com...
> What I have is value: let's try to remove the additional text within =
this column
> I run: update #sometable set somecolumn=3D replace(somecolumn, '''', ' =
')
> This code removes the ' but it leave a blank space so the value look =
like this:[vbcol=seagreen]
> let s try to remove the additional text within this column
>=20
>=20
>=20
> "Keith Kratochvil" wrote:
>=20
replaced with nothing. There is still one space between "text" and =
"width."[vbcol=seagreen]
however there are two spaces between "the" and "additional" because =
there were two spaces between the original string "the ' additional."[vbcol=seagreen]
causes the end result to look a bit strange.[vbcol=seagreen]
message news:D804BB8F-C783-4D63-8DF0-0EC2BBAE69FE@.microsoft.com...[vbcol=seagreen]
remove the blank space? I other blank spaces in the field that I need =
to keep.[vbcol=seagreen]
the '' additional text'' within this column')[vbcol=seagreen]
the '''' additional text'''' within this column')[vbcol=seagreen]
'')[vbcol=seagreen]
news:7CBE1935-9FD2-474F-9C19-99AAB3A3736E@.microsoft.com...[vbcol=seagreen]
sql