Viewing 15 posts - 5,401 through 5,415 (of 10,144 total)
-- A numeric column will sort numerically.
-- This column is character and will sort alphabetically
-- so you have to work around it. Here's one way.
;with cte as
(
select '1' as...
October 13, 2012 at 2:20 am
Don. (10/12/2012)
I'd like to get the join the tables, but only show the most recent record in History.
How would I join...
October 12, 2012 at 9:57 am
Cadavre (10/12/2012)
ChrisM@Work (10/12/2012)
ps Craig, if you're in the Hob at 6.15, I'll buy you a pint 😉
That the one on Broad Street? I'm in the process of moving house, we...
October 12, 2012 at 9:52 am
Here are the timings from a slender 1 million row Periods table, with an ordinary index on startdate:
========== CADAVRE ==========
Table 'Worktable'. Scan count 1, logical reads 254686, physical reads 0,...
October 12, 2012 at 9:29 am
Cadavre (10/12/2012)
...
Looking at the results suggests to me that I did something wrong in the testing 😀
If not though, then the huge difference is...
October 12, 2012 at 8:28 am
Cadavre (10/12/2012)
October 12, 2012 at 7:25 am
mamzy.rahman (10/12/2012)
October 12, 2012 at 6:53 am
nitin.varshney (10/12/2012)
Please tell me which is better for the performance impact ?
1. Insert into #temp table Using the cross join with tables.
2. Insert into #temp table using the while...
October 12, 2012 at 6:39 am
Cadavre (10/12/2012)
Not a clue about...
October 12, 2012 at 6:35 am
Cadavre (10/12/2012)
Would this work for...
October 12, 2012 at 6:28 am
This is quite a bit different to Craig's, it would be interesting to discover the performance of them both:
SELECT s.*,
ID= CASE WHEN x.lag < y.lag THEN x.ID ELSE y.ID...
October 12, 2012 at 6:26 am
Can you post the code, Mahesh? Also, if you can, the actual execution plans?
October 12, 2012 at 3:50 am
deepika_goyal (10/11/2012)
Hello!!,NO body has replied on thiss.
Please give some suggestion.
Thanks!!
Hello
You are likely to get a much faster response if you provide DDL for your sample data. Here's your 'master' table,...
October 12, 2012 at 3:49 am
Here's a guess based upon the information folks have already extracted from the OP:
--test ddl
DROP TABLE #sales_log
CREATE TABLE #sales_log (member_id varchar(50),company_id varchar(50),purchase_dt datetime,purchase_amt money)
insert into #sales_log(member_id,company_id,purchase_dt,purchase_amt)
select 'Jen9921', '222141','1/2/2011','11.99' union...
October 12, 2012 at 2:02 am
Yes, in a limited sense. Check out Plan Guides in BOL.
October 9, 2012 at 10:23 am
Viewing 15 posts - 5,401 through 5,415 (of 10,144 total)