Monday, March 26, 2012
Few Design and Programming Questions
little searching. Thanks for any help!
1. I need to create a few reports with some repeating pages. For example, in
one of them I need to have a cover page, then couple content pages, then a
summary page. I need to double print the content pages. There must be a
better way to achive this than manually copy-and-paste to duplicate those
pages in the report design, is there?
2. Is there a way to embed a PDF file into the report somehow? Say, at the
end of each report, I need to include a few pages of static information. Can
I somehow have the report server to pull out a PDF file instead of putting
those text into the report design?
3. Can I include other reports in a report?
4. Is there a way to control printing of the reports after I exported them
into PDF for printing? Say, I want page 3 and 4 print on both side of the
paper. I don't think this is possible, but asking to make sure.
5. Can I control the size of the parameter input area of the report at the
top portion of the report server? I need to disply 8 input boxes. Users need
to scroll down in the parameter area to see the last 2.
Thanks!No reply yet : ]
Does anyone know something about my question #2?
Or any suggestions on how to deal with complexed text/table formatting with
VS .NET 2003 report designer? It is so hard to make things look right, that's
why I wanted to just "attach" a PDF or word file for those static text.
"Xonic" wrote:
> I have a few questions regarding reports that I haven't found answers after a
> little searching. Thanks for any help!
> 1. I need to create a few reports with some repeating pages. For example, in
> one of them I need to have a cover page, then couple content pages, then a
> summary page. I need to double print the content pages. There must be a
> better way to achive this than manually copy-and-paste to duplicate those
> pages in the report design, is there?
> 2. Is there a way to embed a PDF file into the report somehow? Say, at the
> end of each report, I need to include a few pages of static information. Can
> I somehow have the report server to pull out a PDF file instead of putting
> those text into the report design?
> 3. Can I include other reports in a report?
> 4. Is there a way to control printing of the reports after I exported them
> into PDF for printing? Say, I want page 3 and 4 print on both side of the
> paper. I don't think this is possible, but asking to make sure.
> 5. Can I control the size of the parameter input area of the report at the
> top portion of the report server? I need to disply 8 input boxes. Users need
> to scroll down in the parameter area to see the last 2.
> Thanks!
Friday, March 23, 2012
Feedback on CHANGE TRACKING with SCHEDULE
I am searching concrete feedback on SQL Server 2000 SP3 Server
that have in place FTS catalog population with the following options:
- CHANGE TRACKING
- SCHEDULE
Many thanks.
Change tracking with update index in background will continually poll the tables which you are full text indexing and index changes.
Some business requirements require that you update the index at discrete intervals; ie once a minute, hour, day. There are normally two reasons for this 1) performance, 2) recovery.
You may get better performance on heavily updated tables by scheduling the indexing of the changes. For recovery, sometimes you need to synchronize your catalog updates with backups, transaction log dumps etc. There have also been problems with clustering and change tracking, where you failover to a new node, and suddenly your catalog is read only - ie subsequent updates are not processed. With update index at scheduled intervals this problem can be avoided.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Jean-Marc Pugin" <jmpugin@.mobileworkers.com> wrote in message news:Owl82rc3EHA.2804@.TK2MSFTNGP15.phx.gbl...
Hi,
I am searching concrete feedback on SQL Server 2000 SP3 Server
that have in place FTS catalog population with the following options:
- CHANGE TRACKING
- SCHEDULE
Many thanks.
|||Hi,
I have seen that during schedule definition you can define the starting
hour.
Is it possible to define a Time Interval during which catalog update
will occur i.e. only from 2 to 3 AM.
It is because on a Production Server those heavy computations are better
achieved during batch windows.
Thanks
_____
From: Hilary Cotter [mailto:hilary.cotter@.gmail.com]
Posted At: jeudi 9 dcembre 2004 13:46
Posted To: microsoft.public.sqlserver.fulltext
Conversation: Feedback on CHANGE TRACKING with SCHEDULE
Subject: Re: Feedback on CHANGE TRACKING with SCHEDULE
Change tracking with update index in background will continually poll
the tables which you are full text indexing and index changes.
Some business requirements require that you update the index at discrete
intervals; ie once a minute, hour, day. There are normally two reasons
for this 1) performance, 2) recovery.
You may get better performance on heavily updated tables by scheduling
the indexing of the changes. For recovery, sometimes you need to
synchronize your catalog updates with backups, transaction log dumps
etc. There have also been problems with clustering and change tracking,
where you failover to a new node, and suddenly your catalog is read only
- ie subsequent updates are not processed. With update index at
scheduled intervals this problem can be avoided.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Jean-Marc Pugin" <jmpugin@.mobileworkers.com> wrote in message
news:Owl82rc3EHA.2804@.TK2MSFTNGP15.phx.gbl...
Hi,
I am searching concrete feedback on SQL Server 2000 SP3 Server
that have in place FTS catalog population with the following options:
- CHANGE TRACKING
- SCHEDULE
Many thanks.
|||It is. Right click on your table, select Full Text Index Table, select change tracking, then right click on your table again, and Full Text Index Table, and schedules. Select New Table Schedule, Update Index, Reoccuring, occurs every 1 hour, and then fill in 2 for the starting time and 3 for the ending time.
This will do a single update index of all the changes tracked for the entire day.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Jean-Marc Pugin" <jmpugin@.mobileworkers.com> wrote in message news:eMOncPf3EHA.1396@.tk2msftngp13.phx.gbl...
Hi,
I have seen that during schedule definition you can define the starting hour.
Is it possible to define a Time Interval during which catalog update will occur i.e. only from 2 to 3 AM.
It is because on a Production Server those heavy computations are better achieved during batch windows.
Thanks
From: Hilary Cotter [mailto:hilary.cotter@.gmail.com]
Posted At: jeudi 9 dcembre 2004 13:46
Posted To: microsoft.public.sqlserver.fulltext
Conversation: Feedback on CHANGE TRACKING with SCHEDULE
Subject: Re: Feedback on CHANGE TRACKING with SCHEDULE
Change tracking with update index in background will continually poll the tables which you are full text indexing and index changes.
Some business requirements require that you update the index at discrete intervals; ie once a minute, hour, day. There are normally two reasons for this 1) performance, 2) recovery.
You may get better performance on heavily updated tables by scheduling the indexing of the changes. For recovery, sometimes you need to synchronize your catalog updates with backups, transaction log dumps etc. There have also been problems with clustering and change tracking, where you failover to a new node, and suddenly your catalog is read only - ie subsequent updates are not processed. With update index at scheduled intervals this problem can be avoided.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Jean-Marc Pugin" <jmpugin@.mobileworkers.com> wrote in message news:Owl82rc3EHA.2804@.TK2MSFTNGP15.phx.gbl...
Hi,
I am searching concrete feedback on SQL Server 2000 SP3 Server
that have in place FTS catalog population with the following options:
- CHANGE TRACKING
- SCHEDULE
Many thanks.
Monday, March 12, 2012
Fastest way to locate overlapping time blocks
overlapping time blocks. I've tried various things, but i am a c# guy,
and sql is not my strongest suit.
create table TimeBlocks
(
TimeBlockStartsAt datetime
TimeBlockEndsAt datetime
)
I want to find a condition where one row overlaps another one
(time-wise). I've tried looping through rows and comparing one by one,
but the table contains millions of rows and the procedure is slow.
Thanks.Try:
select
*
from
TimeBlocks t1
join
TimeBlocks t2 on (t1.TimeBlockStartsAt <= t2.TimeBlockStartsAt
and t1.TimeBlockEndsAt >= t2.TimeBlockStartsAt)
Also, create a clustered index on (TimeBlockStartsAt, TimeBlockStartsAt).
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"Frank Rizzo" <none@.none.com> wrote in message
news:OQbUlSuyGHA.3464@.TK2MSFTNGP03.phx.gbl...
Hello, I am searching for an absolutely fastest SQL to locate
overlapping time blocks. I've tried various things, but i am a c# guy,
and sql is not my strongest suit.
create table TimeBlocks
(
TimeBlockStartsAt datetime
TimeBlockEndsAt datetime
)
I want to find a condition where one row overlaps another one
(time-wise). I've tried looping through rows and comparing one by one,
but the table contains millions of rows and the procedure is slow.
Thanks.|||Tom Moreau wrote:
> Try:
> select
> *
> from
> TimeBlocks t1
> join
> TimeBlocks t2 on (t1.TimeBlockStartsAt <= t2.TimeBlockStartsA
t
> and t1.TimeBlockEndsAt >= t2.TimeBlockStartsAt)
> Also, create a clustered index on (TimeBlockStartsAt, TimeBlockStartsAt).
>
Thanks, Tom. I've tried this (with a clustered index), but it is too
slow for the amount of records I have. Not sure whether SQL can come up
with something faster. I think I am gonna have to come with a
completely alternative solution for this problem.|||What might help is to have a primary key, perhaps an identity. Then you can
use nonclustered indexes on the time columns. Also, experiment with adding
a nonclustered on each time column, as well as on both columns together.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"Frank Rizzo" <none@.none.com> wrote in message
news:%234q$mxuyGHA.4932@.TK2MSFTNGP02.phx.gbl...
Tom Moreau wrote:
> Try:
> select
> *
> from
> TimeBlocks t1
> join
> TimeBlocks t2 on (t1.TimeBlockStartsAt <=
> t2.TimeBlockStartsAt
> and t1.TimeBlockEndsAt >= t2.TimeBlockStartsAt)
> Also, create a clustered index on (TimeBlockStartsAt, TimeBlockStartsAt).
>
Thanks, Tom. I've tried this (with a clustered index), but it is too
slow for the amount of records I have. Not sure whether SQL can come up
with something faster. I think I am gonna have to come with a
completely alternative solution for this problem.|||On Mon, 28 Aug 2006 14:53:29 -0700, Frank Rizzo <none@.none.com> wrote:
>Thanks, Tom. I've tried this (with a clustered index), but it is too
>slow for the amount of records I have. Not sure whether SQL can come up
>with something faster. I think I am gonna have to come with a
>completely alternative solution for this problem.
Is that what you want, a list out of your zillion rows of which have
overlaps, or will you have a fixed interval you want to search for?
I've done a little of this (more second case), and it is likely to be
slow (esp the first case), even when you're all indexed.
Might do a little better if the first test is t1.timeblockstartsat is
between x and y, if your intervals are typically short you can compute
reasonable x and y as start-i and start+i.
J.|||JXStern wrote:
> On Mon, 28 Aug 2006 14:53:29 -0700, Frank Rizzo <none@.none.com> wrote:
> Is that what you want, a list out of your zillion rows of which have
> overlaps, or will you have a fixed interval you want to search for?
> I've done a little of this (more second case), and it is likely to be
> slow (esp the first case), even when you're all indexed.
> Might do a little better if the first test is t1.timeblockstartsat is
> between x and y, if your intervals are typically short you can compute
> reasonable x and y as start-i and start+i.
Thanks, that's what I found. I think I'll have to change gears and
record more information when I enter the row (e.g. check whether it
overlaps then) and mark a field or something to that effect.
Fastest way to locate overlapping time blocks
overlapping time blocks. I've tried various things, but i am a c# guy,
and sql is not my strongest suit.
create table TimeBlocks
(
TimeBlockStartsAt datetime
TimeBlockEndsAt datetime
)
I want to find a condition where one row overlaps another one
(time-wise). I've tried looping through rows and comparing one by one,
but the table contains millions of rows and the procedure is slow.
Thanks.Try:
select
*
from
TimeBlocks t1
join
TimeBlocks t2 on (t1.TimeBlockStartsAt <= t2.TimeBlockStartsAt
and t1.TimeBlockEndsAt >= t2.TimeBlockStartsAt)
Also, create a clustered index on (TimeBlockStartsAt, TimeBlockStartsAt).
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"Frank Rizzo" <none@.none.com> wrote in message
news:OQbUlSuyGHA.3464@.TK2MSFTNGP03.phx.gbl...
Hello, I am searching for an absolutely fastest SQL to locate
overlapping time blocks. I've tried various things, but i am a c# guy,
and sql is not my strongest suit.
create table TimeBlocks
(
TimeBlockStartsAt datetime
TimeBlockEndsAt datetime
)
I want to find a condition where one row overlaps another one
(time-wise). I've tried looping through rows and comparing one by one,
but the table contains millions of rows and the procedure is slow.
Thanks.|||Tom Moreau wrote:
> Try:
> select
> *
> from
> TimeBlocks t1
> join
> TimeBlocks t2 on (t1.TimeBlockStartsAt <= t2.TimeBlockStartsAt
> and t1.TimeBlockEndsAt >= t2.TimeBlockStartsAt)
> Also, create a clustered index on (TimeBlockStartsAt, TimeBlockStartsAt).
>
Thanks, Tom. I've tried this (with a clustered index), but it is too
slow for the amount of records I have. Not sure whether SQL can come up
with something faster. I think I am gonna have to come with a
completely alternative solution for this problem.|||What might help is to have a primary key, perhaps an identity. Then you can
use nonclustered indexes on the time columns. Also, experiment with adding
a nonclustered on each time column, as well as on both columns together.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"Frank Rizzo" <none@.none.com> wrote in message
news:%234q$mxuyGHA.4932@.TK2MSFTNGP02.phx.gbl...
Tom Moreau wrote:
> Try:
> select
> *
> from
> TimeBlocks t1
> join
> TimeBlocks t2 on (t1.TimeBlockStartsAt <=> t2.TimeBlockStartsAt
> and t1.TimeBlockEndsAt >= t2.TimeBlockStartsAt)
> Also, create a clustered index on (TimeBlockStartsAt, TimeBlockStartsAt).
>
Thanks, Tom. I've tried this (with a clustered index), but it is too
slow for the amount of records I have. Not sure whether SQL can come up
with something faster. I think I am gonna have to come with a
completely alternative solution for this problem.|||On Mon, 28 Aug 2006 14:53:29 -0700, Frank Rizzo <none@.none.com> wrote:
>> select
>> *
>> from
>> TimeBlocks t1
>> join
>> TimeBlocks t2 on (t1.TimeBlockStartsAt <= t2.TimeBlockStartsAt
>> and t1.TimeBlockEndsAt >= t2.TimeBlockStartsAt)
>> Also, create a clustered index on (TimeBlockStartsAt, TimeBlockStartsAt).
>Thanks, Tom. I've tried this (with a clustered index), but it is too
>slow for the amount of records I have. Not sure whether SQL can come up
>with something faster. I think I am gonna have to come with a
>completely alternative solution for this problem.
Is that what you want, a list out of your zillion rows of which have
overlaps, or will you have a fixed interval you want to search for?
I've done a little of this (more second case), and it is likely to be
slow (esp the first case), even when you're all indexed.
Might do a little better if the first test is t1.timeblockstartsat is
between x and y, if your intervals are typically short you can compute
reasonable x and y as start-i and start+i.
J.|||JXStern wrote:
> On Mon, 28 Aug 2006 14:53:29 -0700, Frank Rizzo <none@.none.com> wrote:
>> select
>> *
>> from
>> TimeBlocks t1
>> join
>> TimeBlocks t2 on (t1.TimeBlockStartsAt <= t2.TimeBlockStartsAt
>> and t1.TimeBlockEndsAt >= t2.TimeBlockStartsAt)
>> Also, create a clustered index on (TimeBlockStartsAt, TimeBlockStartsAt).
>> Thanks, Tom. I've tried this (with a clustered index), but it is too
>> slow for the amount of records I have. Not sure whether SQL can come up
>> with something faster. I think I am gonna have to come with a
>> completely alternative solution for this problem.
> Is that what you want, a list out of your zillion rows of which have
> overlaps, or will you have a fixed interval you want to search for?
> I've done a little of this (more second case), and it is likely to be
> slow (esp the first case), even when you're all indexed.
> Might do a little better if the first test is t1.timeblockstartsat is
> between x and y, if your intervals are typically short you can compute
> reasonable x and y as start-i and start+i.
Thanks, that's what I found. I think I'll have to change gears and
record more information when I enter the row (e.g. check whether it
overlaps then) and mark a field or something to that effect.
Wednesday, March 7, 2012
Fast loading relational data
For example :
Table1 ( tabel1Id int identity , name varchar(255) )
Table2 ( tabel2Id int identity , table2Id , name varchar(255))
When i insert 50 records into Table1 i can't get the 50 identity fields back, to insert the related data into Table2.
I think one of the solutions could be returning a selection of Table1 joined with syslockinfo, but i have no idea how to do it.
Does anyone have an idea?
Add uniqueidentifier column to your master table.
When inserting, generate the value by newid() function and insert it alongside your 50 records. Then you can easily find all the records inserted.
|||Thank you for your reply.I also thought of that. But i also thought that it must be possible to join with syslockinfo.
|||
I would suggest that you correlate the values in the insert. So, say you have to insert an invoice and line items.
invoiceNumber
000000333
000000334
invoiceNumber product amount
000000333 widget 10
000000334 wadget 11
then the invoice insert is easy, and the line item insert is something like:
insert into invoiceLineItem (invoiceId, product, amount)
select invoiceId, product, amount
from invoice
join (select '000000333' as invoiceNumber,'widget' as product,10 as amount
union all
select '000000334','wadget',11) as newInvoiceLines
on invoice.invoiceNumber = newInvoiceLines.invoiceNumber
Of course exactly how you get the bold stuff will depend on the format of your data (like a spreadsheet, or from a user interface, XML, etc. In reality I would have expected you to have to get a productId as well.