Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set datasourc location in Crystal 10 - SHow SQL query issue

Status
Not open for further replies.

ajayshah

Programmer
Sep 11, 2001
27
0
0
US

I changed datasource location from DEV10 to TEST10 through 'Database->SEt Data Source Location, by making new connection TEST10 and updating the datasource to TEST10.

It changed the location on this screen, and all objects appears to be under TEST10. (none of them show under DEV10). I verified database and saved the crystal report.

However, when I run report I still get data from DEV10. So I checked SQL query through 'SHow SQL Query' It still has reference to DEV10 tables except those added in TEST10.

Seems like it pulling data from DEV10 inspite of everything shows TEst10 under Set datasource Location. I have verified database also.

What am I missing?

Thanks in advance!

Ajay

 
Hi,
Just a cautionary note..Changing the datasource does not rewrite the Crystal Sql Query ( the column names are left alone and the from clause adds an alias to the new table's name that is the same as the old table name)

Are you sure it is getting the data from the old database?

Example:

Using a table called Employee in our Production warehouse:
SELECT "MNDOT_EMPLOYEE"."EMPL_NBR", "MNDOT_EMPLOYEE"."EMPL_NM"
FROM "WAREHOUSE"."MNDOT_EMPLOYEE" "MNDOT_EMPLOYEE"
ORDER BY "MNDOT_EMPLOYEE"."EMPL_NBR"

Now switch to a different Database and Table - called HR_PUBLIC
SELECT "MNDOT_EMPLOYEE"."EMPL_NBR", "MNDOT_EMPLOYEE"."EMPL_NM"
FROM "WAREHOUSE"."HR_PUBLIC" "MNDOT_EMPLOYEE"
ORDER BY "MNDOT_EMPLOYEE"."EMPL_NBR"


Notice that the column names retained the old database table's name...




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thanks for the prompt response! I will double check and let you know. I will create a simple report with couple of tables and verify my doubt.

Thanks.

Ajay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top