Viewing 15 posts - 7,351 through 7,365 (of 10,144 total)
ColdCoffee (9/21/2010)
Chris Morris-439714 (9/21/2010)
Edit: Oops, ColdCoffee beat me to it.
Ah , never CM.. i always enjoy reading through your innovative ideas of solving questions, makes me learn a lot.. i...
September 21, 2010 at 5:42 am
learningforearning (9/21/2010)
yuppyyy....finally someone understand me....will show this proof to my wife....:-D 😀 😀 😀
LOL but do you understand her? 😛
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,...
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() --...
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...
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...
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...
September 21, 2010 at 3:07 am
John Rowan (9/20/2010)
CirquedeSQLeil (9/20/2010)
John Rowan (9/20/2010)
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"?...
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...
September 20, 2010 at 9:51 am
keith-710920 (9/20/2010)
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....
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)...
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...
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...
September 20, 2010 at 5:27 am
Viewing 15 posts - 7,351 through 7,365 (of 10,144 total)