I am new to this so hopefully you'll bare with me if this is a stupid
question.
I receive data in a dbf format from the state office on a yearly basis. I
have figured out how to use SSIS to pull these into the SQL system as
different tables (e. Birth2002, Birth2003, Birth2004) within a single DB.
The state has a habit of changing the fields names from year to year, and
what I would like to do is build standard queries that compares one year to
the next. Since I cannot link this data (it is prenatal birth data) on any
field because there is no like field from one year to the next, what would a
query look like, say, to compare birth_hospital in 2002, 2003, and 2004.
I have three separate Select statements that pulls and groups the data, but
they are feeding into separate panes (one for each year). How do I get them
in one pane side-by-side?
TIA
Any help is appreciated.
SELECT birth_date, birth_hospital
FROM Birth2002
UNION
SELECT BirthDate, BirthHospital
FROM Birth2003
UNION
SELECT Bdte, BHosp
FROM Birth2004
"JC HARRIS" wrote:
> I am new to this so hopefully you'll bare with me if this is a stupid
> question.
> I receive data in a dbf format from the state office on a yearly basis. I
> have figured out how to use SSIS to pull these into the SQL system as
> different tables (e. Birth2002, Birth2003, Birth2004) within a single DB.
> The state has a habit of changing the fields names from year to year, and
> what I would like to do is build standard queries that compares one year to
> the next. Since I cannot link this data (it is prenatal birth data) on any
> field because there is no like field from one year to the next, what would a
> query look like, say, to compare birth_hospital in 2002, 2003, and 2004.
> I have three separate Select statements that pulls and groups the data, but
> they are feeding into separate panes (one for each year). How do I get them
> in one pane side-by-side?
> TIA
> Any help is appreciated.
>
>
Tuesday, March 20, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment