Viewing 15 posts - 1,201 through 1,215 (of 1,464 total)
The reason that you are getting duplicates is because your source data is all the same. If you want to prevent duplicates in your results, then you need to find...
April 7, 2017 at 12:03 am
This should do the trick
CREATE TABLE #Company (CompanyID INT, CompanyName VARCHAR (100));
CREATE TABLE #KVPairs (CompanyID INT, KeyColumn VARCHAR (100), ValueColumn VARCHAR (100));
INSERT...
April 6, 2017 at 10:24 pm
You can try this
INSERT INTO DCert (stateID, custnumber, lastname, firstname, mailAddress)
WITH cteData AS (
SELECT
DC.[State Id] as stateID
,...
April 6, 2017 at 3:19 pm
April 6, 2017 at 3:08 pm
Does this give you the required output?
-- This date is used so that SQL does not get an overflow error when calculating a large time...
April 6, 2017 at 1:14 pm
April 6, 2017 at 12:23 pm
It seems you have an issue with duplicate records for PartNum, DueDate, Quantity).
This should do the trick
WITH cteBaseData AS (
SELECT
PartNum
April 6, 2017 at 5:47 am
Something along the lines of .....
SELECT as many random...
April 5, 2017 at 1:37 pm
This sounds like a running totals issue.
Something along the lines of .....
SELECT as many random questions as needed
WHERE QuestionType = 'Short Note'
AND QuestionComplexity...
April 5, 2017 at 12:52 pm
What about an option to MARK ALL AS READ.
Then when looking at the UNREAD tab, we can start with fresh data.
April 5, 2017 at 11:38 am
April 5, 2017 at 11:24 am
To select the records without deleting the duplicates
WITH cteBaseData AS (
SELECT
cr.ClientRef
, cr.LinkedClientRef
, rn = ROW_NUMBER() OVER (ORDER...
April 5, 2017 at 10:27 am
This will remove the duplicates
-- Create a table to hold the data
CREATE TABLE #Links (
ClientRef INT
, LinkedClientRef INT
);
April 5, 2017 at 10:08 am
Your expected results do not match your supplied sample data.
For this reason, I am unable to create a tested result. However, the code below, should get ypu started.
April 5, 2017 at 8:11 am
Viewing 15 posts - 1,201 through 1,215 (of 1,464 total)