Friday, March 30, 2012
how to simplify what i'm doing (AS the solution?)
percentages of total count divided by counts based on different
subquery where values.
a la ...
select 100 * (totalCount/ (select count where columnA value is x) as
partialCount1) as perc1,
100 * (totalCount/ (select count where columnA value is y) as
partialCount2) as perc2
etc
from myTable where (..bunch of where stuff..)
I have simplified the above example just for brevity here.
So, I hate these kinds of nested queries - and they get incredibly
complex to read. I could break them up into longer scripts to simplify
- but I am wondering if there's another way.
The data I am using is from a warehouse on SQL 2005. I have very little
experience with warehouses - and know little about analysis services
and OLAP.
My question is whether it is possible to use Analysis services to
create new tables that make this data far easier to query? That's the
path I am considering venturing down, but I don't want to hit a dead
end... and need just to know if this makes sense. That is to use
Analysis services to crunch out some new tables from the tables I am
using which would have the results neatly packaged in a table or 2 that
is fast and simple to query. Is that the idea of AS?
thx for helping a learner here. let me know if i am making enough sense
in the question.
Hi
This looks like you are trying to do a pivot, in which case the best
solutions will be at the front end although with SQL 2005 you have the new
pivot function, check out the topic "Using PIVOT and UNPIVOT " in books
online.
John
<rsphere@.gmail.com> wrote in message
news:1137856740.675188.233050@.g49g2000cwa.googlegr oups.com...
>i need to do create reports that perform queries where the results are
> percentages of total count divided by counts based on different
> subquery where values.
> a la ...
> select 100 * (totalCount/ (select count where columnA value is x) as
> partialCount1) as perc1,
> 100 * (totalCount/ (select count where columnA value is y) as
> partialCount2) as perc2
> etc
> from myTable where (..bunch of where stuff..)
> I have simplified the above example just for brevity here.
> So, I hate these kinds of nested queries - and they get incredibly
> complex to read. I could break them up into longer scripts to simplify
> - but I am wondering if there's another way.
> The data I am using is from a warehouse on SQL 2005. I have very little
> experience with warehouses - and know little about analysis services
> and OLAP.
> My question is whether it is possible to use Analysis services to
> create new tables that make this data far easier to query? That's the
> path I am considering venturing down, but I don't want to hit a dead
> end... and need just to know if this makes sense. That is to use
> Analysis services to crunch out some new tables from the tables I am
> using which would have the results neatly packaged in a table or 2 that
> is fast and simple to query. Is that the idea of AS?
> thx for helping a learner here. let me know if i am making enough sense
> in the question.
>
how to simplify what i'm doing (AS the solution?)
percentages of total count divided by counts based on different
subquery where values.
a la ...
select 100 * (totalCount/ (select count where columnA value is x) as
partialCount1) as perc1,
100 * (totalCount/ (select count where columnA value is y) as
partialCount2) as perc2
etc
from myTable where (..bunch of where stuff..)
I have simplified the above example just for brevity here.
So, I hate these kinds of nested queries - and they get incredibly
complex to read. I could break them up into longer scripts to simplify
- but I am wondering if there's another way.
The data I am using is from a warehouse on SQL 2005. I have very little
experience with warehouses - and know little about analysis services
and OLAP.
My question is whether it is possible to use Analysis services to
create new tables that make this data far easier to query? That's the
path I am considering venturing down, but I don't want to hit a dead
end... and need just to know if this makes sense. That is to use
Analysis services to crunch out some new tables from the tables I am
using which would have the results neatly packaged in a table or 2 that
is fast and simple to query. Is that the idea of AS?
thx for helping a learner here. let me know if i am making enough sense
in the question.Hi
This looks like you are trying to do a pivot, in which case the best
solutions will be at the front end although with SQL 2005 you have the new
pivot function, check out the topic "Using PIVOT and UNPIVOT " in books
online.
John
<rsphere@.gmail.com> wrote in message
news:1137856740.675188.233050@.g49g2000cwa.googlegroups.com...
>i need to do create reports that perform queries where the results are
> percentages of total count divided by counts based on different
> subquery where values.
> a la ...
> select 100 * (totalCount/ (select count where columnA value is x) as
> partialCount1) as perc1,
> 100 * (totalCount/ (select count where columnA value is y) as
> partialCount2) as perc2
> etc
> from myTable where (..bunch of where stuff..)
> I have simplified the above example just for brevity here.
> So, I hate these kinds of nested queries - and they get incredibly
> complex to read. I could break them up into longer scripts to simplify
> - but I am wondering if there's another way.
> The data I am using is from a warehouse on SQL 2005. I have very little
> experience with warehouses - and know little about analysis services
> and OLAP.
> My question is whether it is possible to use Analysis services to
> create new tables that make this data far easier to query? That's the
> path I am considering venturing down, but I don't want to hit a dead
> end... and need just to know if this makes sense. That is to use
> Analysis services to crunch out some new tables from the tables I am
> using which would have the results neatly packaged in a table or 2 that
> is fast and simple to query. Is that the idea of AS?
> thx for helping a learner here. let me know if i am making enough sense
> in the question.
>
how to simplify what i'm doing (AS the solution?)
percentages of total count divided by counts based on different
subquery where values.
a la ...
select 100 * (totalCount/ (select count where columnA value is x) as
partialCount1) as perc1,
100 * (totalCount/ (select count where columnA value is y) as
partialCount2) as perc2
etc
from myTable where (..bunch of where stuff..)
I have simplified the above example just for brevity here.
So, I hate these kinds of nested queries - and they get incredibly
complex to read. I could break them up into longer scripts to simplify
- but I am wondering if there's another way.
The data I am using is from a warehouse on SQL 2005. I have very little
experience with warehouses - and know little about analysis services
and OLAP.
My question is whether it is possible to use Analysis services to
create new tables that make this data far easier to query? That's the
path I am considering venturing down, but I don't want to hit a dead
end... and need just to know if this makes sense. That is to use
Analysis services to crunch out some new tables from the tables I am
using which would have the results neatly packaged in a table or 2 that
is fast and simple to query. Is that the idea of AS?
thx for helping a learner here. let me know if i am making enough sense
in the question.Hi
This looks like you are trying to do a pivot, in which case the best
solutions will be at the front end although with SQL 2005 you have the new
pivot function, check out the topic "Using PIVOT and UNPIVOT " in books
online.
John
<rsphere@.gmail.com> wrote in message
news:1137856740.675188.233050@.g49g2000cwa.googlegroups.com...
>i need to do create reports that perform queries where the results are
> percentages of total count divided by counts based on different
> subquery where values.
> a la ...
> select 100 * (totalCount/ (select count where columnA value is x) as
> partialCount1) as perc1,
> 100 * (totalCount/ (select count where columnA value is y) as
> partialCount2) as perc2
> etc
> from myTable where (..bunch of where stuff..)
> I have simplified the above example just for brevity here.
> So, I hate these kinds of nested queries - and they get incredibly
> complex to read. I could break them up into longer scripts to simplify
> - but I am wondering if there's another way.
> The data I am using is from a warehouse on SQL 2005. I have very little
> experience with warehouses - and know little about analysis services
> and OLAP.
> My question is whether it is possible to use Analysis services to
> create new tables that make this data far easier to query? That's the
> path I am considering venturing down, but I don't want to hit a dead
> end... and need just to know if this makes sense. That is to use
> Analysis services to crunch out some new tables from the tables I am
> using which would have the results neatly packaged in a table or 2 that
> is fast and simple to query. Is that the idea of AS?
> thx for helping a learner here. let me know if i am making enough sense
> in the question.
>
Monday, March 26, 2012
how to share variables across packages?
I'm working on a solution in Visual Studio that has 3 SSIS packages, and now I want to add a 4th that needs access to variables defined in one of the other packages. How can I do that?
One way would be to dump out your variables and values to a raw file or db if you prefer. Then any other process from any execution context can access them anytime via a "source connection" to that file...
|||
Kevin,
Have you looked at package configurations at all. You could set parameter values from a table or a parent package variable.
Rafael Salas
|||Rafael Salas wrote:
Have you looked at package configurations at all. You could set parameter values from a table or a parent package variable.
Yes, I intend to set my variables externally, via package configurations. But I don't know what a "parameter" is or how it differs from a variable. And I don't know how to allow my variables scoped to package X to be accessed by package Y -- how do I make package X to be a parent of package Y?
|||Sorry I meant variable...not parameter.
In short, to make X parent of Y; you can use a Execute Package Task (control Flow) in X that would call package Y.
Rafael Salas
How to 'share drive', SCSI HD's on servers
Windows Catalog for use on a cluster, but it's more than
just getting disks. How you carve them up is just as
important, because, for example, if you create one LUN but
plan to put multiple drives on it, that won't work.
You need to plan your disk layout carefully.
I am sorry for my lack of understanding here, but let's say if I have two
"regular" Compaq ML370, can I just add two more disks on each server and
let's say create a Raid1 and use that as the 'quorum' ? I've seen the list
of devices Rod listed OK, but I still don't understand how to configure the
disks on my servers to be used in a cluster (assume they are part of the MS
HCL).
"Allan Hirt" <anonymous@.discussions.microsoft.com> wrote in message
news:575601c47470$953e6530$a601280a@.phx.gbl...
> Rodney is correct, your SAN or DAS solution must be in the
> Windows Catalog for use on a cluster, but it's more than
> just getting disks. How you carve them up is just as
> important, because, for example, if you create one LUN but
> plan to put multiple drives on it, that won't work.
> You need to plan your disk layout carefully.
|||I think you need to read this
http://www.microsoft.com/downloads/d...displaylang=en
its a step by step guide on cluster installations

Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
"Marlon Brown" <marlon_brown@.hotmail.com> wrote in message
news:OaEfxULdEHA.3916@.TK2MSFTNGP11.phx.gbl...
> I am sorry for my lack of understanding here, but let's say if I have two
> "regular" Compaq ML370, can I just add two more disks on each server and
> let's say create a Raid1 and use that as the 'quorum' ? I've seen the
list
> of devices Rod listed OK, but I still don't understand how to configure
the
> disks on my servers to be used in a cluster (assume they are part of the
MS
> HCL).
>
> "Allan Hirt" <anonymous@.discussions.microsoft.com> wrote in message
> news:575601c47470$953e6530$a601280a@.phx.gbl...
>
|||(...)
Actually it is what I didn't understand: From the text below I had the
impresson that "external disk storage unit connected to all computers" I
still can't see how my regular SCSI disks existing on both Compaq servers
can be configured as shared disks. It also says that the controller cannot
be the one used by the system drive...
Shared Disk Requirements:
An HCL-approved external disk storage unit connected to all
computers. This will be used as the clustered shared disk. Some type of a
hardware redundant array of independent disks (RAID) is recommended.
All shared disks, including the quorum disk, must be physically
attached to a shared bus.
Note: The requirement above does not hold true for Majority Node Set (MNS)
clusters, which are not covered in this guide.
Shared disks must be on a different controller then the one used
by the system drive.
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:uzdl$BMdEHA.384@.TK2MSFTNGP10.phx.gbl...
> I think you need to read this
>
http://www.microsoft.com/downloads/d...displaylang=en[vbcol=seagreen]
> its a step by step guide on cluster installations

> Cheers,
> Rod
> MVP - Windows Server - Clustering
> http://www.nw-america.com - Clustering
> "Marlon Brown" <marlon_brown@.hotmail.com> wrote in message
> news:OaEfxULdEHA.3916@.TK2MSFTNGP11.phx.gbl...
two
> list
> the
> MS
>
|||Marlon, you have all the facts already. You need to buy or use an external
storage, on a different controller.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
"Marlon Brown" <marlon_brown@.hotmail.com> wrote in message
news:uhsppKOdEHA.1652@.TK2MSFTNGP09.phx.gbl...
> (...)
> Actually it is what I didn't understand: From the text below I had the
> impresson that "external disk storage unit connected to all computers" I
> still can't see how my regular SCSI disks existing on both Compaq servers
> can be configured as shared disks. It also says that the controller cannot
> be the one used by the system drive...
>
> Shared Disk Requirements:
> An HCL-approved external disk storage unit connected to all
> computers. This will be used as the clustered shared disk. Some type of a
> hardware redundant array of independent disks (RAID) is recommended.
> All shared disks, including the quorum disk, must be physically
> attached to a shared bus.
> Note: The requirement above does not hold true for Majority Node Set (MNS)
> clusters, which are not covered in this guide.
> Shared disks must be on a different controller then the one used
> by the system drive.
> "Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
> message news:uzdl$BMdEHA.384@.TK2MSFTNGP10.phx.gbl...
>
http://www.microsoft.com/downloads/d...displaylang=en[vbcol=seagreen]
> two
and[vbcol=seagreen]
configure[vbcol=seagreen]
the
>
|||Marlon,
I am considering writing an entire book on disk=20
architecture/design for SQL Server, but I would also=20
suggest you look at the stuff I have in the existing SQL=20
2K HA book to understand what goes into making a cluster.
At a minimum, you need (presented at the OS level) for=20
your cluster:
* 1 quorum disk
* 1 for SQL Server (probably more; I'd say a minimum of=20
two for data and log, but it will depend on your=20
requirements)
* 1 for MS DTC (for W2K3 required, and recommended for W2K)
Each of these should reside on different physical LUNs on=20
an external drive array, whether DAS or SAN (*not* NAS. =20
The quorum LUN must not be on a disk with any other (many=20
find it a waste of space, but that's the way it is). Some=20
vendors allow you to carve up one chunk of disk, and then=20
do partitions, and that is not really what you should do.
Hope this helps.
Allan
>--Original Message--
>Marlon, you have all the facts already. You need to buy=20
or use an external[vbcol=seagreen]
>storage, on a different controller.
>Cheers,
>Rod
>MVP - Windows Server - Clustering
>http://www.nw-america.com - Clustering
>"Marlon Brown" <marlon_brown@.hotmail.com> wrote in message
>news:uhsppKOdEHA.1652@.TK2MSFTNGP09.phx.gbl...
below I had the[vbcol=seagreen]
all computers" I[vbcol=seagreen]
both Compaq servers[vbcol=seagreen]
the controller cannot[vbcol=seagreen]
connected to all[vbcol=seagreen]
disk. Some type of a[vbcol=seagreen]
recommended.[vbcol=seagreen]
must be physically[vbcol=seagreen]
Majority Node Set (MNS)[vbcol=seagreen]
controller then the one used[vbcol=seagreen]
america.com> wrote in
>http://www.microsoft.com/downloads/details.aspx?
FamilyID=3D96f76ed7-9634-4300-9159-
89638f4b4ef7&displaylang=3Den[vbcol=seagreen]
message[vbcol=seagreen]
let's say if I have[vbcol=seagreen]
disks on each server[vbcol=seagreen]
>and
the 'quorum' ? I've seen the[vbcol=seagreen]
understand how to[vbcol=seagreen]
>configure
they are part of[vbcol=seagreen]
>the
wrote in message[vbcol=seagreen]
be in the[vbcol=seagreen]
more than[vbcol=seagreen]
just as[vbcol=seagreen]
one LUN but[vbcol=seagreen]
work.
>
>.
>
Monday, March 19, 2012
How to Set Thousand Separator?
This topic has been raised a few time in the newsgroup and the solution
has been to set the 'Langauge' property of the report.
In my report, I can't find the Language propertie, neither in the
properties from he menu in VS nor in the Property Grid.
Can anyone point me in the right direction?
Thanks,
DomDom, in the properties pane (press F4 if you can't see it) there is a
drop-down list at the top where you can select objects. Use this and
choose 'Report' and in the 'Misc' properties section you'll see
Language.
If you want to default new reports to your Windows Language, you can do
Tools|Options|Environment|General|International Settings and change it
to 'Same as Office'. This affects anything you do in VS/VB though.
Chris
DominicB wrote:
> Hi,
> This topic has been raised a few time in the newsgroup and the
> solution has been to set the 'Langauge' property of the report.
> In my report, I can't find the Language propertie, neither in the
> properties from he menu in VS nor in the Property Grid.
> Can anyone point me in the right direction?
> Thanks,
> Dom|||Ace, Chris!
Cheers,
Dom
Chris McGuigan wrote:
> Dom, in the properties pane (press F4 if you can't see it) there is a
> drop-down list at the top where you can select objects. Use this and
> choose 'Report' and in the 'Misc' properties section you'll see
> Language.
> If you want to default new reports to your Windows Language, you can do
> Tools|Options|Environment|General|International Settings and change it
> to 'Same as Office'. This affects anything you do in VS/VB though.
> Chris
> DominicB wrote:
> > Hi,
> > This topic has been raised a few time in the newsgroup and the
> > solution has been to set the 'Langauge' property of the report.
> >
> > In my report, I can't find the Language propertie, neither in the
> > properties from he menu in VS nor in the Property Grid.
> >
> > Can anyone point me in the right direction?
> >
> > Thanks,
> > Dom
How to set the ReportPath for the reportviewer control
In my solution I've got 2 projects. ABCWeb is my website and ABCReports is a Report Server project.
In ABCWeb I have an aspx page that has a single reportviewer control on it which is intended to display the various reports that are in ABCReports . I am not using the Reports Server. I just simply want to set the property of the reportviewer control under LocalReport.ReportPath to the location of the report in ABCReports .
I keep getting this error no matter how I try to reference it.
what am I doing wrong
try something like this
RVcl.LocalReport.ReportPath ="ABCReports/Reports/rptNoticeOfDecision.rdl";
-remove the first /
I assume ABCreports is a sub folder of the application root