Showing posts with label missing. Show all posts
Showing posts with label missing. Show all posts

Sunday, March 25, 2012

Combining information in two columns

I may be missing something obvious here (in fact it's probably a really
simple problem, and it's probably me being silly - it is Friday after all),
but I can't work out how to do this.
I have a query that performs a full join on two tables, and pulls out four
columns - two containing years, and the others two containing months for
those year. I want to create a master view/query that gives me all the
years, and months in those years once only.
So for example say I have:
Topic_Years, School_Years, Topic_Months, School_Months
Null 1992 Null 10
2004 Null 6
Null
2004 Null 9
Null
2004 Null 10 Null
2004 2004 1 1
2004 2004 2 2
I want to get:
Years, Months
1992 10
2004 1
2004 2
2004 6
2004 9
2004 10
Can somebody point me in the right direction on how to do this?
Cheers!
SarahHi Sara, try this:
SELECT
COALESCE(Topic_Years, School_Years) AS y,
COALESCE(Topic_Months, School_Months) AS m
FROM ...
BG, SQL Server MVP
www.SolidQualityLearning.com
"Sarah Clough" <sarah_c_clough@.hotmail.com> wrote in message
news:OpZaUU7KFHA.1308@.TK2MSFTNGP15.phx.gbl...
>I may be missing something obvious here (in fact it's probably a really
>simple problem, and it's probably me being silly - it is Friday after all),
>but I can't work out how to do this.
> I have a query that performs a full join on two tables, and pulls out four
> columns - two containing years, and the others two containing months for
> those year. I want to create a master view/query that gives me all the
> years, and months in those years once only.
> So for example say I have:
> Topic_Years, School_Years, Topic_Months, School_Months
> Null 1992 Null 10
> 2004 Null 6 Null
> 2004 Null 9 Null
> 2004 Null 10
> Null
> 2004 2004 1 1
> 2004 2004 2 2
> I want to get:
> Years, Months
> 1992 10
> 2004 1
> 2004 2
> 2004 6
> 2004 9
> 2004 10
> Can somebody point me in the right direction on how to do this?
> Cheers!
> Sarah
>|||Hi
If you mean first of two year which is not null and first of two month which
is not null then
please try this
select coalesce(topic_years,school_years) as years ,
coalesce(topic_months,school_months) as months from Table
Thanks
AM
"Sarah Clough" <sarah_c_clough@.hotmail.com> wrote in message
news:OpZaUU7KFHA.1308@.TK2MSFTNGP15.phx.gbl...
> I may be missing something obvious here (in fact it's probably a really
> simple problem, and it's probably me being silly - it is Friday after
all),
> but I can't work out how to do this.
> I have a query that performs a full join on two tables, and pulls out four
> columns - two containing years, and the others two containing months for
> those year. I want to create a master view/query that gives me all the
> years, and months in those years once only.
> So for example say I have:
> Topic_Years, School_Years, Topic_Months, School_Months
> Null 1992 Null 10
> 2004 Null 6
> Null
> 2004 Null 9
> Null
> 2004 Null 10
Null
> 2004 2004 1 1
> 2004 2004 2 2
> I want to get:
> Years, Months
> 1992 10
> 2004 1
> 2004 2
> 2004 6
> 2004 9
> 2004 10
> Can somebody point me in the right direction on how to do this?
> Cheers!
> Sarah
>|||Brilliant, cheers! A little play with my syntax, and it fits into my
existing query.
"Itzik Ben-Gan" <itzik@.REMOVETHIS.SolidQualityLearning.com> wrote in message
news:OsvHNa7KFHA.3132@.TK2MSFTNGP12.phx.gbl...
> Hi Sara, try this:
> SELECT
> COALESCE(Topic_Years, School_Years) AS y,
> COALESCE(Topic_Months, School_Months) AS m
> FROM ...
> --
> BG, SQL Server MVP
> www.SolidQualityLearning.com
>
> "Sarah Clough" <sarah_c_clough@.hotmail.com> wrote in message
> news:OpZaUU7KFHA.1308@.TK2MSFTNGP15.phx.gbl...
>|||"Sarah Clough" <sarah_c_clough@.hotmail.com> wrote in message
news:uz2Ank7KFHA.2804@.TK2MSFTNGP10.phx.gbl...
> Brilliant, cheers! A little play with my syntax, and it fits into my
> existing query.
>
> "Itzik Ben-Gan" <itzik@.REMOVETHIS.SolidQualityLearning.com> wrote in
message
> news:OsvHNa7KFHA.3132@.TK2MSFTNGP12.phx.gbl...
If the Years and Months in each Row are not necessarily the Same or Null
then you need
Select Topic_Years, Topic_Months From ...
UNION
Select School_Years, School_Months From ...
Regards,
Jim

Friday, February 24, 2012

column heading is missing on some pdf rendered pages

I am new to RS so this might be a stupid question. Since the page header
can't have table, I have placed the table in the body as table group header.
The table contains column heading for my report. The report produces over a
hundred pages of PDF files. As I scroll through the PDF pages I noticed that
on some pages the column heading is missing. Does anyone know why or is there
a better way to do this?
Thanks,
TimThis might not be the right answer, but my impression is that where pages
break in the web report, and in the PDF exported report, are two different
things. I noticed it when I added a footer with a line to a report. THis
line would show up at the end of each page in the web report, and totally
randomly in the PDF report. And there would be a lot more text on each page
in the web report, than in the PDF. At least this goes for reports with 8pt
font and landscape view.
Try to check if what you see on each page in the PDF corresponds with what
you see in your web report.
Kaisa M. Lindahl
"Tim2Be" <Tim2Be@.discussions.microsoft.com> wrote in message
news:5660FC32-2C75-43F2-BA22-212001F7D535@.microsoft.com...
> I am new to RS so this might be a stupid question. Since the page header
> can't have table, I have placed the table in the body as table group
header.
> The table contains column heading for my report. The report produces over
a
> hundred pages of PDF files. As I scroll through the PDF pages I noticed
that
> on some pages the column heading is missing. Does anyone know why or is
there
> a better way to do this?
> Thanks,
> Tim|||My web report looks perfectly find with all the column heading in tack on all
pages. Only some of the PDF pages that is missing the column heading. I don't
know why it does that.
"Kaisa M. Lindahl" wrote:
> This might not be the right answer, but my impression is that where pages
> break in the web report, and in the PDF exported report, are two different
> things. I noticed it when I added a footer with a line to a report. THis
> line would show up at the end of each page in the web report, and totally
> randomly in the PDF report. And there would be a lot more text on each page
> in the web report, than in the PDF. At least this goes for reports with 8pt
> font and landscape view.
> Try to check if what you see on each page in the PDF corresponds with what
> you see in your web report.
> Kaisa M. Lindahl
> "Tim2Be" <Tim2Be@.discussions.microsoft.com> wrote in message
> news:5660FC32-2C75-43F2-BA22-212001F7D535@.microsoft.com...
> > I am new to RS so this might be a stupid question. Since the page header
> > can't have table, I have placed the table in the body as table group
> header.
> > The table contains column heading for my report. The report produces over
> a
> > hundred pages of PDF files. As I scroll through the PDF pages I noticed
> that
> > on some pages the column heading is missing. Does anyone know why or is
> there
> > a better way to do this?
> >
> > Thanks,
> > Tim
>
>