Showing posts with label row. Show all posts
Showing posts with label row. Show all posts

Friday, March 30, 2012

Restrict ing Sum(...) in Report Table Footer?

Hello,
My Report Table contains a Date Field and a numeric Value field. In the
Footer row of the table I use the Sum Aggregate function to sum up all the
values for all the rows that get displayed
=sum(Fields!CountFld.Value)
I also have an conditional Expression for the background color of each cell
in the detail row
=iif(Parameters!EndDate.Value > Fields!
CurExpireDate.Value, "Gainsboro", "White")
which changes the background color of each cell in the row (I add this IIF
expression to each field in the row).
So, if a value is in a row that is the gainsboro color, I do not want to sum
that value. Is there a way to restrict sum(Fields!CountFld.Value) ?
PseudoCode
=Sum(iif(Parameters!EndDate.Value > Fields!
CurExpireDate.Value, Fields!CountFld.Value, 0))
something like this?
Thanks,
RichWell, I tried my own pseudocode and it worked!
=Sum(iif(Parameters!EndDate.Value > Fields!
> CurExpireDate.Value, 0, Fields!CountFld.Value))
I just had to change the values around
"Rich" wrote:
> Hello,
> My Report Table contains a Date Field and a numeric Value field. In the
> Footer row of the table I use the Sum Aggregate function to sum up all the
> values for all the rows that get displayed
> =sum(Fields!CountFld.Value)
> I also have an conditional Expression for the background color of each cell
> in the detail row
> =iif(Parameters!EndDate.Value > Fields!
> CurExpireDate.Value, "Gainsboro", "White")
> which changes the background color of each cell in the row (I add this IIF
> expression to each field in the row).
> So, if a value is in a row that is the gainsboro color, I do not want to sum
> that value. Is there a way to restrict sum(Fields!CountFld.Value) ?
> PseudoCode
> =Sum(iif(Parameters!EndDate.Value > Fields!
> CurExpireDate.Value, Fields!CountFld.Value, 0))
> something like this?
> Thanks,
> Rich
>|||I used the same method, but have run into 1 problem. If the table or group
spans multiple pages, the sum fails (I get #Error). Not sure if you'll
encounter this, but I thought I would make you aware of my issue using that
method.
Michael
"Rich" wrote:
> Well, I tried my own pseudocode and it worked!
> =Sum(iif(Parameters!EndDate.Value > Fields!
> > CurExpireDate.Value, 0, Fields!CountFld.Value))
> I just had to change the values around
>
> "Rich" wrote:
> > Hello,
> >
> > My Report Table contains a Date Field and a numeric Value field. In the
> > Footer row of the table I use the Sum Aggregate function to sum up all the
> > values for all the rows that get displayed
> >
> > =sum(Fields!CountFld.Value)
> >
> > I also have an conditional Expression for the background color of each cell
> > in the detail row
> >
> > =iif(Parameters!EndDate.Value > Fields!
> > CurExpireDate.Value, "Gainsboro", "White")
> >
> > which changes the background color of each cell in the row (I add this IIF
> > expression to each field in the row).
> >
> > So, if a value is in a row that is the gainsboro color, I do not want to sum
> > that value. Is there a way to restrict sum(Fields!CountFld.Value) ?
> >
> > PseudoCode
> > =Sum(iif(Parameters!EndDate.Value > Fields!
> > CurExpireDate.Value, Fields!CountFld.Value, 0))
> >
> > something like this?
> >
> > Thanks,
> > Rich
> >|||Thanks. Not the kind of surprises I am looking forward to. Hopefully, I
won't run into that problem, but if I do, I will now know that I am not
alone. This is actually quite encouraging because I have had some seroius
heartaches with RS (2000).
"Michael C" wrote:
> I used the same method, but have run into 1 problem. If the table or group
> spans multiple pages, the sum fails (I get #Error). Not sure if you'll
> encounter this, but I thought I would make you aware of my issue using that
> method.
> Michael
> "Rich" wrote:
> > Well, I tried my own pseudocode and it worked!
> >
> > =Sum(iif(Parameters!EndDate.Value > Fields!
> > > CurExpireDate.Value, 0, Fields!CountFld.Value))
> >
> > I just had to change the values around
> >
> >
> >
> > "Rich" wrote:
> >
> > > Hello,
> > >
> > > My Report Table contains a Date Field and a numeric Value field. In the
> > > Footer row of the table I use the Sum Aggregate function to sum up all the
> > > values for all the rows that get displayed
> > >
> > > =sum(Fields!CountFld.Value)
> > >
> > > I also have an conditional Expression for the background color of each cell
> > > in the detail row
> > >
> > > =iif(Parameters!EndDate.Value > Fields!
> > > CurExpireDate.Value, "Gainsboro", "White")
> > >
> > > which changes the background color of each cell in the row (I add this IIF
> > > expression to each field in the row).
> > >
> > > So, if a value is in a row that is the gainsboro color, I do not want to sum
> > > that value. Is there a way to restrict sum(Fields!CountFld.Value) ?
> > >
> > > PseudoCode
> > > =Sum(iif(Parameters!EndDate.Value > Fields!
> > > CurExpireDate.Value, Fields!CountFld.Value, 0))
> > >
> > > something like this?
> > >
> > > Thanks,
> > > Rich
> > >sql

Saturday, February 25, 2012

Restoring deleted records with out of row blobs?

I have a database that had a number of rows in multiple tables deleted -
fortunately there was very little activity after these deletions (mostly more
deletions a few days later).
I have the log files, but the original inserts just have the pointer to the
blob. I tried generating undo scripts with apexsql Log but it doesn't even
reference the blob column when the script generates (restoring from a
detached mdf does give the pointer, but that pointer doesn't go anywhere and
a select on it is blank/null).
How is one supposed to go about restoring records / rolling back a
transaction log for deleting a row with an out-of-row blob? Am I totally
screwed even though nothing else happened in the database aside from the
deletes before the backup was taken?
"Andrew Meinert" <AndrewMeinert@.discussions.microsoft.com> wrote in message
news:5CE119C0-80AE-4A16-A452-799A41971BC5@.microsoft.com...
>I have a database that had a number of rows in multiple tables deleted -
> fortunately there was very little activity after these deletions (mostly
> more
> deletions a few days later).
> I have the log files, but the original inserts just have the pointer to
> the
> blob. I tried generating undo scripts with apexsql Log but it doesn't
> even
> reference the blob column when the script generates (restoring from a
> detached mdf does give the pointer, but that pointer doesn't go anywhere
> and
> a select on it is blank/null).
> How is one supposed to go about restoring records / rolling back a
> transaction log for deleting a row with an out-of-row blob? Am I totally
> screwed even though nothing else happened in the database aside from the
> deletes before the backup was taken?
Use the last full backup and the subsequent log backups to do a
point-in-time restore to a new database. Then do INSERTS from the restored
database to your real database.
David
|||"David Browne" wrote:

> "Andrew Meinert" <AndrewMeinert@.discussions.microsoft.com> wrote in message
> news:5CE119C0-80AE-4A16-A452-799A41971BC5@.microsoft.com...
>
> Use the last full backup and the subsequent log backups to do a
> point-in-time restore to a new database. Then do INSERTS from the restored
> database to your real database.
> David
>
Unfortunately the database was created between full backups and the only
remaining full backup is after the fact. There's no way to roll back the
transactions from the ldf?
How are blobs handled in the transaction log? Is it just a limitation of
the log viewer that I'm using that I don't see the the anything about the
content of the blobs aside from the pointer in row?
|||"David Browne" wrote:

> "Andrew Meinert" <AndrewMeinert@.discussions.microsoft.com> wrote in message
> news:5CE119C0-80AE-4A16-A452-799A41971BC5@.microsoft.com...
>
> Use the last full backup and the subsequent log backups to do a
> point-in-time restore to a new database. Then do INSERTS from the restored
> database to your real database.
> David
>
So far it looks like
http://www.red-gate.com/products/SQL_Log_Rescue/index.htm will help me. My
frustrations seem to stem from a limitation with the other software I had
tried. I can see the correct data in the demo of log rescue... here's to
hoping.

Restoring deleted records with out of row blobs?

I have a database that had a number of rows in multiple tables deleted -
fortunately there was very little activity after these deletions (mostly more
deletions a few days later).
I have the log files, but the original inserts just have the pointer to the
blob. I tried generating undo scripts with apexsql Log but it doesn't even
reference the blob column when the script generates (restoring from a
detached mdf does give the pointer, but that pointer doesn't go anywhere and
a select on it is blank/null).
How is one supposed to go about restoring records / rolling back a
transaction log for deleting a row with an out-of-row blob? Am I totally
screwed even though nothing else happened in the database aside from the
deletes before the backup was taken?"Andrew Meinert" <AndrewMeinert@.discussions.microsoft.com> wrote in message
news:5CE119C0-80AE-4A16-A452-799A41971BC5@.microsoft.com...
>I have a database that had a number of rows in multiple tables deleted -
> fortunately there was very little activity after these deletions (mostly
> more
> deletions a few days later).
> I have the log files, but the original inserts just have the pointer to
> the
> blob. I tried generating undo scripts with apexsql Log but it doesn't
> even
> reference the blob column when the script generates (restoring from a
> detached mdf does give the pointer, but that pointer doesn't go anywhere
> and
> a select on it is blank/null).
> How is one supposed to go about restoring records / rolling back a
> transaction log for deleting a row with an out-of-row blob? Am I totally
> screwed even though nothing else happened in the database aside from the
> deletes before the backup was taken?
Use the last full backup and the subsequent log backups to do a
point-in-time restore to a new database. Then do INSERTS from the restored
database to your real database.
David|||"David Browne" wrote:
> "Andrew Meinert" <AndrewMeinert@.discussions.microsoft.com> wrote in message
> news:5CE119C0-80AE-4A16-A452-799A41971BC5@.microsoft.com...
> >I have a database that had a number of rows in multiple tables deleted -
> > fortunately there was very little activity after these deletions (mostly
> > more
> > deletions a few days later).
> >
> > I have the log files, but the original inserts just have the pointer to
> > the
> > blob. I tried generating undo scripts with apexsql Log but it doesn't
> > even
> > reference the blob column when the script generates (restoring from a
> > detached mdf does give the pointer, but that pointer doesn't go anywhere
> > and
> > a select on it is blank/null).
> >
> > How is one supposed to go about restoring records / rolling back a
> > transaction log for deleting a row with an out-of-row blob? Am I totally
> > screwed even though nothing else happened in the database aside from the
> > deletes before the backup was taken?
>
> Use the last full backup and the subsequent log backups to do a
> point-in-time restore to a new database. Then do INSERTS from the restored
> database to your real database.
> David
>
So far it looks like
http://www.red-gate.com/products/SQL_Log_Rescue/index.htm will help me. My
frustrations seem to stem from a limitation with the other software I had
tried. I can see the correct data in the demo of log rescue... here's to
hoping.

Restoring deleted records with out of row blobs?

I have a database that had a number of rows in multiple tables deleted -
fortunately there was very little activity after these deletions (mostly mor
e
deletions a few days later).
I have the log files, but the original inserts just have the pointer to the
blob. I tried generating undo scripts with apexsql Log but it doesn't even
reference the blob column when the script generates (restoring from a
detached mdf does give the pointer, but that pointer doesn't go anywhere and
a select on it is blank/null).
How is one supposed to go about restoring records / rolling back a
transaction log for deleting a row with an out-of-row blob? Am I totally
screwed even though nothing else happened in the database aside from the
deletes before the backup was taken?"Andrew Meinert" <AndrewMeinert@.discussions.microsoft.com> wrote in message
news:5CE119C0-80AE-4A16-A452-799A41971BC5@.microsoft.com...
>I have a database that had a number of rows in multiple tables deleted -
> fortunately there was very little activity after these deletions (mostly
> more
> deletions a few days later).
> I have the log files, but the original inserts just have the pointer to
> the
> blob. I tried generating undo scripts with apexsql Log but it doesn't
> even
> reference the blob column when the script generates (restoring from a
> detached mdf does give the pointer, but that pointer doesn't go anywhere
> and
> a select on it is blank/null).
> How is one supposed to go about restoring records / rolling back a
> transaction log for deleting a row with an out-of-row blob? Am I totally
> screwed even though nothing else happened in the database aside from the
> deletes before the backup was taken?
Use the last full backup and the subsequent log backups to do a
point-in-time restore to a new database. Then do INSERTS from the restored
database to your real database.
David|||"David Browne" wrote:

> "Andrew Meinert" <AndrewMeinert@.discussions.microsoft.com> wrote in messag
e
> news:5CE119C0-80AE-4A16-A452-799A41971BC5@.microsoft.com...
>
> Use the last full backup and the subsequent log backups to do a
> point-in-time restore to a new database. Then do INSERTS from the restore
d
> database to your real database.
> David
>
Unfortunately the database was created between full backups and the only
remaining full backup is after the fact. There's no way to roll back the
transactions from the ldf?
How are blobs handled in the transaction log? Is it just a limitation of
the log viewer that I'm using that I don't see the the anything about the
content of the blobs aside from the pointer in row?|||"David Browne" wrote:

> "Andrew Meinert" <AndrewMeinert@.discussions.microsoft.com> wrote in messag
e
> news:5CE119C0-80AE-4A16-A452-799A41971BC5@.microsoft.com...
>
> Use the last full backup and the subsequent log backups to do a
> point-in-time restore to a new database. Then do INSERTS from the restore
d
> database to your real database.
> David
>
So far it looks like
http://www.red-gate.com/products/SQ...escue/index.htm will help me. My
frustrations seem to stem from a limitation with the other software I had
tried. I can see the correct data in the demo of log rescue... here's to
hoping.