Hi, just wondering if anyone is still answering questions in this newsgroup.
I reaaally need to know if there is away to create 10 or more identical
chart without creating 10 or more separately.
i have a table which list the items sent to a couple of destinations.
i want to show the chart for each destination, but i have 30 stations
(destination), and might even add more in the future. I really don't like the
idea of creating 30 charts (btw i need 3 charts for each station).
thanks a lot, any answer will be appreciated.Hi Daniel,
Add a grouping to the table, where you group by Fields!Station.Value
Then, drop a chart in the table group header (!), and design your chart. All
rows for a specific station will be available for that chart. Essentially,
you just need to drop 3 charts in the table group header and you will get
them drawn automatically at runtime for every distinct station group.
HTH,
Robert
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Daniel" <Daniel@.discussions.microsoft.com> wrote in message
news:0C86D4E2-006A-4066-BC5B-C211D16EBF62@.microsoft.com...
> Hi, just wondering if anyone is still answering questions in this
newsgroup.
> I reaaally need to know if there is away to create 10 or more identical
> chart without creating 10 or more separately.
> i have a table which list the items sent to a couple of destinations.
> i want to show the chart for each destination, but i have 30 stations
> (destination), and might even add more in the future. I really don't like
the
> idea of creating 30 charts (btw i need 3 charts for each station).
> thanks a lot, any answer will be appreciated.|||thanks heaps for that... it's good.
"Robert Bruckner [MSFT]" wrote:
> Hi Daniel,
> Add a grouping to the table, where you group by Fields!Station.Value
> Then, drop a chart in the table group header (!), and design your chart. All
> rows for a specific station will be available for that chart. Essentially,
> you just need to drop 3 charts in the table group header and you will get
> them drawn automatically at runtime for every distinct station group.
> HTH,
> Robert
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Daniel" <Daniel@.discussions.microsoft.com> wrote in message
> news:0C86D4E2-006A-4066-BC5B-C211D16EBF62@.microsoft.com...
> > Hi, just wondering if anyone is still answering questions in this
> newsgroup.
> > I reaaally need to know if there is away to create 10 or more identical
> > chart without creating 10 or more separately.
> >
> > i have a table which list the items sent to a couple of destinations.
> > i want to show the chart for each destination, but i have 30 stations
> > (destination), and might even add more in the future. I really don't like
> the
> > idea of creating 30 charts (btw i need 3 charts for each station).
> >
> > thanks a lot, any answer will be appreciated.
>
>
Showing posts with label identical. Show all posts
Showing posts with label identical. Show all posts
Monday, March 19, 2012
Wednesday, March 7, 2012
Need a query to compare tables
I have two identical tables on two DBs, DB1.Table1 and DB2.table2. DB1.Table1 has more data than DB2.Table1. I need to find out what data in DB1.Table1 is not in DB2.Table1, but I can't do it by the ROWGUID column because not all ROWGUID values were carried over the last time the DBs were split, so identical rows may not have the same rowguid value. And I can't use the PK column because that's the Identity column which is not unique between these two tables.
What I need to do is compare the combined columns in one table (not including the Identity and rowguid columns, of course) with the same columns in the other table.
Queries are not my strong point. Does anyone know how I can do this? I'm desperate!
Thanks in advance.
JohnJohn,
Assuming that there is another unique index in addition to the PK and
ROWGUID columns, use that to manage the joins. (If there is no other unique
identifier than the two that are not reliable, then the problem becomes much
harder.) Something like:
SELECT * FROM DB1.Table1
WHERE UniqueString + CONVERT(VARCHAR(10),UniqueInt)
NOT IN
(SELECT UniqueString + CONVERT(VARCHAR(10), UniqueInt)
FROM DB2.Table1)
Russell Fields
"John Steen" <anonymous@.discussions.microsoft.com> wrote in message
news:94B4A891-E2B2-4F43-8059-E34BCD82B5C7@.microsoft.com...
> I have two identical tables on two DBs, DB1.Table1 and DB2.table2.
DB1.Table1 has more data than DB2.Table1. I need to find out what data in
DB1.Table1 is not in DB2.Table1, but I can't do it by the ROWGUID column
because not all ROWGUID values were carried over the last time the DBs were
split, so identical rows may not have the same rowguid value. And I can't
use the PK column because that's the Identity column which is not unique
between these two tables.
> What I need to do is compare the combined columns in one table (not
including the Identity and rowguid columns, of course) with the same columns
in the other table.
> Queries are not my strong point. Does anyone know how I can do this? I'm
desperate!
> Thanks in advance.
> John|||Thanks for the quick reply, Russell. Unfortunately, there's not another unique index on this table other than the ones on the Identity and ROWGUID columns. Is there a way to compare the combined values of the rest of the columns? If not, then I'll have to use the ROWGUID column and hope duplicate records aren't created.
Thanks,
John
-- Russell Fields wrote: --
John,
Assuming that there is another unique index in addition to the PK and
ROWGUID columns, use that to manage the joins. (If there is no other unique
identifier than the two that are not reliable, then the problem becomes much
harder.) Something like:
SELECT * FROM DB1.Table1
WHERE UniqueString + CONVERT(VARCHAR(10),UniqueInt)
NOT IN
(SELECT UniqueString + CONVERT(VARCHAR(10), UniqueInt)
FROM DB2.Table1)
Russell Fields
"John Steen" <anonymous@.discussions.microsoft.com> wrote in message
news:94B4A891-E2B2-4F43-8059-E34BCD82B5C7@.microsoft.com...
> I have two identical tables on two DBs, DB1.Table1 and DB2.table2.
DB1.Table1 has more data than DB2.Table1. I need to find out what data in
DB1.Table1 is not in DB2.Table1, but I can't do it by the ROWGUID column
because not all ROWGUID values were carried over the last time the DBs were
split, so identical rows may not have the same rowguid value. And I can't
use the PK column because that's the Identity column which is not unique
between these two tables.
>> What I need to do is compare the combined columns in one table (not
including the Identity and rowguid columns, of course) with the same columns
in the other table.
>> Queries are not my strong point. Does anyone know how I can do this? I'm
desperate!
>> Thanks in advance.
>> John|||John,
probably no other method than the clumsy way of comparing the whole record
in both table:
set concat_null_yields_null off
select t1.PK
from t1
left outer join t2
on t1.c1+t1.c2+t1.c3+... = t2.c1+t2.c2+t2.c3+...
where t2.PK is null
yields the records in t1 but not in t2, and
select t2.PK
from t2
left outer join t1
on t1.c1+t1.c2+t1.c3+... = t2.c1+t2.c2+t2.c3+...
where t1.PK is null
yields the records in t2 but not in t1. There is a checksum function that
may or may not help the processing. If your table is large, you may need to
cycle through the table.
hth
Quentin
"John Steen" <anonymous@.discussions.microsoft.com> wrote in message
news:3937945E-493B-462B-A57E-51C7818B23FD@.microsoft.com...
> Thanks for the quick reply, Russell. Unfortunately, there's not another
unique index on this table other than the ones on the Identity and ROWGUID
columns. Is there a way to compare the combined values of the rest of the
columns? If not, then I'll have to use the ROWGUID column and hope
duplicate records aren't created.
> Thanks,
> John
> -- Russell Fields wrote: --
> John,
> Assuming that there is another unique index in addition to the PK and
> ROWGUID columns, use that to manage the joins. (If there is no other
unique
> identifier than the two that are not reliable, then the problem
becomes much
> harder.) Something like:
> SELECT * FROM DB1.Table1
> WHERE UniqueString + CONVERT(VARCHAR(10),UniqueInt)
> NOT IN
> (SELECT UniqueString + CONVERT(VARCHAR(10), UniqueInt)
> FROM DB2.Table1)
> Russell Fields
> "John Steen" <anonymous@.discussions.microsoft.com> wrote in message
> news:94B4A891-E2B2-4F43-8059-E34BCD82B5C7@.microsoft.com...
> > I have two identical tables on two DBs, DB1.Table1 and DB2.table2.
> DB1.Table1 has more data than DB2.Table1. I need to find out what
data in
> DB1.Table1 is not in DB2.Table1, but I can't do it by the ROWGUID
column
> because not all ROWGUID values were carried over the last time the
DBs were
> split, so identical rows may not have the same rowguid value. And I
can't
> use the PK column because that's the Identity column which is not
unique
> between these two tables.
> >> What I need to do is compare the combined columns in one table
(not
> including the Identity and rowguid columns, of course) with the same
columns
> in the other table.
> >> Queries are not my strong point. Does anyone know how I can do
this? I'm
> desperate!
> >> Thanks in advance.
> >> John
>
>
What I need to do is compare the combined columns in one table (not including the Identity and rowguid columns, of course) with the same columns in the other table.
Queries are not my strong point. Does anyone know how I can do this? I'm desperate!
Thanks in advance.
JohnJohn,
Assuming that there is another unique index in addition to the PK and
ROWGUID columns, use that to manage the joins. (If there is no other unique
identifier than the two that are not reliable, then the problem becomes much
harder.) Something like:
SELECT * FROM DB1.Table1
WHERE UniqueString + CONVERT(VARCHAR(10),UniqueInt)
NOT IN
(SELECT UniqueString + CONVERT(VARCHAR(10), UniqueInt)
FROM DB2.Table1)
Russell Fields
"John Steen" <anonymous@.discussions.microsoft.com> wrote in message
news:94B4A891-E2B2-4F43-8059-E34BCD82B5C7@.microsoft.com...
> I have two identical tables on two DBs, DB1.Table1 and DB2.table2.
DB1.Table1 has more data than DB2.Table1. I need to find out what data in
DB1.Table1 is not in DB2.Table1, but I can't do it by the ROWGUID column
because not all ROWGUID values were carried over the last time the DBs were
split, so identical rows may not have the same rowguid value. And I can't
use the PK column because that's the Identity column which is not unique
between these two tables.
> What I need to do is compare the combined columns in one table (not
including the Identity and rowguid columns, of course) with the same columns
in the other table.
> Queries are not my strong point. Does anyone know how I can do this? I'm
desperate!
> Thanks in advance.
> John|||Thanks for the quick reply, Russell. Unfortunately, there's not another unique index on this table other than the ones on the Identity and ROWGUID columns. Is there a way to compare the combined values of the rest of the columns? If not, then I'll have to use the ROWGUID column and hope duplicate records aren't created.
Thanks,
John
-- Russell Fields wrote: --
John,
Assuming that there is another unique index in addition to the PK and
ROWGUID columns, use that to manage the joins. (If there is no other unique
identifier than the two that are not reliable, then the problem becomes much
harder.) Something like:
SELECT * FROM DB1.Table1
WHERE UniqueString + CONVERT(VARCHAR(10),UniqueInt)
NOT IN
(SELECT UniqueString + CONVERT(VARCHAR(10), UniqueInt)
FROM DB2.Table1)
Russell Fields
"John Steen" <anonymous@.discussions.microsoft.com> wrote in message
news:94B4A891-E2B2-4F43-8059-E34BCD82B5C7@.microsoft.com...
> I have two identical tables on two DBs, DB1.Table1 and DB2.table2.
DB1.Table1 has more data than DB2.Table1. I need to find out what data in
DB1.Table1 is not in DB2.Table1, but I can't do it by the ROWGUID column
because not all ROWGUID values were carried over the last time the DBs were
split, so identical rows may not have the same rowguid value. And I can't
use the PK column because that's the Identity column which is not unique
between these two tables.
>> What I need to do is compare the combined columns in one table (not
including the Identity and rowguid columns, of course) with the same columns
in the other table.
>> Queries are not my strong point. Does anyone know how I can do this? I'm
desperate!
>> Thanks in advance.
>> John|||John,
probably no other method than the clumsy way of comparing the whole record
in both table:
set concat_null_yields_null off
select t1.PK
from t1
left outer join t2
on t1.c1+t1.c2+t1.c3+... = t2.c1+t2.c2+t2.c3+...
where t2.PK is null
yields the records in t1 but not in t2, and
select t2.PK
from t2
left outer join t1
on t1.c1+t1.c2+t1.c3+... = t2.c1+t2.c2+t2.c3+...
where t1.PK is null
yields the records in t2 but not in t1. There is a checksum function that
may or may not help the processing. If your table is large, you may need to
cycle through the table.
hth
Quentin
"John Steen" <anonymous@.discussions.microsoft.com> wrote in message
news:3937945E-493B-462B-A57E-51C7818B23FD@.microsoft.com...
> Thanks for the quick reply, Russell. Unfortunately, there's not another
unique index on this table other than the ones on the Identity and ROWGUID
columns. Is there a way to compare the combined values of the rest of the
columns? If not, then I'll have to use the ROWGUID column and hope
duplicate records aren't created.
> Thanks,
> John
> -- Russell Fields wrote: --
> John,
> Assuming that there is another unique index in addition to the PK and
> ROWGUID columns, use that to manage the joins. (If there is no other
unique
> identifier than the two that are not reliable, then the problem
becomes much
> harder.) Something like:
> SELECT * FROM DB1.Table1
> WHERE UniqueString + CONVERT(VARCHAR(10),UniqueInt)
> NOT IN
> (SELECT UniqueString + CONVERT(VARCHAR(10), UniqueInt)
> FROM DB2.Table1)
> Russell Fields
> "John Steen" <anonymous@.discussions.microsoft.com> wrote in message
> news:94B4A891-E2B2-4F43-8059-E34BCD82B5C7@.microsoft.com...
> > I have two identical tables on two DBs, DB1.Table1 and DB2.table2.
> DB1.Table1 has more data than DB2.Table1. I need to find out what
data in
> DB1.Table1 is not in DB2.Table1, but I can't do it by the ROWGUID
column
> because not all ROWGUID values were carried over the last time the
DBs were
> split, so identical rows may not have the same rowguid value. And I
can't
> use the PK column because that's the Identity column which is not
unique
> between these two tables.
> >> What I need to do is compare the combined columns in one table
(not
> including the Identity and rowguid columns, of course) with the same
columns
> in the other table.
> >> Queries are not my strong point. Does anyone know how I can do
this? I'm
> desperate!
> >> Thanks in advance.
> >> John
>
>
Subscribe to:
Posts (Atom)