Viewing 15 posts - 26,401 through 26,415 (of 59,102 total)
mehfuz.khaled (7/20/2013)
Anyways, I have one table as follows:
table mastertab(
op INT,
msisdn VARCHAR (12),
imei VARCHAR (20)
);
Sample...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 20, 2013 at 5:33 pm
kapil_kk (7/20/2013)
you can try this-
;WITH CTE AS(
select op,imei, DENSE_RANK() over (order by op,imei) rankno
FROM mastertab
)
select c.op, COUNT(distinct rankno) - 1 cnt
FROM CTE c
GROUP BY c.op
Try with this data and...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 20, 2013 at 5:10 pm
Still and considering the very common configuration of the WHERE clause the OP gave, the methods in the "Catch All Query" article that Sean posted will probably fit the bill.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 20, 2013 at 4:42 pm
rahulraghvn (7/20/2013)
CTE, temp table with index or table variable... which one is more performant?
None of the above. Use the XML method that was posted.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 20, 2013 at 4:39 pm
mikej 14403 (7/20/2013)
After creating a csv file, importing it into a Excel spreadsheet and finally importing it into a SQL table I notices white...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 20, 2013 at 4:35 pm
I found the opposite to be true in some cases. You really really need to be careful that you don't end up with a "Tower of Babel" when hiring...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 20, 2013 at 4:11 pm
Adi Cohn-120898 (7/9/2013)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 20, 2013 at 1:47 pm
kevaburg (7/19/2013)
Steve-3_5_7_9 (7/10/2013)
kevaburg (7/9/2013)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2013 at 7:28 pm
Eugene Elutin (7/19/2013)
Permissions
The minimum permission required is ALTER on table_name. TRUNCATE TABLE permissions default to the table owner, members of the sysadmin fixed server...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2013 at 6:44 pm
Miles Neale (7/19/2013)
I had not seen this previously when it was posted on the site. It is great -> Thanks!
Thanks for the feedback, Miles. I appreciate it. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2013 at 11:53 am
j-1064772 (7/19/2013)
Yet another sterling article!
I do not even need all the fingers on one hand to count the authors I have occasionally corresponded with.
You definitely stand out among the crowd.
And...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2013 at 11:50 am
If I'm looking at your problem correctly, the following article should help...
http://www.sqlservercentral.com/articles/T-SQL/94570/
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2013 at 8:03 am
Luis Cazares (7/19/2013)
udayroy15 (7/19/2013)
Think export the table in xls then import it .........is the best solutionAre you crazy?
BWAAA-HAAA!!!! (Sorry, did that come out loud?)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2013 at 7:51 am
IgorMi (7/19/2013)
Hi Jeff,Another useful article, Thank You!
I repeated your work on my machine and the improvement was between 1.5 and 1.7 times.
Regards,
IgorMi
Thank you for the great feedback and the timing...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2013 at 7:36 am
Geoff A (7/19/2013)
fregatepallada (7/19/2013)
-- Current date
DECLARE @d DATETIME = GETDATE();
SELECT FORMAT( @d, 'dd MMM yyyy', 'en-US' ) AS...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2013 at 7:25 am
Viewing 15 posts - 26,401 through 26,415 (of 59,102 total)