Viewing 15 posts - 181 through 195 (of 432 total)
SELECT circuits.name AS circuit_name
,circuits.location
,circuits.country
,races.name AS race_name
,races.round
FROM circuits
LEFT OUTER JOIN races on circuits.circuit_id = races.circuit_id
AND races.race_year = 2009
WHERE circuits.circuit_id < 70
There are no races...
September 20, 2022 at 2:19 pm
The query works fine with the sample data. Do you have another example you can provide in a consumable form? Are you sure you're not grouping by SKU? The image...
September 19, 2022 at 6:28 pm
--I need to find the members who have lost eligibility for more than 3 or more years and now have returned in 2122.
Add this data so you have a...
September 14, 2022 at 12:02 am
Assuming that all ProgramYearValues correspond to one year spans, the gap between sequential year spans is 101, so a 3 year gap is a difference of 303. You can identify...
September 13, 2022 at 10:37 pm
If you need to do this for more than one table or don't want to hard code the column names you can use dynamic sql. This could probably be cleaner...
September 9, 2022 at 2:43 pm
Is this sufficient?
DECLARE @NumberOfGroups INT = 10
SELECT a.[name],
a.Rn%@NumberOfGroups + 1 AS Grp
FROM (
...
September 9, 2022 at 1:53 pm
I was afraid you will be using the nodes.
What makes it tricky is you need to show the children of an entity at any level
Here's a potential alternative. If...
September 8, 2022 at 2:19 pm
Using the try catch above sounds like the best approach for sql step. If it's not a sql step and you can't modify it, you could add an email job...
September 8, 2022 at 9:17 am
Is the hierarchy limited to those four levels? If so you could always include a Pallet, Master and Case column in the view. Assuming the level_ids don't cross level type, ...
September 7, 2022 at 10:22 pm
Does filtering the first part of the cte return the data you need?
WHERE level_id = 'M3'
with
WHERE tree_level > 0
If so you could turn it...
September 7, 2022 at 4:59 pm
A for each look can work, although a script does seem much simpler.
The Foreach File Enumerator uses a parameter for the source directory
: @[$Package::SourceDir] and returns the file name only...
September 7, 2022 at 2:33 pm
Do you just need a check constraint on the column?
CREATE TABLE MyTable
(ID INT IDENTITY(1,1) NOT NULL,
MySQLServerName NVARCHAR(40) NOT NULL,
SQLServerVersion NVARCHAR(40) NOT NULL ,
CONSTRAINT CKMyTableSqlVersion CHECK (SQLServerVersion IN...
September 6, 2022 at 9:44 pm
Please give me completed code.
Try this. I have added the schema (assuming it is dbo) and put the order table name in square brackets. If you type the name...
September 3, 2022 at 11:25 pm
order is a reserved word - either use 2 naming convention (which you should be doing anyway) or enclose in square brackets - or both
Typical, I put all the...
August 30, 2022 at 1:39 pm
Is the quantity a decimal or an integer? In MySQL what do you get if you use ROUND without specifying a number of decimal places?
Does this work?
SELECT...
August 29, 2022 at 6:19 pm
Viewing 15 posts - 181 through 195 (of 432 total)