Viewing 15 posts - 631 through 645 (of 1,923 total)
This:
SELECT tr.practice_id,pr.practice_name
,tr.user_id,CONCAT(u.first_name,' ' ,u.last_name) AS 'User_Name'
,tr.doctor_id
,CASE WHEN tr.doctor_id...
September 15, 2011 at 11:25 pm
Like this?
DECLARE @StartDate DATETIME
, @EndDate DATETIME;
SELECT @StartDate = '08/01/2011' ...
September 15, 2011 at 9:38 am
or this?
; with cte as
(
SELECT distinct master_id, sub_id
FROM SlaveMarket
)
select * , outp.minval
from cte a
cross apply ( select MIN ( sales_price ) minval
...
September 14, 2011 at 9:48 pm
this?
; with cte as
(
SELECT master_id, sub_id , slave_price , ROW_NUMBER() over( partition by master_id , sub_id order by slave_price asc) AS slave_price_min
FROM SlaveMarket
)
select * from cte
where slave_price_min = 1
September 14, 2011 at 9:46 pm
Prasanthi Reddy (9/14/2011)
it's useful..thank you
just useful ?? not helpful ? 😀 did it solve ur problem ?
September 14, 2011 at 1:06 am
How about this?
declare @NumberOfRechargesLimit int, -- initialize it to the number of recharges you want to view; in ur case it is 10
...
September 14, 2011 at 12:28 am
Things look weird here 😀
Can you please explain what you trying to get out the queries. It sure can be modified, but i need some information to test my solution.
September 14, 2011 at 12:14 am
Need to see the definition of the function to optimize it 🙂
September 13, 2011 at 11:03 pm
btw, did my query solve ur query ? 😛
September 12, 2011 at 2:16 am
zaleeu (9/12/2011)
Nope, not homework. A newbie question 🙂Thanks for the help. This will help me a lot .
😀
Well ,good luck , then 🙂 happy to have been a point on...
September 12, 2011 at 2:14 am
freyes (9/12/2011)
The order and the TOP 1 does't mather.
Bro ( or sis 😀 ) , BOTH matters. TOP needs ORDER BY to give consistent result.Period.
September 12, 2011 at 2:07 am
This?
SELECT
Name = FD.Name
,Fruit1 = MAX ( CASE WHEN IL.FruitID = 1 THEN FN.FruitNames ELSE NULL END )
...
September 12, 2011 at 2:04 am
The rows returned by SQL will never be ordered. If you an ordered list, you MUST explicitly use ORDER BY clause. The behavior u are seeing is an classic example...
September 12, 2011 at 1:50 am
How many fruits can one Distributor sell?
September 12, 2011 at 1:47 am
This?
SELECT * , NEWRATE = t1.AMOUNT * t2.VALUE
from [Fact table] t1
inner join [Exchange Rate table] t2
on t1.CURRENCY = t2.FOREIGN_CURR
and...
September 11, 2011 at 1:24 am
Viewing 15 posts - 631 through 645 (of 1,923 total)