Showing posts with label inserting. Show all posts
Showing posts with label inserting. Show all posts

Thursday, March 29, 2012

Exporting report to excel [How to set worksheet name]

I am inserting page break after a table to put different data on different
sheet.How can i name the resultant work sheet {like table1 should be
DATA,table2 should be MYSummary}unfortunately, it is not possible. to rename your sheets.
Amarnath, MCTS
"Kamii47" wrote:
> I am inserting page break after a table to put different data on different
> sheet.How can i name the resultant work sheet {like table1 should be
> DATA,table2 should be MYSummary}

Sunday, March 25, 2012

Exporting data while people are using the site?

I'm exporting a large file from a large Production database (SQL).

Users are currently updating and inserting new records.

Does the export take a snapshot of the data when it starts ? or will
it freeze the database so all udpates/inserts happen after the export
completes?

Also, how do I get the delta of data that wasn't exported, if I want
to get the difference the next day?

Thank yoU!!!"Angel Cat" <kittycatangel@.hotmail.com> wrote in message
news:9b08c59d.0312091239.14a243f7@.posting.google.c om...
> I'm exporting a large file from a large Production database (SQL).
> Users are currently updating and inserting new records.

Is it 24hr updating or is there a break during the night?

> Does the export take a snapshot of the data when it starts ? or will
> it freeze the database so all udpates/inserts happen after the export
> completes?

Snapshot.

> Also, how do I get the delta of data that wasn't exported, if I want
> to get the difference the next day?

Comparitive reporting on some key field to provide stats.
OTOH these import tasks can be automated and scheduled.
If the database shows no activity at 3:00am daily, do it then.|||THe database is in use 24 hours a day. I need to take a dump of the
data and and make some updates but what happens when a user is updting
while I take a dump. Does DTS freeze the data when I'm exporting?

ALso, is there a way I can take the difference easily?

Thank yoU!

"mountain man" <hobbit@.southern_seaweed.com.op> wrote in message news:<38sBb.46396$aT.11510@.news-server.bigpond.net.au>...
> "Angel Cat" <kittycatangel@.hotmail.com> wrote in message
> news:9b08c59d.0312091239.14a243f7@.posting.google.c om...
> > I'm exporting a large file from a large Production database (SQL).
> > Users are currently updating and inserting new records.
> Is it 24hr updating or is there a break during the night?
> > Does the export take a snapshot of the data when it starts ? or will
> > it freeze the database so all udpates/inserts happen after the export
> > completes?
> Snapshot.
> > Also, how do I get the delta of data that wasn't exported, if I want
> > to get the difference the next day?
> Comparitive reporting on some key field to provide stats.
> OTOH these import tasks can be automated and scheduled.
> If the database shows no activity at 3:00am daily, do it then.|||"Angel Cat" <kittycatangel@.hotmail.com> wrote in message
news:9b08c59d.0312100813.124f1c34@.posting.google.c om...
> THe database is in use 24 hours a day. I need to take a dump of the
> data and and make some updates but what happens when a user is updting
> while I take a dump. Does DTS freeze the data when I'm exporting?

Effectively it does a snapshot.

> ALso, is there a way I can take the difference easily?

The quantitative difference can be approximated in the first
instance by publishing the rowcount of the table "as at snapshot"
as distinct from the rowcount of the realtime SQL table which
can be easily obtained dynamically between loads. This will
represent (net) rows to be added/deleted.

Operationally this will imply part of the export process
will be to write the "last record included" type of thing
to some local table.

The quantitative differences are more difficult issues to deal
with but obviously you need to decide what elements of the
data you wish to keep track of during inter-load build-ups.
These you can add to the rowcount info if/when req'd.

Another idle thought here includes a master-publication
register accessible to the distribution group (who are getting
your export file) which is updated at every publication with
relevant information, and coupled with a realtime query into
SQL to compare nowtime with last publication.

> Thank yoU!
> "mountain man" <hobbit@.southern_seaweed.com.op> wrote in message
news:<38sBb.46396$aT.11510@.news-server.bigpond.net.au>...
> > "Angel Cat" <kittycatangel@.hotmail.com> wrote in message
> > news:9b08c59d.0312091239.14a243f7@.posting.google.c om...
> > > I'm exporting a large file from a large Production database (SQL).
> > > Users are currently updating and inserting new records.
> > Is it 24hr updating or is there a break during the night?
> > > Does the export take a snapshot of the data when it starts ? or will
> > > it freeze the database so all udpates/inserts happen after the export
> > > completes?
> > Snapshot.
> > > Also, how do I get the delta of data that wasn't exported, if I want
> > > to get the difference the next day?
> > Comparitive reporting on some key field to provide stats.
> > OTOH these import tasks can be automated and scheduled.
> > If the database shows no activity at 3:00am daily, do it then.|||Angel Cat,

It was my understanding that SQL 7 and 2000 have a snapshot of the data "as
of" the end time of the databases.
If you start your backup at 6pm and users are inserting and updating, and
your database backup finishes at 6:30pm, your backup will be as of 6:30pm.

MSSQL 6.5 had a snapshot of the data at 6pm. Assuming the example above.

Oscar...

"Angel Cat" <kittycatangel@.hotmail.com> wrote in message
news:9b08c59d.0312091239.14a243f7@.posting.google.c om...
> I'm exporting a large file from a large Production database (SQL).
> Users are currently updating and inserting new records.
> Does the export take a snapshot of the data when it starts ? or will
> it freeze the database so all udpates/inserts happen after the export
> completes?
> Also, how do I get the delta of data that wasn't exported, if I want
> to get the difference the next day?
> Thank yoU!!!

Exporting data from SQL table to Excel File - How to delete rows before inserting new

Hi,

Question pls. I have an MS SQL local package where it exports data from SQL table to Excel file. My question is, how can I erase all the records in my excel file before i export the new data from SQL table?

What i want is to delete the rows in the destination file before inserting new records.

Note:
I cannot do the drop & recreate table because the users has no permission to do this in the database. Only the DB admin is allowed to drop & create table.

Thanks a lot.

Quote:

Originally Posted by LimaCharlie

Hi,

Question pls. I have an MS SQL local package where it exports data from SQL table to Excel file. My question is, how can I erase all the records in my excel file before i export the new data from SQL table?

What i want is to delete the rows in the destination file before inserting new records.

Note:
I cannot do the drop & recreate table because the users has no permission to do this in the database. Only the DB admin is allowed to drop & create table.

Thanks a lot.


Create a view that limits number of exported rows and use it in DTS package instead of a table.

Good Luck.|||hi iburyak,

just the same, the records are being appended to the excel file. what i want is to delete the rows in the destination file before inserting new records.

thanks.|||Did you create a view that removes unwanted records?
Execute a view on a Server side and make sure this is the data you want to export, don't create a view to select * from table_name it will not correct a problem.

You need to give me more information then just I want to delete records.
It is a wrong approach to load all records and delete on destination side you need to load only necessary records.|||Hi Iburyak,

The Question is... this excel file is getting populated everyday and everyday before porting data to the excel the old data has to be erased and new data filled up.

Any help on that.

Thanks in advance..