Viewing 15 posts - 8,206 through 8,220 (of 10,143 total)
Here's version 2 Gareth, with an extended sample data set.
-- test data --
DROP TABLE #wms_requirements
DROP TABLE #wms_batch_queue
CREATE TABLE #wms_requirements
(
[warehouse] [char](2) NOT NULL,
...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 20, 2010 at 10:25 am
AND a.History_YN IS NULL
The opposite would be:
AND NOT a.History_YN IS NULL
or
AND a.History_YN IS NOT NULL
If you want to compare your column with a second literal, then it might...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 20, 2010 at 7:49 am
SELECT a.Contact_info
,b.MEMBER_NUMBER
,c.CLIENT_NUMBER
,a.CONTACT_TYPE_ID
,d.history_YN
FROM FRATERNAL.CONTACTS a
inner join FRATERNAL.CLIENT_CONTACTS a1 on a.CONTACT_ID = a1.CONTACT_ID
inner join FRATERNAL.MEMBER b on a1.CLIENT_ID = b.CLIENT_ID
inner join FRATERNAL.CLIENT c on a1.CLIENT_ID = c.CLIENT_ID
WHERE a.CONTACT_TYPE_ID in ('Email1')
AND b.MEMBER_NUMBER...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 20, 2010 at 7:34 am
Which table contains the column HISTORY_YN?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 20, 2010 at 7:21 am
Jpotucek (1/20/2010)
awesome.. it's actually all coming together in my head 🙂
The legendary Linda Lovelace apparently said something similar.
The Y is a literal, and as such requires...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 20, 2010 at 7:11 am
SELECT
a.Contact_info
,b.MEMBER_NUMBER
,c.CLIENT_NUMBER
,a.CONTACT_TYPE_ID
FROM FRATERNAL.CONTACTS a
inner join FRATERNAL.CLIENT_CONTACTS a1 on a.CONTACT_ID = a1.CONTACT_ID
inner join FRATERNAL.MEMBER b on a1.CLIENT_ID = b.CLIENT_ID
inner join FRATERNAL.CLIENT c on a1.CLIENT_ID = c.CLIENT_ID
WHERE a.CONTACT_TYPE_ID in ('Email1')
AND b.MEMBER_NUMBER...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 20, 2010 at 6:48 am
mranganwa (1/19/2010)
Burn.After.Reading
:w00t:
Some of the recent questions might have been better marked "burn before reading"!
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 20, 2010 at 6:44 am
lmu92 (1/20/2010)
Gianluca Sartori (1/20/2010)
Gianluca Sartori (1/19/2010)
What are writing about, Paul?I started writing my first article 9 months ago and it isn't finished yet.:crying:
Well, I can say that I had a...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 20, 2010 at 5:52 am
Your character string - your query - is missing the closing quotation mark.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 20, 2010 at 5:48 am
Hey Gareth
The solution I've posted above works, but looking at it I can't help thinking of one of Jeff Moden's mantras - make it work, make it fast, make it...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 19, 2010 at 9:34 am
CREATE TABLE #wms_requirements
(
[warehouse] [char](2) NOT NULL,
[product] [char](20) NOT NULL,
...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 19, 2010 at 7:32 am
Hi Biz
Can you please run the following code and identify those rows which you call Duplicates?
I've rehashed the sample data so that it's now a temporary table.
-- Set up sample...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 19, 2010 at 5:53 am
Some articles are well worth reading twice.
I've spent all afternoon working for the first time with EXCEPT instead of the usual LEFT JOIN and checking for NULL, and it's taken...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 18, 2010 at 10:17 am
Kit G (1/18/2010)
Chris Morris-439714 (1/15/2010)
The UPDATE and the SET apply to the same table.
Ideally the first table listed after FROM is also the target of the update.
In your case,...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 18, 2010 at 8:24 am
Saravanan T (1/18/2010)
Is it possible to keep my database in RAM????
Having performance issues, Saravan? Can you go into some more detail please?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 18, 2010 at 7:17 am
Viewing 15 posts - 8,206 through 8,220 (of 10,143 total)