Viewing 15 posts - 7,921 through 7,935 (of 10,144 total)
CREATE PROCEDURE USP_UPDATESAL
@DPID INT
AS
UPDATE Humans
SET SAL = CASE deptid
WHEN 10 THEN 40000
WHEN 20 THEN 38000
WHEN 30 THEN 10000
WHEN 40 THEN 0
WHEN 50 THEN -1
END
WHERE deptid...
May 14, 2010 at 3:43 am
There's a rumour circulating about a pole-dancing chipmunk
May 14, 2010 at 2:10 am
mbricker-600840 (5/13/2010)
tosscrosby (5/13/2010)
tyromancyI wonder how that works?
My wife is quite the lover of cheese. I wonder if that was involved in her choice of me as a mate.
We...
May 13, 2010 at 10:02 am
There might be some mileage in this too:
SET DATEFORMAT DMY
DROP TABLE #Temp
CREATE TABLE #Temp (Art CHAR(1), [Status] VARCHAR(3), [Date] DATE)
INSERT INTO #Temp (Art, [Status], [Date])
SELECT 'A', 'In', '10/10/2009' UNION...
May 11, 2010 at 6:07 am
turkey-500673 (5/10/2010)
May 11, 2010 at 2:00 am
mukherjee.subhro (5/10/2010)
I want to omit this cnt portion, if you have any suggestion then please sent me by tomorrow.
I think...
May 10, 2010 at 7:46 am
mukherjee.subhro (5/10/2010)
I mean what you have understood i.e. stripping the first 3 alphabet and taking only the numeric portion (i.e. year) . The output is in...
May 10, 2010 at 7:15 am
mukherjee.subhro (5/10/2010)
Please look at the image file that I have send with this reply,I have run as per your suggestion removing the typecast and it...
May 10, 2010 at 6:57 am
Try it without the CAST, change
SELECT empid,CAST(orderyear AS INT)AS orderyear,numorders
to
SELECT empid, orderyear, numorders
May 10, 2010 at 5:46 am
Tom.Thomson (5/10/2010)
RBarryYoung (5/9/2010)
tosscrosby (5/6/2010)
I apologize for my morbid-ness, but you have to admit that you probably learned a new word (I sure did!).For something totally different:
Callipygian
(how Jeff talks...
May 10, 2010 at 4:41 am
The simplest way is to avoid the calculation altogether;
c_new_PP = CASE WHEN oe_line.unit_price = 0 OR inventory_supplier.cost = 0 THEN 0 ELSE
(
(
(100 * inventory_supplier.cost * 1.1)
/ (
100.00000001 - (oe_line.unit_price...
May 10, 2010 at 4:40 am
There may be some mileage in this:
;WITH EnrollmentRollup AS (
SELECT
StudentID,
Summary = SUM(CASE ActionClass WHEN 'E' THEN 1 WHEN 'W' THEN -1 ELSE 0 END),
Actions = COUNT(*)
FROM #Enrollment
WHERE...
May 7, 2010 at 10:15 am
Paul White NZ (5/7/2010)
Tom Brown (5/7/2010)
It's the first time I've ever had to queue to vote.
I'm quite surprised no-one has challenged some of the very close results yet because...
May 7, 2010 at 9:24 am
Viewing 15 posts - 7,921 through 7,935 (of 10,144 total)