Viewing 15 posts - 8,941 through 8,955 (of 10,143 total)
Had to Google it Seth, movies take a while to cross the pond...but "a butler who takes an odd interest in feet" - GF might find that very amusing:)
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 8, 2009 at 9:06 am
Garadin (1/8/2009)
john g (1/8/2009)
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 8, 2009 at 8:56 am
Integrate it into the body of your query, something like this:[font="Courier New"]SELECT DISTINCT
view_leveranciers.LEV_ID,
view_leveranciers.ADR_NAAM,
view_leveranciers.ADR_TEL,
view_leveranciers.PAR_NED AS FirmaNaam,
view_leveranciers.ADR_ID,
view_leveranciers.ADS_ID,
TOEDETAIL.TSD_ARTNR_LEV,
...
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 8, 2009 at 8:54 am
john g (1/8/2009)
Lookup the ROW_NUMBER function in BOL. It should do the trick for you.jg
Might take a while to find it in BOL for SQL2k!
This looks like a candidate...
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 8, 2009 at 8:14 am
Your assumptions were spot on, AL.
Thanks for the feedback.
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 8, 2009 at 7:45 am
DECLARE @Startdate DATETIME, @Enddate DATETIME
SELECT @Startdate = DATEADD(dd, DATEDIFF(dd,0,GETDATE()), 0), -- 2009-01-08 00:00:00.000
@Enddate = DATEADD(dd, 1, @Startdate) ...
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 8, 2009 at 7:36 am
Look up CASE in BOL.
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 8, 2009 at 7:20 am
eddy (1/8/2009)
SUM(CASE WHEN Code = 101 THEN verkoop ELSE 0 END) AS Price1,
...
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 8, 2009 at 6:27 am
Try this, eddy:SELECT tsd_id,
SUM(CASE WHEN Code = 101 THEN verkoop ELSE 0 END) AS Price1,
SUM(CASE WHEN Code = 102 THEN verkoop ELSE 0 END) AS Price2,
SUM(CASE WHEN Code =...
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 8, 2009 at 5:39 am
nabajyoti.b (1/8/2009)
DECLARE @columnx FLOAT, @columny nvarchar(2)SELECT @columnx = 0.05, @columny = 'A'
SELECT @columny + STR(@columnx*100, 6,2) + '%'
displays A 5.00% which is having 2 spaces in...
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 8, 2009 at 4:35 am
Well done Richard, top work.
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 8, 2009 at 4:12 am
DECLARE @columnx FLOAT, @columny nvarchar(2)
SELECT @columnx = 1, @columny = 'A'
SELECT @columny + convert(varchar(5),@columnx*100.00) + '%',
@columny + STR(@columnx*100, 6,2) + '%'
Output:
-------- ---------
A100% A100.00%
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 8, 2009 at 4:01 am
if @asofdate = @priormonthdate and TimClosestatus = 'C'
What's 'TimClosestatus'? Where does it come from?
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 8, 2009 at 2:50 am
Richard, what are the results of the following two queries?
SELECT book_date as Job_Date, COUNT(*)
FROM dbo.Job
WHERE book_date IS NULL OR book_date = '1899-12-30 00:00:00.000'
GROUP BY book_date
SELECT [datetime] as Manifest_Date, COUNT(*)
FROM dbo.Job
WHERE...
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 8, 2009 at 2:37 am
anu (1/7/2009)
I didn't understand how to use sub-query for my query.
Can you help.
Also, the above query doesn't get me the desired...
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 7, 2009 at 2:30 pm
Viewing 15 posts - 8,941 through 8,955 (of 10,143 total)