Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / July 2008

Tip: Looking for answers? Try searching our database.

Working with Disconnected Data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jp2msft - 17 Jul 2008 16:52 GMT
Using VS2005, I can fill a DataSet with multiple DataTables. After this is
done, how would I make a call to that DataSet that can produce distinct
results without having to make a direct SQL call?

I don't even understand that question! So, let me explain further:

In our SQL Server's database, there are many tables, but only a select few
distinct SystemIDs that they are related to.

A stored procedure like this works, but I want to know how to do something
like this using all of the data that has already been collected in my DataSet:

DECLARE @DATE1 CHAR(10)
DECLARE @DATE2 CHAR(10)
SET @DATE1='06/15/2008'
SET @DATE2='07/20/2008'

SELECT A.[System_ID] FROM
(
SELECT DISTINCT [System_ID]
FROM PartsCatalog
WHERE (@DATE1 < Date_Time) AND (Date_Time < @DATE2)
 UNION
SELECT DISTINCT [System_ID]
FROM Historic_Records
WHERE (@DATE1 < Date_Time) AND (Date_Time < @DATE2)
 UNION
SELECT DISTINCT [System_ID]
FROM Inspections
WHERE (@DATE1 < Date_Time) AND (Date_Time < @DATE2)
 UNION
SELECT DISTINCT [System_ID]
FROM Test_Data
WHERE (@DATE1 < Date_Time) AND (Date_Time < @DATE2)
) as A
WHERE ([System_ID] like '%Weld%')

Each of these tables are already in my DataSet, but I do not know how I
would get the new table of information from it like I can using the query
above.

Could someone give me advice on this?

Thank you,
Joe
David Hay - 18 Jul 2008 13:40 GMT
On Jul 17, 11:52 am, jp2msft <jp2m...@discussions.microsoft.com>
wrote:
> Using VS2005, I can fill a DataSet with multiple DataTables. After this is
> done, how would I make a call to that DataSet that can produce distinct
[quoted text clipped - 41 lines]
> Thank you,
> Joe

Joe,

You might want to move this to the ADO.Net groups.  There are more
experts on Datasets there I would imagine.

Good Luck!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.