Multiple Databases In One Dataset

May 8, 2008

I usually use Access for my database work, but a recent request needs data from a table with about 8 million records - a mite outside of Access' league.

So, I am using SQL Server Report Services to create this report.

Essentially, I need to be able to use a table from database A and a table from databse B in a single dataset for the report I'm making.

I'm self-learning this package and have not been able to locate if this is even possible, let alone how to do it. I can't see it not being possible, so I figure the procedure is simply eluding me.

I've seen a thread on a similar - if not the same - problem, and the answers given all seemed to be based upon the user being able to write to the database server or in some other manner manipulate the server. I have no such capabilities. All I can do is look at the data and create a report based upon what I see. No write access at all.

This wasn't a problem in Access, because, though the main data was on the server, I linked to any needed tables and everything else was local to my box.

Thanx in advance for any help!

View 5 Replies


ADVERTISEMENT

Linking Tables From Different Databases Or Querying From Multiple Databases

Dec 10, 2007

Dear Readers,Is it possible, like in Access, to link to tables in other SQL databases that are on the same server? I have a query that I originally had in Access that queered from multiply databases. It did this by having those other tables in the other databases linked to the database that had the query. 
 

View 3 Replies View Related

Transact SQL :: Create Email Report Which Gives Result Of Multiple Results From Multiple Databases In Table Format

Jul 24, 2015

I'm trying to create an email report which gives a result of multiple results from multiple databases in a table format bt I'm trying to find out if there is a simple format I can use.Here is what I've done so far but I'm having troble getting into html and also with the database column:

EXEC msdb.dbo.sp_send_dbmail
@subject
= 'Job Summary', 
@profile_name  =
'SQL SMTP',
   
[code]....

View 3 Replies View Related

Creating A Database From Multiple Databases Accross Multiple Servers

Sep 13, 2007

Hi,

I'm trying to create a database that takes specific information from a number of databases on different servers to make some reporting that we have much easier.

I'm pretty new to SQL so I'm not sure of the best way to proceed. I read an article that suggested I use the OPENROWSET command. The problem is, the version of SQL that came with one of the programmes we use is limited and will not allow you to turn on the allow "Ad Hoc distributed Queries" so the SLQ statement will not execute.

I'm confused why it won't let me to connect through ODBC as I've created a web page that selects data from this database with no problems!

Here is the SQL statement that I've written to make sure it is the correct one (on the msdn library page it said that this was the ODBC connection):

SELECT a.*
FROM OPENROWSET('MSDASQL','DRIVER=(SQL Server);SERVER=APPOLOACT7;UID=sa;PWD=***************',
'SELECT * FROM MDCTestAndDev.dbo.TBL_CONTACT') AS a



I've also created the ODBC connection using the tool on Administration Tools>Data Sources ODBC

Any help would be greatly appreciated (also any ways of selecting from one database and inserting it into another will be helpfull)

Thanks

View 8 Replies View Related

Merging Data From Multiple Databases With Multiple Tables (all With The Same Structure)

Nov 15, 2006

Hi!

I have 7 source databases and one target database, all using the same structure. The structure is made of 10 tables, with foreign key constraints.

I need to merge the source databases into the target (which won't have any data before that process, but will already have the correct schema), and to keep the relationships between the records.

I know how to iterate over the source databases (with SMO foreach), but I'd like to know if someone can advise the best copy method for that context in SSIS ? (I don't want to keep the primary keys, but I need to keep the relationships...)

Any pointer most welcome!

best regards and thanks

Thibaut

View 1 Replies View Related

SQL Tools :: How To Restore Multiple Databases From Multiple BAK Files At Once

Aug 14, 2012

I am trying to restore multiple .bak backup SQL database files onto a new server. However, I have found that it will not allow me to restore multiple databases at once. Is there a way to do this so that I do not have to manually upload one at a time? I tried adding all the .bak files at once to the backup device window but it only did the first one listed. It would be so much easier to restore them all at once so that I do not have to continue this manual process. I am restoring them via device.

View 13 Replies View Related

JOIN Multiple Tables From Multiple Databases

May 23, 2008

Hello,
I am in the progress of designing a new section of my database and was thinking of creating a hole new database instead of just creating tables inside the database.  My question is can you JOIN multiple tables in an SQL Statement from multiple databases.  Ie, In the Management program I have a database called 'Convention' and another one called 'Services', inside the two databases there are many tables.  Can I link say tblRegister from Convention to tblUser in Services?
Thanks

View 3 Replies View Related

Multiple Dataset

Nov 12, 2007



Hi

I am new to Reporting service, Trying to create a report RS2005.
I defined two dataset (query getting data from same database)

In report designer, I inserted a group and drap columns from first dataset. and inserted second group, when i dragcolumns from second dataset it shows like this


=First(Fields!GroupStatus.Value, "ParentGroup")

in my first group columns shows like
=Fields!Member.Value

when i run the report i am getting one row in second group.


this looks like very basic mistake I am doing, since I don't have any experience in RS2005, i am posting this question,

thanks in advance

kal

View 4 Replies View Related

Using Multiple Datasources In A Dataset

Jan 30, 2007

Hi,

I have to design a tabular report where the data in all the columns of the table comes from the cube, but for one column where the data comes from the ODS table.

Could anyone please let me know if it is possible to combine the results of the query from a cube with query from an ODS table and display together in a single report?

Any thoughts on this would be greatly appreciated

Thanks.

View 1 Replies View Related

Populate Dataset With Multiple Tables

Aug 23, 2006

Hi,
Is it possible to populate a dataset with tables returned by a stored proc?Consider this:
BEGINSELECT * FROM Table1SELECT * FROM Table2SELECT * FROM Table3END
If that is my stored proc, could I call it from a page and automatically populate a dataset with all 3 tables (if yes, then how?), or would I have to make 3 seperate calls to the db for each table?
Thanks

View 2 Replies View Related

Dataset With Multiple Tables Is Not Getting Populated

Dec 25, 2006

Hi,
I have a stored proc which returns multiple result sets.  These results sets I am capturing using a strongly typed dataset which in turn I am using to display in the code.  My dataset will have 5 tables.  However when I run the code only 3 tables get populated and the remaining 2 gets no data. 
 I have seen the problem earlier and could not resolved it.  Please let me know if any one can help.
 
Thanks in advance
Rohit

View 3 Replies View Related

Sharing A Dataset In Multiple Reports?

Sep 26, 2007

I'm looking for some advice on how to manage reports that use the same query in their datasets. I have multiple reports that use several datasets that are the same. If I need to make a change to one dataset, I need to remember to update the other datasets. Of course I don't always remember to do that!

Is there a way to create a dataset in a single location and then share it? I was thinking of using a View but I don't think it'll accept the parameters.

I've been cutting & pasting the entire query as I make change but I'm afraid it'll mess that up or forget to update a dataset.

How do you do it?


Any suggestions you have would be helpful.

Rob

View 7 Replies View Related

Dataset Filtering With Multiple Expressions

Sep 1, 2007

I would like to know how to dynamically change the And/Or value on the Filter tab within a dataset.

Here are my two expressions within the filter:




Code Snippet
=Switch(Parameters!TotalCostFilterOp.Value = "=",Fields!tcost.Value = Parameters!TotalCost.Value,Parameters!TotalCostFilterOp.Value = ">",Fields!tcost.Value > Parameters!TotalCost.Value,Parameters!TotalCostFilterOp.Value = ">=",Fields!tcost.Value >= Parameters!TotalCost.Value,Parameters!TotalCostFilterOp.Value = "between",Fields!tcost.Value >= Parameters!TotalCost.Value AND Fields!tcost.Value <= Parameters!TotalCost2.Value,Parameters!TotalCostFilterOp.Value = "ie", ISNothing(Fields!tcost.Value), Parameters!TotalCostFilterOp.Value= "<",Fields!tcost.Value < Parameters!TotalCost.Value,Parameters!TotalCostFilterOp.Value = "<=",Fields!tcost.Value <= Parameters!TotalCost.Value,Parameters!TotalCostFilterOp.Value = "<>",Fields!tcost.Value <> Parameters!TotalCost.Value)









Code Snippet
=Switch(Parameters!CompanyFilterOp.Value = "%",LCASE(Fields!company.Value) like "*" & LCASE(Parameters!Company.Value) & "*", Parameters!CompanyFilterOp.Value = "=",Fields!company.Value = Parameters!Company.Value, Parameters!CompanyFilterOp.Value = "ie", ISNothing(Fields!company.Value), Parameters!CompanyFilterOp.Value = "?", LCASE(Fields!company.Value) LIKE LCASE(Parameters!Company.Value), Parameters!CompanyFilterOp.Value = "<>", Fields!company.Value <> Parameters!Company.Value, Parameters!CompanyFilterOp.Value = "?%", LCASE(Fields!company.Value) LIKE LCASE(Parameters!Company.Value) & "*")






The operator for both these is set to "=", and the value is set to "=true".

Based on user selection in a report wizard, the 4th column (And/Or) may need to be changed from 'and' to 'or', or vice-versa.
Is there anyway to accomplish this programatically?

Thanks in advance for you help!

View 2 Replies View Related

Multiple Data Sources For A Dataset

Aug 23, 2007



Hey everyone,

I am trying to combine like data from two different data sources into a single data set. Is there anyway I can do this? It seems like I can only add one data set, but is there some sort of workaround I could use?

thanks,
Keith

View 4 Replies View Related

Insert Multiple Rows From Dataset Into SQL Database

Aug 16, 2006

Hi,
is there anyway to insert all the rows from a dataset to SQL Server table in a single stretch..

Thanks
Anz

View 1 Replies View Related

DataSet With Multiple SELECT Statements To The Same Table

Apr 29, 2008

Hi,
 OK, trying to return the results from two SQL statements into a DataSet using SqlDataAdapter. The SELECT statements query the same table but are looking for different records based on the date that the records were inserted - the 1st query looks for records fro the current month and the 2nd one looks at the same records but for the previous month. The goal is to be able to do some math within a repeater and get the difference between the two records.
Sounds easy enough and it has worked for me in different variations of the same idea but not this time - here's the code:
Protected Sub buildPartsReport(ByVal varHC)        objConn.Open()        sSQL = "SELECT ap.id,item_model,item_sn,aircraft_id,item_loc=item_type+ ' on ' +(SELECT tnum FROM T_Aircraft WHERE id=aircraft_id),apt.tot_time As endTimes,apt.tot_cycles as endCycles FROM T_Aircraft_Parts ap, T_Aircraft_Parts_Totals apt WHERE ap.id=apt.part_id AND report_date= '" & rD & "' AND item_type LIKE 'engine%';SELECT ap.id,apt.part_id,apt.tot_time as startTimes,apt.tot_cycles as startCycles FROM T_Aircraft_Parts ap, T_Aircraft_Parts_Totals apt WHERE ap.id=apt.part_id AND report_date= '" & oldRD & "' AND item_type LIKE 'engine%'"        Dim objCommand As New SqlDataAdapter(sSQL, objConn)        DS = New DataSet()        objCommand.Fill(DS)        Repeater1.DataSource = DS        Repeater1.DataBind()        DS.Dispose()        objCommand.Dispose()        objConn.Close()    End Sub
Sorry if it wrapped a bit. The "rD" and "oldRD" are the variables for the date ranges (currently set to static numbers for testing). I'm getting the following error when I run this on an ASP.Net page:
System.Web.HttpException: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'startTimes'.
The code works fine when run via the Query Tool on the SQL server (SQL 2005 Std) though it produces two distinct "tables" which I'm guessing is the problem. I've tried variations on the code including creating a 2nd dataset and then attempting a merge (no joy) and I've tried the ".TableName" route but it complains about trying to add the tablename twice.
Thoughts? I need to get this to work - it is part of a reporting component for an application that I'm developing and I'm stuck. Thanks as always...

View 5 Replies View Related

Reporting Sevices Multiple Resultsets In A Dataset

Aug 11, 2004

Hi!

I have a question about SQL Reporting Services. I have a stored procedure which returns multiple resultsets (multiple select). In my reporting services project I have a dataset that connects to this procedure. But, when I execute it in the Data tab, I only get the first resultset. So can't I have more resultsets?
I can't use more datasets (that have the selects in the procedure) because the procedure is complicated and has many calculation. I've managed to get all the selects in only one and the reporting services in working in this way. How about many resultsets in a dataset?

Thank you!

Irina Stanca

View 5 Replies View Related

Displaying Multiple Charts Using A Single Dataset

Jun 15, 2007



Hello,



I have the following tables :



Area
areano
areaname


Locality

locno
areano




RequestType
reqid
reqdtls




WebSummit

SummitId

RequestorName

DateOfRequest

reqid

Areano



I want to display the total no. of Addition, Removals and Relocations during the past 3 months in a paticular Area.



I have written the query for this.



select q.[areaname] as Area,

classCount as TotalCount, ReqType

from ( select a.areano,

a.classCount, ReqType

from ( select areano,

count(*) as classCount, reqdtls as ReqType

from WebSummit

join RequestType

on WebSummit.reqid = RequestType.reqid

where date_created >= dateadd(mm, -3, getdate())

group by areano, reqdtls

) a

join WebSummit b

on a.areano = b.areano

group by a.areano,

a.classCount, ReqType

) p

join Area q

on p.areano = q.areano



The query works fine and has been tested. Now I want to display this in chart format.



The display should be in a chart format, one for each area showing a bar for each RequestType.



I have placed "TotalCount" in the Data Fields section and ReqType in Category fields. How do I use the Filter to set an expression so that it displays the data in a seperate chart for each Area.



I tried using =Fields!Area.Value and set it to Area1 to display only Area1 values, however the preview shows nothing.



Plz help me out.



Here's some sample data





Area



AreaNo AreaName

1 Area1

2 Area2

3 Area 3

4 Area4

5 Area5

6 Area6

7 Area7



Locality



LocNo AreaNo

1 1

2 1

3 1

1 2

2 2

1 3

2 3

3 3

4 3

1 4

2 4

1 5

2 5

3 5





RequestType



reqid reqdtls

1 Addition

2 Removal

3 Relocate



WebSummit



SummitId RequestorName DateOfRequest reqid AreaNo

1 John 12/6/2007 1 1

2 Jack 13/6/2007 1 1

3 Bill 12/6/2007 2 1

4 Ben 12/6/2007 3 1

5 Dale 14/6/2007 1 2

6 Evjen 15/6/2007 1 2

7 Fuller 16/6/2007 2 2

8 Jimmy 16/6/2007 3 2

9 Kart 16/6/2007 3 2

10 Fuller 16/6/2007 3 2





Regards,

Vidya

View 1 Replies View Related

Iterate Thru A Dataset To Generate Multiple Charts

Jan 17, 2008



Hi, has anyone been able to implement something like this?

I have two data sets
1) List of all stores
2) Table containing the following fields: store, sales as of end of quarter, quarter end date

I am creating a graph that would track the trend of sales quarter per quarter for each store and would need to have an individual graph for each.

Is there a way to dynamically do this rather than creating an individual recordset for each store?

Thanks

View 1 Replies View Related

Does Multicast Component Create Multiple Copies Of The Same Dataset?

Jan 14, 2008

Wondering how this is handled by Multicast component. If multiple copies are created in the memory and the size of the dataset is large, this could cause some performance problems. Any thoughts? TIA

View 8 Replies View Related

Reportviewer - How To Link Multiple Tables Into A Single Dataset

Sep 13, 2007

Hi,

I want to design a report in which it will contain fields derived from 2 different stored procedures. I understand a 'table' can display data from a single dataset. How can i bind these two stored procedures into a single dataset so as when i click on the table and use its property 'DataSetName', to be able to select the dataset which holds all columns from stored proc 1 and stored proc 2. How can i link multible tables ( multible stored procedures with different column names in each one) into a single dataset to feed the report?

Thank you
George

View 1 Replies View Related

Reporting Services :: Multiple Charts From A Single Dataset

May 20, 2015

I'm looking to build a report that is basically a series of line charts that is plotting a value over time.  I can accomplish this one chart/dataset at a time, but I believe with 'List's this can be achieved in a more automated fashion.If I have some data similar to this:

Area_ID, Location_Name, DataValue, ReadingDate
1,Site1,100,1990-10-10
1,Site1,110,1990-11-11
1,Site2,105,1994-01-07
1,Site2,105,1994-02-07
2,Site3,113,1994-06-02
2,Site3,120,1994-07-30
2,Site4,120,1994-06-30
2,Site4,120,1994-07-30

I want the charts grouped by the Area_ID, and then each Location_Name is a Series in that chart.  So in this example, I would end up with 2 charts (Areas 1 & 2), each have 2 series (Area 1: Site1, Site2 and Area 2: Site3, Site4)Is it possible to build this with a list? or do I need to structure the data differently?

View 6 Replies View Related

Query To Select Multiple Tables In Dataset Through ODBC Connection

Apr 10, 2007

Hi there,



I have a MS Access database (mdb) containing the following tables:



Crime

Criminal

CrimeCommitted

Hideout

CriminalType



The Criminal table contains information about each criminal and the CrimeCommitted table contains information about the specific crimes. I've written the following query to return only the latest crime committed by each criminal:




Code Snippet



SELECT Criminal.CriminalID, Criminal.Firstname, Criminal.Lastname, Criminal.Nickname, Criminal.Gender, Criminal.DOB, Criminal.Eyes, Criminal.Complexion, Criminal.Weight, Criminal.Height, Criminal.Build, Criminal.Scars, Criminal.Occupation, Criminal.CrimeOrgID, Criminal.IQ, Criminal.Hideout, Criminal.CriminalType, Max(CrimeComitted.Date) AS Last_Crime_Comitted
FROM Criminal INNER JOIN CrimeComitted ON Criminal.CriminalID=CrimeComitted.CriminalID
GROUP BY Criminal.CriminalID, Criminal.Firstname, Criminal.Lastname, Criminal.Nickname, Criminal.Gender, Criminal.DOB, Criminal.Eyes, Criminal.Complexion, Criminal.Weight, Criminal.Height, Criminal.Build, Criminal.Scars, Criminal.Occupation, Criminal.CrimeOrgID, Criminal.IQ, Criminal.Hideout, Criminal.CriminalType;







This query works fine for obtaining the Criminal table data, but once i've include CrimeCommitted.Country in the SELECT statement, the data returned contained all the crimes committed by each criminal (i just need the latest crime).



The query doesn't work when another table, other than Criminal, is selected. How can i obtain the columns in the CrimeCommitted table in this query?

View 2 Replies View Related

Reporting Services :: Report Builder - How To Use Multiple-value Parameter In Dataset Control

Oct 25, 2015

I have used my parameter value in where clause of my dataset control SQL query. When I choose a single value in my multiple-value parameter then I get output as expected. Hovewer when I choose multuple values I get an arror:

Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
----------------------------
Query execution failed for dataset 'DATABASE'. (rsErrorExecutingCommand)
----------------------------
An error has occurred during report processing. (rsProcessingAborted)

I am convinced that it's a syntax problem. Is there a way I can change syntax of data output from query:

select @parameter

I need output to be like: value, value, value ... etc.

The dataset control query looks something like the following:

select
ID,
a,
b,
c,
d
from DATASET.dbo.Table
where ID in (select @parameter)

I have been searching through google for weeks to solve this and got this far and got stuck. Is it possible at all to achieve what I am looking for?

View 4 Replies View Related

SSRS | For Multiple Dataset | How To Show No Result Message | Norows Property

May 5, 2008

Hi All,

I created one report having more than two datasets. How can I display the "No result found Message" If some of the dataset having no data.

Thanks,
Aneesh

View 4 Replies View Related

RDLC Newbie Questions (hopefully)...connecting Dataset To Report That Contains Multiple Data Tables

Sep 12, 2007

Hi All,

We are post-deployment with a serious reporting issue that's causing us to rethink our reporting solution. We're considering moving from what we have to SQL Server Reporting Services (client side).

I have spent the past couple of days getting up to speed on this feature and seeing if we can easily migrate it into our existing application. However, I've hit a couple of stumbling blocks and was hoping perhaps someone here could either tell me the solution or point me in the right direction.

I'm not having any problems creating basic reports (e.g. flat data).

However, I am having problems creating reports where there are related tables in a dataset.

The way it works with our existing solution is that I get a dataset (which contains several data tables) and point it to the report's datasource. That report expects those tables and I have defined table-relationships in the report which process and display the information correctly.

I'm not having as much luck with RDLC.

I can go into futher detail about how I'm creating the report, but let me just ask these general questions first:
1. Can I set a dataset containing multiple datatables equal to a property on an RDLC report and that RDLC report know how to treat and display the data?
2. Is there a better/smarter than this to get a field selection from my datasource (remember, this information is coming from a stored procedure so connecting directly to the database is not an option):
a. In code, populate dataset
b. In code, write dataset schema to xml (e.g. an xsd file)
c. In Visual Studio, add the XSD file to project
d. Use fields from XSD file to drag and drop fields on report

A fancy example would be nice too. I've googled like crazy the past couple of days and downloaded as many samples as I can find (including the ones on ftponline.com, gotreportviewer.com, "Tudor's WebLog", and several others). However, I have yet to find one that uses grouping and related datatables.

Thank you so much (if, for nothing else, reading this post )

View 4 Replies View Related

Multiple Databases?

Jul 8, 2004

Is it possible to retrieve Data from SQL Database #1 and insert it into SQL Database #2 using a Stored Procedure? Thanks. If so Can you show example. Thanks

View 12 Replies View Related

Multiple Databases

May 18, 2007

Hi All

I have a question about having one or multiple databases for a large project. What are the main differences between designing my database as one or breaking in to multiple databases. I should mention that there are many relationships between tables in different DBs in the multiple DBs state?

regards
sasan

View 5 Replies View Related

Querying Multiple Databases

Feb 7, 2007

Hey there!
I'm not sure how to explain this but here goes...
I'm a bit stuck, a new project that's come about "requires" me to query multiple databases as if they were tables.
1 Oracle database which stores information on our staff (this database is a part of some MIS software and can't be changed in any way)
1 SQL Server 2005 database which stores information on staff sickness
Basically say theres 1 table in each database
Oracle DB
People


Person_Code
Forename
Surname
SQL DB
Sickness


Person_Code
Daydate
Lets say the query I want to perform is to select all the records from sickness where person code is 22334 and also get their name from the other db, so the output may look like
22334 Dann Rees 01/01/2007
22334 Dann Rees 03/01/2007
22334 Dann Rees 10/02/2007
Now I realise I can write a quick function to pull the information but this is just a basic example. Effectivley what I "need" is to be able to query sickness while sub querying people to get the names, or some kind of pass through query?
Please remember this is just a very simple example and the "actual" queries will be far more complicated, for instance finding all the employees of a certain department who is male and was sick in January. All the data for that example is stored in people (oracle) except for the dates which is stores in sick (SQL 2005). Now these are easy enough if they were tables in 1 database....but their not, their tables in 2 databases, and theres nothing I can do to change that :(
All help appreciated as this is becoming very urgent.
Many thanks
Dann
(I couldnt post this in the General data access forum for some reason)

View 1 Replies View Related

Searching Multiple Databases

Jul 16, 2007

Hi all:I am trying to create a website which will search and return results that are from multiple tables in different databases.  I have the code to search a singular database right now, and I tried to make a connection to a second one, which worked, but I don't know how to send the proper sql commands to the second database or how to link them in the code.  Does anyone have any pointers on creating a site which will search different tables in different databases with a known connection between databases?   Any help would be really really really really appreciated.-Shrey 

View 3 Replies View Related

Using Multiple Databases In A View

Nov 11, 2007

How can I include tables and views from database A when building a view in database B, if possible?
Same for stored procedures.

View 1 Replies View Related

How To Write An Sql Across Multiple Databases

Dec 23, 2005

so, I am trying to write an sql that requires information across two
different database. It's under the same sql server. However, the
location of the tables are from different database.

Any links I can read about that can show me how to write the queries?

Thanks in advance, and merry X'mas.

View 1 Replies View Related

Reflecting Changes To Multiple Databases

Jun 14, 2001

We have a number of databases(on sqlserver 7.0) which has the same structure but with data for different users. We would like to change the structure of the databases with minimum effort and with minimum down time.
Is there any method to automate the change so that the change is reflected in all the databases when a single database structure is changed?
Any suggestions in this regard are welcome and urgent

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved