Solved

Multple SQL Databases with same Table Names -- Crystal Reports

Posted on 2009-05-12
2
195 Views
Last Modified: 2012-05-06
I am using Crystal Reports to access data in a SQL Express 2008 instance, but my question is more a general SQL quesiton than a Crystal Reports question.

I am presently using "AccessBooks RealTime" to export the data from about 10 QuickBooks files into SQL. "AccessBooks RealTime" does not support importing multiple QuickBooks files into one database, since List ID's are not unique across QuickBooks files.

Presently, I have a database for each QuickBooks file, and the sync is working fine between the QB files, and their respective databases.

What I want to be able to do, is show certain pieces of information from each database, alongside one another. For example, there is an "Accounts" table, which has two fields, "AccountType", and "AccountBalance". I would like to be able to pull this data from databases A, B, and C. Of course, the table name, and the field name is identical on all three databases.

I somehow need to "flag" which database each piece of data is coming from. In the above example, I might want to display Cash Balance by Company. Then I would want to filter where AccountType == Cash, and then show the balance for Company A, Company B, and Company C, all together.

Hopefully that makes sense. Any ideas on how to achieve something like that? Is there any way I could create a view that aggregates all of my various databases into one, with a new field or prefix that specifies what database it is coming from?

I have also looked at qODBC to export QB data to SQL, which appears to be more flexibile, but I would have to write the update statements to migrate the data to SQL manually. Of course, then I could probably add my own prefixes to each table as it is updated, but that seems like a lot of work.
0
Comment
Question by:netmergence
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
BALMUKUND KESHAV earned 500 total points
ID: 24371579
Use Database.Tablename in select statement if you are using same tablename from more than one database, use database1.tablename1.AccountType as accounttypeA or database2.tablename2.AccountType as accounttypeB something like that .
or
Make different views for different databases and use filedname as asyoulikefieldname in views and finally use the different views to make a final sql/views.

Bm Keshav

0
 

Author Closing Comment

by:netmergence
ID: 31580841
I knew there would be an easy solution. "select as" fits the bill perfectly. Thanks!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question