Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Call Dataset B From Dataset A

Posted on 2008-06-26
4
Medium Priority
?
427 Views
Last Modified: 2008-09-17
I am going to have a dataset which will calculate a date, call it dataset A.  My dataset B which will return all records since that date.

So how can I say something like
where date > datasetb.date or something?
0
Comment
Question by:Fraser_Admin
[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
  • 3
4 Comments
 
LVL 2

Expert Comment

by:MapleMale
ID: 21876364
Use a stored procedure and temp tables. Dataset A will be the only data set. Then have a veraible,  @Date or something which you use to store your calculated date. So your where clause would look like this:

Declare @Date datetime

Set @Date = (select mydate field from mytableb where mycolumn = mywhereclause)

Select * from mytable
where date > @Date
0
 
LVL 2

Expert Comment

by:MapleMale
ID: 21876370
** your SP, not Where clause would look like this.... sorry! typo!
0
 

Author Comment

by:Fraser_Admin
ID: 21877075
how do i use a sp with reporting services?
0
 
LVL 2

Accepted Solution

by:
MapleMale earned 1500 total points
ID: 21879256
Go to the Data Tab where you would normally type your SQL Query. Type Exec [name of your SP] [parameters if any seperated by commas]. For example:

EXEC [MyEmployeeRankingsSP] @StartDate, @EndDate

The first time you execute that in SSRS, it will create report parameters named after the SP parameters of @StartDate and @EndDate. Run it once and your field names wil be available to add to the report as well.

Note: You could also skip the whole sp idea and change your command type in the data tab to Stored Proc. This will allow you to use SP type SQL code in the query window instead of standard select statements. This all depends on where you would your code to be executed. Do you want to the put processing load on your database engine or on the reporting server? Those are best practice questions you should ask your DBA.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

636 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