Monday, March 26, 2012
Is it possible to have a matrix row footer?
renders (I'm simplifying somewhat to get the idea across):
Account Jan Feb Mar Apr May ..... Dec
Total
Office Supplies 100 150 200 50 100 100
1900
...
Obviously "Account" the the row group, and "Month" is the column group.
This works just fine.
What I'd like to have is have a column AFTER the Total column, that lists
some comments about the account (tied to the Account row group). For
example:
Account Jan Feb Mar Apr May ..... Dec
Total Account comments
Office Supplies 100 150 200 50 100 100
1900 Increased by 5% due to switch to new supplier
I can't figure out how to do this...can someone help?
Thanks,
C17Hi C17,
I understand that you would like to know if you can have a row footer in
the matrix of your report.
If I have misunderstood, please let me know.
I do not think that you can do this in a matrix report. You can only add
row group or column group in the existing matrix. Instead I recommend that
you modify your DataSet query text so that you can use a table for
implementing your requirements. You may refer to PIVOT statement so that
you can rotate the month values from one column to multiple columns.
You may refer to:
Using PIVOT and UNPIVOT
http://msdn2.microsoft.com/en-us/library/ms177410.aspx
Hope this helps. If you have any other questions or concerns, please feel
free to let me know.
Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@.microsoft.com.
===========================================================Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================|||On Mar 21, 3:31=A0pm, "C17" <c...@.community.nospam> wrote:
> I have a fairly standard matrix on my report, that looks like this when it=
> renders (I'm simplifying somewhat to get the idea across):
> =A0 =A0 Account =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Jan =A0 =A0 =A0Feb =A0 =A0 ==A0Mar =A0 =A0 Apr =A0 =A0 May ..... Dec
> Total
> =A0 =A0 Office Supplies =A0 =A0 =A0100 =A0 =A0 150 =A0 =A0 =A0200 =A0 =A0 ==A0 50 =A0 =A0 =A0100 =A0 =A0 =A0 =A0100
> 1900
> =A0 =A0 ...
> Obviously "Account" the the row group, and "Month" is the column group.
> This works just fine.
> What I'd like to have is have a column AFTER the Total column, that lists
> some comments about the account (tied to the Account row group). =A0For
> example:
> =A0 =A0 Account =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Jan =A0 =A0 =A0Feb =A0 =A0 ==A0Mar =A0 =A0 Apr =A0 =A0 May ..... Dec
> Total =A0 =A0 =A0Account comments
> =A0 =A0 Office Supplies =A0 =A0 =A0100 =A0 =A0 150 =A0 =A0 =A0200 =A0 =A0 ==A0 50 =A0 =A0 =A0100 =A0 =A0 =A0 =A0100
> 1900 =A0 =A0 Increased by 5% due to switch to new supplier
> I can't figure out how to do this...can someone help?
> Thanks,
> C17
What I would do is take create a dataset that is a Union of your Data
+ Comments, differentiated by a Group field, then create a Matrix with
the Group field as a Column group, then conditionally hide the
SubTotal on the Comment group.
In english, make a data set that is:
DataType, Account, Month, Amount, Comment
'Amount', 'Office Supplies', #1/1/2007#, 100, Nothing
'Amount', 'Office Supplies', #2/1/2007#, 150, Nothing
'Comment', 'Office Supplies', #1/1/2007#, Nothing, 'Increased by 5%
due to switch to new supplier'
=2E..
The Matrix would be
Column Group1: =3DFields!DataType.Value, Sort Ascending
Column Group2: =3DFields!Month.Value, Sort Ascending
Turn on Column Subtotal2
Maybe add a conditional Hide if InScope(Group2) And Fields!
Group1.Value =3D 'Comment'
Row Group: Account
Details Expression: =3DIIF( First(Fields!DataType.Value) =3D 'Amount',
Sum( Fields!Amount.Value ), First( Fields!Comment.Value ) )
Since I'm not in a Dev environment at the moment, I can't test this,
but you may have to play with the data types to get things to work.
-- Scott
Monday, March 12, 2012
Is it possible pass to procedure open cursor from other procedure
consistently show that you missed the whole idea of a declarative,
set-oriented language. I put in a chapter on "Thinking in Sets" in my
new book because of this problem. It gets a little Zen, but it is
important. See the forest and not the trees. Use the right words so
your mind will have the right concepts (rows are not records, etc.).
Example: I have a bag of pennies and I want to know the value of the
bag
Procedural solution: count the pennies one at a time (i.e. cursor).
This sucks when you have $1 million dollars
SQL solution: Weigh the bag as a whole unit in itself, divide by the
weight of a single penny. Scales to large amoutns of data quickly.
It takes about a year or more of programming in SQL to make the shift.
Do not XXXXX aobut that; it takes six years to beocme a Union
Journeyman Carpenter in New York State and their incompetence cannot
kill near or miam as many people as a bad database.
Right now, you are writing code that is 1,2 or 3 orders of magnitude
slower than it should be and you probably have little or no data
integrity in your schemas. In short, you are very dangerous right now.Thanks, where can i got your book ?
Message posted via http://www.webservertalk.com|||u r very helpfull
Message posted via http://www.webservertalk.com
Friday, March 9, 2012
is it good idea to replicate sql server db files?
I am wondering if it is a good idea to replicate sql server db files
using frs.
I don't really know how the frs works, so
does frs replicates the whole database from time to time or just the
portion that is changed?
Also if the db is expected to change very often, and wouldn't it make
the whole system down?
I wonder if it's a good idea just to make a backup of the database and
copy it.
What's the usual practice?[posted and mailed, please reply in news]
jaekim (jkim65@.socal.rr.com) writes:
> I am wondering if it is a good idea to replicate sql server db files
> using frs.
> I don't really know how the frs works, so
> does frs replicates the whole database from time to time or just the
> portion that is changed?
> Also if the db is expected to change very often, and wouldn't it make
> the whole system down?
> I wonder if it's a good idea just to make a backup of the database and
> copy it.
> What's the usual practice?
I'm uncertain of what your question actually is, and whatever I have never
heard of frs.
You talk about replication, but your question seems to be about backup.
Replication and backup are two quite different things.
To backup a database, you use the BACKUP command in T-SQL. There are three
ways to back up a database:
* Full backup, backup the entire database.
* Differential backup, back up the changes since the last full backup.
* Log backup, backs up the *transaction log*.
Normally you use both Full backup and Log backup. By backing up the
transaction log, you can get up-to-the-minute recovery in case of a
crash (which could be a fatal human error).
To be able to backup the transaction log you must run in Full or Bulk-logged
recovery mode. On the other hand, if you run in these modes, you must
backup the transaction log, or the log will eventually fill your disk.
It is important to understand that SQL's BACKUP command knows about
transactions, and thus you can backup the database while there is
activity in it. If you would just copy the database files outside SQL
Server, you might get a useless set of bytes on the tape.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"jaekim" <jkim65@.socal.rr.com> wrote in message
news:91d0d16b.0407040210.7116f55d@.posting.google.c om...
> Hi.
> I am wondering if it is a good idea to replicate sql server db files
> using frs.
> I don't really know how the frs works, so
> does frs replicates the whole database from time to time or just the
> portion that is changed?
> Also if the db is expected to change very often, and wouldn't it make
> the whole system down?
> I wonder if it's a good idea just to make a backup of the database and
> copy it.
I would NOT trust FRS to replicate my database.
Either as Erland suggests use BACKUP and RESTORE (look up log-shipping) or
use SQL Server's replication.
> What's the usual practice?|||On Sun, 4 Jul 2004 12:51:28 +0000 (UTC), Erland Sommarskog wrote:
> I'm uncertain of what your question actually is, and whatever I have never
> heard of frs.
> You talk about replication, but your question seems to be about backup.
> Replication and backup are two quite different things.
FRS refers to File Replication Service, provided by Windows 2000 Server and
Windows Server 2003. It basically does the same thing as rsync: copy file
changes from one server to another on a scheduled basis.
Some details:
http://www.microsoft.com/windows200...dh_frs_ncpi.asp
Your recommendations are of course correct: Database replication is best
handled by the database server, not the filesystem.
Wednesday, March 7, 2012
Is it a good idea to use SQL2005 MDF for audit, exception tracking
I am writing a web application that uses a Teradata database as the primary data source. While Teradata is great as a data warehouse and managing Terabytes of information it doesn't do as well when update or inserting. I was thinking of using a local SQL2005 MDF file to hold a few reference tables and an audit table to collect usage information and exception database to capture any errors.
There could be a few thousand users of the web application but no more than a couple hundred at a time.
I just trying to get some opinions on these technique. I am open to all comments and suggestions.
Thank You
Hi John,
If you're using the SQL Server as the auditing database and exception tracking, I think it will be fine.
Although there will be hundreds of connections to the main app, the exception will not be much and audit data size will not be huge then. Just connect the audit and exception handling module to your SQL Server database, and it will be OK.
HTH. If this does not answer you question, please feel free to mark it as Not Answered and post your reply. Thanks!
|||Kevin
Thank you. I'm wondering if it is acceptable practice to run SQL Server 2005 express rather than installing a full SQL Server 2005 on the Advanced Server for doing the Audit tracking and exception reporting. The MDF file should never reach the 4GB limit of Express. Thank you again for your answer.
Is it a good idea to use management studio to manage SQL 2000?
Yes , you can but I have my doubt that it is a good /efficient/wise
practice.
Why not just to upgrade to SQL Server 2005 and use SSMS?
"Maxwell2006" <alanalan@.newsgroup.nospam> wrote in message
news:%23obaw7$UGHA.5808@.TK2MSFTNGP12.phx.gbl...
> Thank you, Max
>
|||I use management studio to manage both 2000 and 2005 servers. The reason
being that we only have 2005 in test environments at the moment (awaiting the
first service pack before production), and because I am used to the
Management Studio now, I would rather have everything in one place and in one
tool.
'Just upgrading your servers to 2005' isnt really that quick and easy when
you have management and politics involved. And there are some
incompatibilities between 2000 and 2005 that you need to resolve, such as the
use of table hints (ie, in 2000 you dont need the WITH clause in a SELECT
statement. In 2005, you need to specifiy WITH).
Andy Price,
Sr. Database Administrator,
MCDBA 2003
"Maxwell2006" wrote:
> Thank you, Max
>
>
|||Maxwell2006 wrote:
> Thank you, Max
>
I've also been using SSMS for several months for managing both SQL2000
and SQL2005 and I haven't seen any problems. This biggest issue I can
think of right now, is that you can't use SSMS to edit/design DTS packages.
Regards
Steen
Is it a good idea to use management studio to manage SQL 2000?
practice.
Why not just to upgrade to SQL Server 2005 and use SSMS?
"Maxwell2006" <alanalan@.newsgroup.nospam> wrote in message
news:%23obaw7$UGHA.5808@.TK2MSFTNGP12.phx.gbl...
> Thank you, Max
>|||I use management studio to manage both 2000 and 2005 servers. The reason
being that we only have 2005 in test environments at the moment (awaiting th
e
first service pack before production), and because I am used to the
Management Studio now, I would rather have everything in one place and in on
e
tool.
'Just upgrading your servers to 2005' isnt really that quick and easy when
you have management and politics involved. And there are some
incompatibilities between 2000 and 2005 that you need to resolve, such as th
e
use of table hints (ie, in 2000 you dont need the WITH clause in a SELECT
statement. In 2005, you need to specifiy WITH).
Andy Price,
Sr. Database Administrator,
MCDBA 2003
"Maxwell2006" wrote:
> Thank you, Max
>
>|||Maxwell2006 wrote:
> Thank you, Max
>
I've also been using SSMS for several months for managing both SQL2000
and SQL2005 and I haven't seen any problems. This biggest issue I can
think of right now, is that you can't use SSMS to edit/design DTS packages.
Regards
Steen
Is it a good idea to use management studio to manage SQL 2000?
practice.
Why not just to upgrade to SQL Server 2005 and use SSMS?
"Maxwell2006" <alanalan@.newsgroup.nospam> wrote in message
news:%23obaw7$UGHA.5808@.TK2MSFTNGP12.phx.gbl...
> Thank you, Max
>|||I use management studio to manage both 2000 and 2005 servers. The reason
being that we only have 2005 in test environments at the moment (awaiting the
first service pack before production), and because I am used to the
Management Studio now, I would rather have everything in one place and in one
tool.
'Just upgrading your servers to 2005' isnt really that quick and easy when
you have management and politics involved. And there are some
incompatibilities between 2000 and 2005 that you need to resolve, such as the
use of table hints (ie, in 2000 you dont need the WITH clause in a SELECT
statement. In 2005, you need to specifiy WITH).
Andy Price,
Sr. Database Administrator,
MCDBA 2003
"Maxwell2006" wrote:
> Thank you, Max
>
>|||Maxwell2006 wrote:
> Thank you, Max
>
I've also been using SSMS for several months for managing both SQL2000
and SQL2005 and I haven't seen any problems. This biggest issue I can
think of right now, is that you can't use SSMS to edit/design DTS packages.
Regards
Steen
is it a good idea to keep sql server with mail server on single T1
I just wanted to know is it a good idea to keep both mail and databse server
on same T1.if yes then plz tell me why.
Waiting for yr help.if you could have any documentation on this plz let me
know.
Thanks in advance for yr help.
Bharat.Hi Bharat
This depends on what you are doing with the mail, for instance if you are
using SQL Mail or SMTP.
Having the the mail server or a relay nearby will help reduce the time it
takes to send the mail, which would be very important if you are sending
synchronous emails for instance (for example if in some fit of madness you
decided to send emails from within triggers).
I have not seen any documentation on this but the advice gained by
experience has been posted in the past by others.
John
"bharat" <bharat@.discussions.microsoft.com> wrote in message
news:AECB5C4E-1EEA-479C-B247-291017A552DA@.microsoft.com...
> hello everyone!!!!!!!!
> I just wanted to know is it a good idea to keep both mail and databse
> server
> on same T1.if yes then plz tell me why.
> Waiting for yr help.if you could have any documentation on this plz let me
> know.
> Thanks in advance for yr help.
>
> Bharat.|||bharat wrote:
> hello everyone!!!!!!!!
> I just wanted to know is it a good idea to keep both mail and databse server
> on same T1.if yes then plz tell me why.
For most serious production systems it is a bad idea to have them on the
same machine there is just too much coupling / dependency - performance
wise as well as liveness wise.
> Waiting for yr help.if you could have any documentation on this plz let me
> know.
You don't really need documentation - just think a bit about it for a
moment.
Kind regards
robert|||No --I feel
why? It depends
.How busy you database server is? OLTP or DSS
.Number of User's(concurrent user's) expected on database
.Hardware consideration can be one aspect to look in to
If u have Multiple CPU machine/server with gig's og memory enough to
suffice SQL Server requirement.go ahead u can have Mail on the same machine
Thanks
"bharat" wrote:
> hello everyone!!!!!!!!
> I just wanted to know is it a good idea to keep both mail and databse server
> on same T1.if yes then plz tell me why.
> Waiting for yr help.if you could have any documentation on this plz let me
> know.
> Thanks in advance for yr help.
>
> Bharat.
is it a good idea to keep sql server with mail server on single T1
I just wanted to know is it a good idea to keep both mail and databse server
on same T1.if yes then plz tell me why.
Waiting for yr help.if you could have any documentation on this plz let me
know.
Thanks in advance for yr help.
Bharat.Hi Bharat
This depends on what you are doing with the mail, for instance if you are
using SQL Mail or SMTP.
Having the the mail server or a relay nearby will help reduce the time it
takes to send the mail, which would be very important if you are sending
synchronous emails for instance (for example if in some fit of madness you
decided to send emails from within triggers).
I have not seen any documentation on this but the advice gained by
experience has been posted in the past by others.
John
"bharat" <bharat@.discussions.microsoft.com> wrote in message
news:AECB5C4E-1EEA-479C-B247-291017A552DA@.microsoft.com...
> hello everyone!!!!!!!!
> I just wanted to know is it a good idea to keep both mail and databse
> server
> on same T1.if yes then plz tell me why.
> Waiting for yr help.if you could have any documentation on this plz let me
> know.
> Thanks in advance for yr help.
>
> Bharat.|||No --I feel
why? It depends
.How busy you database server is? OLTP or DSS
.Number of User's(concurrent user's) expected on database
.Hardware consideration can be one aspect to look in to
If u have Multiple CPU machine/server with gig's og memory enough to
suffice SQL Server requirement.go ahead u can have Mail on the same machine
Thanks
"bharat" wrote:
> hello everyone!!!!!!!!
> I just wanted to know is it a good idea to keep both mail and databse serv
er
> on same T1.if yes then plz tell me why.
> Waiting for yr help.if you could have any documentation on this plz let me
> know.
> Thanks in advance for yr help.
>
> Bharat.