I am trying to create a table that will have unique distances between slot machines based on the following dataset. I know I first need to calculate my distances and the only way I currently know how would be to use the following code: But this obviously only returns the distance between the first two machines. How do I calculate
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
How to get observation frequency counts from multiple dataset into one table?
I have a bunch of large datasets. DS_1 (contains all unique IDs and names): DS_2: DS_3: I’m looking to create a new dataset that shows frequency counts across the datasets (and lastly calculates Total_Obs). I would output something like this: The datasets are fairly large. Is there a more efficient way to do this apart from concatenating the datasets and
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
SQL Server datasets [closed]
I would like to know if there are any SQL Server ready datasets which one can use. I know there’s AdventureWorks (which i’m already using), but i would like to know if there are more. I also open for …
SQL Like statement not working in Visual Basic
Dim strText As String = tbRefine.Text Dim sql As String = “SELECT user_name,forename,surname,game_cash,reg_group FROM tblGame WHERE user_name LIKE ‘” + strSearchText + “‘ & ‘*'” Dim dsRefine As …
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
Direct method from SQL command text to DataSet
What is the most direct route to get a DataSet if I have a sql command? string sqlCommand = “SELECT * FROM TABLE”; string connectionString = “blahblah”; DataSet = GetDataSet(sqlCommand,…