How to check the existence of related records in group by query?
There are 3 simple tables Orders, OrderLines and OrderLineRealizations with an obvious relationships.
I want to return some information about orders with an additional column that represents existence of a realization of any line for given group.
Identify distinct cases
I have a table with multiple columns (SQL Server). Only two columns are relevant to the question however.
Column a = ID (a numeric value)
Column b = Status (String)
Identify distinct cases
I have a table with multiple columns (SQL Server). Only two columns are relevant to the question however.
Column a = ID (a numeric value)
Column b = Status (String)
Use dynamic database name in a stored procedure [duplicate]
Must declare the scalar variable “@name”.
Error for Invalid length parameter passed to SUBSTRING function
I have a table called tblPeople
and this is created as shown below and filled with some data:
How can I exclude rows where the description contains a phrase, but only if it is referenced once?
I have to create a dataset of our email logs to find responses to our prize competition. Our email log is very poor, so I am limited in how I can identify records we are interested in.
T-SQL aggregate counts with a case expression [closed]
Closed 15 days ago.
Create datetimeoffset from columns datetime and bigint
I have two columns on my table @dateTimeColumn datetime
and @timezoneOffsetColumn bigint
.
Consolidating rows from a table
I have the following table:
SQL Error with Substring Invalid length parameter passed to SUBSTRING [duplicate]
Invalid length parameter passed to the LEFT or SUBSTRING function.