Sunday, March 25, 2012

Copying tables based on information

I have a report generated in Crystal 10 that is exported to the SQL server
into its own DB. I finally go the report filtered out enough to where it puts
each person with their designated type (i.e. Store location). My question
isthis: is it possible to have a query of some sort to look at the employee
type and copy all corresponding people in subsequesnt tables that are
associated with that type to another Table that actually corresponds with
their actual store? The 4 Fields that are generated by Crystal
are:DE_Employee_Type, DE_Employee_EmployeeID, DE_Employee_EmployeeName,
DE_Employee_EmployeeIsInactive. I guess the query I am looking for if it is
possible to analyse the Employee_Type column, then any thing that is
corresponding with says DA and has coresponding information in the tables
across from it and then copy the information from those columns to the
correspoding columns in another table?
"Chris Chandler" <see@.top.com> wrote in message
news:Xns959C8912B154Dnospmnet@.207.46.248.16...
>I have a report generated in Crystal 10 that is exported to the SQL server
> into its own DB. I finally go the report filtered out enough to where it
> puts
> each person with their designated type (i.e. Store location). My question
> isthis: is it possible to have a query of some sort to look at the
> employee
> type and copy all corresponding people in subsequesnt tables that are
> associated with that type to another Table that actually corresponds with
> their actual store? The 4 Fields that are generated by Crystal
> are:DE_Employee_Type, DE_Employee_EmployeeID, DE_Employee_EmployeeName,
> DE_Employee_EmployeeIsInactive. I guess the query I am looking for if it
> is
> possible to analyse the Employee_Type column, then any thing that is
> corresponding with says DA and has coresponding information in the tables
> across from it and then copy the information from those columns to the
> correspoding columns in another table?
It is probably possible, but it would be much easier to help you if you
could post the DDL and some INSERTS with sample data.
What does the Crystal table look like when it is finished? Give us the
CREATE TABLE statement and some sample INSERTs.
What do your other tables look like that you would like to pull the data
from based on the crystal table's TYPE column.
What do you want your final output to look like or your final table? Give
us the CREATE TABLE statement for that as well and we should be able to help
you out.
Rick Sawtell
MCT, MCSD, MCDBA
|||"Rick Sawtell" <quickening@.msn.com> wrote in
news:#WbDFFqxEHA.1296@.TK2MSFTNGP10.phx.gbl:

> "Chris Chandler" <see@.top.com> wrote in message
> news:Xns959C8912B154Dnospmnet@.207.46.248.16...
> It is probably possible, but it would be much easier to help you if you
> could post the DDL and some INSERTS with sample data.
> What does the Crystal table look like when it is finished? Give us the
> CREATE TABLE statement and some sample INSERTs.
> What do your other tables look like that you would like to pull the data
> from based on the crystal table's TYPE column.
> What do you want your final output to look like or your final table?
> Give us the CREATE TABLE statement for that as well and we should be
> able to help you out.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
Hm I would gladyl do so but I am so new to SQL and all that I am not sure
where or how to get that exact info. When I go to export it, I just use the
Export Wizard
|||"Rick Sawtell" <quickening@.msn.com> wrote in
news:#WbDFFqxEHA.1296@.TK2MSFTNGP10.phx.gbl:

> "Chris Chandler" <see@.top.com> wrote in message
> news:Xns959C8912B154Dnospmnet@.207.46.248.16...
> It is probably possible, but it would be much easier to help you if you
> could post the DDL and some INSERTS with sample data.
> What does the Crystal table look like when it is finished? Give us the
> CREATE TABLE statement and some sample INSERTs.
> What do your other tables look like that you would like to pull the data
> from based on the crystal table's TYPE column.
> What do you want your final output to look like or your final table?
> Give us the CREATE TABLE statement for that as well and we should be
> able to help you out.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
Also, what happens is when Crystal generates the report, it has 1 table
with 4 fields as stated above. These fields have about 1400 records per
field. They are sorted by Employee Type (ie the store they work at). Again
this is all stored by type in one field. To a point this is fine, but is
there a way to either get Crystal to create 11 tables out of the one big
report or do I need some sort of code or query to break this down when it
is exported?
I am real real new to this so have patience with me. I am looking thru al
teh help files and even going thru the SBS SQL Server 2000 Programming book
from Microsoft.
sql

No comments:

Post a Comment