Viewing 15 posts - 6,616 through 6,630 (of 10,144 total)
Never miss a (nearly) free opportunity to gather some information:
SELECT Result = NULLIF(COUNT(*),0) FROM atable
October 12, 2011 at 6:55 am
Use an output parameter. Set the value of the output parameter to the number of rows returned by the SELECT. Interpret the parameter at the client side.
October 10, 2011 at 7:25 am
sonymadhu (10/10/2011)
I am new to this site actually, thats the problem..
Just i followed how i post queries in other sites juz did the same here also..
at last i got...
October 10, 2011 at 6:56 am
The most logical way to do this is like so:
SELECT
OSLP.SlpName AS [Salesperson],
invoice.,
d.*,
i.*
FROM OSLP
LEFT JOIN (
SELECT
OINV.SlpCode,
OINV.CardCode AS [Cust ID],
OINV.CardName AS [Customer],
SUM(INV1.LineTotal) AS [Sales]
FROM...
October 10, 2011 at 6:53 am
sonymadhu (10/10/2011)
I have a requirement like in my sample table
there are empid, firstname, lastname, salary, date joined.
Now in Sample table i want only the list of all duplicate records...
October 10, 2011 at 6:32 am
shivendrakumaryadav60 (10/7/2011)
Actually when we perform "TOP" for table having very large
row set (50000 or More) ;than "TOP" gives performance issue. It happens because according to sql architecture...
October 7, 2011 at 7:59 am
Jakub Dvorak (10/7/2011)
...I need to update Vals without recursion or cursor or loops...
Why not? This is a running totals update. The fastest way to do it is a quirky update,...
October 7, 2011 at 7:45 am
SELECT SUM(Agg) as [Agg]
From
(
select
id,
rn = ROW_NUMBER() OVER(ORDER BY id)
from @testing
) dt WHERE rn < 11
October 7, 2011 at 7:22 am
Here's an interim solution for you. It's horribly inefficient however, I'm working on a second more efficient version.
DROP TABLE #ROCdata
CREATE TABLE #ROCdata (ID INT NOT NULL, Symbol_Code VARCHAR(12), Transaction_date DATE,...
October 6, 2011 at 2:01 am
jared-709193 (10/4/2011)
CREATE TABLE #Tablename...
October 4, 2011 at 8:19 am
nigel. (10/4/2011)
skra (10/4/2011)
I am surprised that anyone is still reading it since it was published in february 2008 🙂It is the "Featured Script" in todays news letter.
What's "today"?
By Rafal Skotak,...
October 4, 2011 at 3:23 am
Try option (MAXRECURSION 0).
This is by far the slowest of the CTE-based row (number) generation methods but as your code shows it's very easy to manipulate rCTE's to generate quite...
October 4, 2011 at 2:53 am
jared-709193 (10/3/2011)
ChrisM@home (10/3/2011)
komal145 (10/3/2011)
I have table T11234
And table T2
3456
And my result set should be
123456
Is there any way other than union?
Yes, several, but union (without ALL) would be best. Why...
October 4, 2011 at 2:33 am
...What will i do for that. ? ...
Post the execution plan.
October 4, 2011 at 1:58 am
sushilb (10/3/2011)
as below
select ID,
...
October 4, 2011 at 1:56 am
Viewing 15 posts - 6,616 through 6,630 (of 10,144 total)