Viewing 15 posts - 7,351 through 7,365 (of 10,143 total)
learningforearning (9/21/2010)
yuppyyy....finally someone understand me....will show this proof to my wife....:-D 😀 😀 😀
LOL but do you understand her? 😛
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
September 21, 2010 at 5:36 am
/*
Exampel table looks like this:
*/
DROP TABLE #Exampel
CREATE TABLE #Exampel ([id] INT, [from] NUMERIC(6,2), [to] NUMERIC(6,2), [procent] NUMERIC(6,2))
INSERT INTO #Exampel (id, [from], [to], procent)
SELECT 1, 0.00, 20.00, 7.90 UNION ALL
SELECT 2,...
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
September 21, 2010 at 5:17 am
cutecrazyguy (9/21/2010)
i've read your link chris, but don't get the point.
No problem Johan, here's a modified query to return the correct age.
-- solution
DECLARE @TodayDate DATE
SET @TodayDate = GETDATE() --...
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
September 21, 2010 at 4:22 am
A small modification and your query will run:
select PerName, PerBirthDate,
CASE
WHEN DateDiff(yy,PerBirthDate,GETDATE()) > 60 THEN 60
WHEN DateDiff(yy,PerBirthDate,GETDATE()) > 55 THEN 60
WHEN DateDiff(yy,PerBirthDate,GETDATE()) > 50 THEN 50
WHEN DateDiff(yy,PerBirthDate,GETDATE()) > 45...
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
September 21, 2010 at 4:00 am
cutecrazyguy (9/21/2010)
thx for the respon, i'll try it.would you mind if i ask more if there is unclear about this ?
Not at all Johan, if you're unsure about anything, just...
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
September 21, 2010 at 3:30 am
Use CASE:
-- make some sample data to test the solution
DROP TABLE #Personal
CREATE TABLE #Personal (
PerID INT IDENTITY(1,1),
PerName varchar (50),
PerBirthDate datetime,
PerSex char(1))
INSERT INTO #Personal (PerName, PerBirthDate, PerSex)
SELECT '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
September 21, 2010 at 3:07 am
John Rowan (9/20/2010)
CirquedeSQLeil (9/20/2010)
John Rowan (9/20/2010)
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
September 21, 2010 at 2:12 am
SJLee.Consulting (9/20/2010)
I have a large set of numbers in a list, but not in a table.
What exactly do you mean, "in a list, but not in a table"?...
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
September 20, 2010 at 10:19 am
Saravanan_tvr (9/20/2010)
Problem 1:
I have a table with 15 k rows of datam but when i upate the columns i got the below error,
Msg 511, Level 16, State 1, Line...
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
September 20, 2010 at 9:51 am
keith-710920 (9/20/2010)
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
September 20, 2010 at 9:07 am
Brandie Tarvin (9/20/2010)
dbowlin (9/20/2010)
Brandie Tarvin (9/20/2010)
Poodle-cat.Well, which is it?
Yes. @=)
Our cat got shaved for surgery, the entire torso. Legs, tail, and head still have fur. Hence: Poodle-cat.
It's very fun....
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
September 20, 2010 at 8:36 am
Nicking ColdCoffee's setup:
-- Declare a temp table to hold the file names inside a folder
DECLARE @FolderAndFiles TABLE
(
Sl_Number INT IDENTITY(1,1)...
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
September 20, 2010 at 7:47 am
Something like this?
(SELECT CASE WHEN min(PriorityID) = 16 THEN 0 ELSE min(PriorityID) END
FROM dbo.ServiceOrdersJobs...
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
September 20, 2010 at 7:31 am
Requirements
SELECT TOP 1 Convalesce = COALESCE(Sleep, Food, Drink)
FROM (
SELECT '12 hours' AS Sleep, CAST(NULL AS VARCHAR(15)) AS Food, CAST(NULL AS VARCHAR(15)) AS Drink UNION ALL
SELECT CAST(NULL AS VARCHAR(15)) AS...
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
September 20, 2010 at 5:27 am
GilaMonster (9/20/2010)
*drum roll**trumpet crescendo*
... and I think I'll leave things here for a little while.
Nice work, Gail - exactly Twenty Grand!
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
September 20, 2010 at 4:37 am
Viewing 15 posts - 7,351 through 7,365 (of 10,143 total)