Here is what I’m doing: public static MVC_Picture GetPictureRecord(int pictureID) { int pictureId = pictureID; MVC_Picture _picture = new MVC_Picture(); //object that stores name and array …
Tag: sql
SQL Query for getting the output as shown in the example shared
For this sample data: create table test (T1 varchar(20), M1 varchar(20)) insert into test (T1, M1) values(‘1930188’, ‘184962’) insert into test (T1, M1) values(‘1930188’, ‘185007’) insert into test (…
Evaluating a variable using the IN() Function
I’m trying to resolve a datastep variable in the in() function. I have a dataset that looks like the following: |Run|Sample Level|Samples Tested| | 1 | 1 | 1-5 | | 1 | 2 | …
MYSQL Procedure not getting called
The Following procedure after getting called, shows up error “The Result return more than one row” where the input value given is just one parameter. DELIMITER $$ CREATE PROCEDURE p( IN en …
Filter duplicate rows in Postgres based on conditions between those rows
Given a table CREATE TABLE data( irs_number VARCHAR (50), mop_up INTEGER, ou VARCHAR (50) ); How would I return all matching records that… have at least one identical value for irs_number in …
Merging tables in Google BigQuery with UNION ALL
I would like to do something like this in BQ. The tables have different schemas. Any ideas how to achieve this? SELECT YYYYMMDDHH, CONTAINER, Parent_Container, PROTOTYPE_ID, Withdrawal_this_hour FROM …
ssrs error converting data type nvarchar to int
I passed this stored procedure into ssrs to generate a report but kept getting error converting data type nvarchar to int, while i don’t even have any parameter that’s nvarchar type. end Answer I definitely would not write it off as just random, you don’t want this popping back up when certa…
Optimize MySQL InnoDB query for max, count
I have an MySQL InnoDB table with 5.7M rows and 1.9GB size: +——————-+———+——+—–+———+—————-+ | Field | Type | Null | Key | Default | Extra …
Query slow when use count(*) and inner join
My query is taking around 5 seconds to run. It returns almost 5000 records. If I remove the Select Count(*) …, it runs very fast, but I need this data. Is there a way to improve this query? Thanks Answer Indexes recommended by Gordon Linoff are a must-have. Another thing you could to is move the computa…
Use a boolean function to determine the results in Laravel query builder
I have shops that open at a specific time and close at a specific time and I want to filter these stores according to a time period specified by the user so that all the returned shops will be available (opened) at any moment within filtering interval The shop opens at 10 pm and closes at 2 pm, I mean