Viewing 7 posts - 1 through 7 (of 7 total)
The Following will exclude the undesired rows.
[highlight=""];WITH cte
AS
(
SELECT row_number() OVER(PARTITION BY GETDATE() ORDER BY date) AS row , * FROM #MyTable
)
SELECT * FROM cte A
WHERE isnull(( A.event + (SELECT...
May 19, 2010 at 5:58 am
well, I think I had put my comments before properly analysing the solution presented by others.
thanks for the showing the correct reasons.
September 15, 2009 at 12:41 am
well, I think I had put my comments before properly analysing the solution presented by others.
thanks for the showing the correct reasons.
September 15, 2009 at 12:38 am
Guys, what do you think about the solution presented below:
SELECT * FROM @UnitsTransacted A
left outer join@lookups B
on A.investorcode=B.[value] and B.description=@InvestorCode
where A.investorcode= isnull(@InvestorCode,A.investorcode) or B.description=@InvestorCode
September 14, 2009 at 6:00 am
I do not know why such a long query has been posted. it can be solved like this:
select * from vehicle_det A
where duehours= (select min(duehours) from vehicle_det where vehicle= A.vehicle)
--...
September 14, 2009 at 3:07 am
select A.tableAid , TrafficLightId, B.colour AS colour from #TableA A
inner join #TrafficLight B
on. A.TableAId=B.TableAId_Fk
where case compareoperator when '>' then A.value end > convert(varchar(20),compareoffset) OR
case compareoperator when...
July 13, 2009 at 1:52 am
INSERT INTO chief_product (name, description, price, sale_price, vendor_number, vendor_name, product_code, sortorder, type, showitem, parentid, children, new_date)
SELECT *
FROM OPENROWSET(BULK '\\path\bulk.csv', FORMATFILE='\\path\bulk_format.Xml', FIRSTROW = 2) as t1
inner join...
July 10, 2009 at 3:48 am
Viewing 7 posts - 1 through 7 (of 7 total)