Skip to content
Advertisement

Tag: dataset

How to use a sub-query to pick out corresponding value for another minimum

I’m trying to find a name of a Community Area that corresponds to the minimum safety score in another column. Current code is resulting table What I want is a table that has COMMUNITY_AREA_NAME defined as WASHINGTON PARK and SAFETY SCORE defined as 1. COMMUNITY_AREA_NAME SAFETY_SCORE WASHINGTON PARK 1 Dataset is taken from here: https://data.cityofchicago.org/Education/Chicago-Public-Schools-Progress-Report-Cards-2011-/9xs2-f89t Any help is appreciated. Answer

DataTable ‘Table’ already belongs to this DataSet – on a new DataSet?

I have a function that executes SQL queries and returns a generic DataSet of the query results. This function has been working for years in many applications, but today with a specific query I am getting “Error executing [select top (1) RecordId, SourceCID, SourceID, CaseID, DisposeRequestedDate, DisposeRequestedBy, DisposeApprovedDate, DisposeApprovedBy from mycatalog.dbo.CASD_RetentionManagementDisposalApprovedQueue order by DisposeApprovedDate, RecordID;] A DataTable named ‘Table’ already

Rolling 12 month filter criteria in SQL

Having an issue in SQL script where I’m trying to achieve filter criteria of rolling 12 months in the day column which stored data as a text in server. Goal is to count sizes for product at retail store location over the last 12 months from the current day. Currently, in my query I’m using the criteria of year 2019

How to fill Dataset with multiple tables?

I’m trying to fill DataSet which contains 2 tables with one to many relationship. I’m using DataReader to achieve this : But I’ve got only one table filled up. How do I achieve my goal – fill both tables? I would like to use DataReader instead DataAdapter, if it possible. Answer If you are issuing a single command with several

Advertisement