Viewing 15 posts - 616 through 630 (of 1,923 total)
kishoremania (9/28/2011)
Can I know why you used rank() for max_b and row_number() for max_c?
For every value in A, i am using RANK to calculate the highest B , so i...
September 28, 2011 at 2:41 pm
bkubicek (9/28/2011)
kishoremania (9/28/2011)
10 1 1
10 1 2
10 2 1
10 2 2
10 3 1
10 3 2
11 1 1
11 1 2
11 2 1...
September 28, 2011 at 1:20 pm
How about this?
declare @test-2 table ( a int, b int, c int )
insert into @test-2 ( a, b , c)
select...
September 28, 2011 at 1:19 pm
Can you please expand further on how you arrived at your desired result ? i am kinda stuck in understanding the requirement. Should we find the highest profit for Deal...
September 26, 2011 at 9:58 pm
Yuri55 (9/26/2011)
Probably:select id, type from myTbl where id in (select id from myTbl where type ='A')
if I did not miss something
That will give you all the rows that has A...
September 26, 2011 at 12:23 pm
Thanks Gian for the wonderful set-up.
SELECT *
FROM (
SELECT *
, cnt = COUNT(*) OVER(PARTITION BY strategy_ID)
, RN = ROW_NUMBER() OVER(PARTITION BY strategy_ID ORDER BY efct_start_dt DESC)
...
September 26, 2011 at 10:00 am
Write a CLR proc to find the windows tasks, summon that CLR in ur SQL 🙂
September 26, 2011 at 1:08 am
tina 77078 (9/19/2011)
September 19, 2011 at 6:01 pm
LutzM (9/19/2011)
ColdCoffee (9/19/2011)
tina 77078 (9/19/2011)
Thanks Lutz, my new BFF..can i be ur BFF also ?? :ermm:
Hey folks,
just keep in mind, this is still a professional SQL Server site. 😎
U...
September 19, 2011 at 4:25 pm
ajenawsu (9/19/2011)
SELECT 1 AS EncID, 'OB Visit' AS 'Category' UNION ALLSELECT 2 AS EncID, 'Other' AS 'Category' UNION ALL
SELECT 3 AS EncID, 'Dental Visit' AS 'Category' UNION ALL
SELECT 4 AS...
September 19, 2011 at 4:24 pm
Lowell (9/19/2011)
with stg_reporting([column 5])
AS (
SELECT '[jobname] [RPP] Info: [RPP]...
September 19, 2011 at 3:39 pm
This:
DECLARE @Tab TABLE
( [Column 5] VARCHAR(200) )
INSERT INTO @Tab
SELECT '[jobname] [RPP] Info: [RPP] Job processed 0, Success: 0, Error: 0.'
UNION ALL SELECT...
September 19, 2011 at 3:18 pm
tina 77078 (9/19/2011)
Thanks Lutz, my new BFF..
can i be ur BFF also ?? :ermm:
September 19, 2011 at 2:57 pm
it requires more than the switches to capture the information from a query to be passed to sqlcmd, i think..
September 16, 2011 at 10:03 pm
Lowell (9/16/2011)
be sneaky and create it in tempdb database itself, then you can still use it:
Wont objects in tempdb get dropped when the server restarts ?
< i dint read...
September 16, 2011 at 10:02 pm
Viewing 15 posts - 616 through 630 (of 1,923 total)