Viewing 15 posts - 46 through 60 (of 64 total)
That's pretty awesome query... have to try it out though...
Thanks a lot for your time!
September 16, 2009 at 1:08 am
Thanks Pyay, almost what I want. With your query I get this:
1 10.00 10.00 2009-06-02 00:00:00.000
1 10.00 15.00 ...
June 18, 2009 at 6:38 am
Hey, of course this are sample data 🙂
Maybe this is better representation of actual data:
if object_id('tempdb..#temp') is not null drop table #temp
create table #temp (item varchar(10), price1 money, price2 money,...
June 18, 2009 at 5:25 am
I see I wrote incorrect result in my first post, now it is correct.
Christopher and Pyay, your query returns only distinct sets of item, price1 and price2. That's not ok...
June 18, 2009 at 3:56 am
With 'ordered by date desc' I mean that if there are two rows with same data (item, price1 and price2), then the returned row should be the one with greater...
June 18, 2009 at 3:19 am
The only reason I see why somebody would need this kind of comparison is solving some of the problems from Project Euler/[/url]. There are a lot of problems involving combinations...
June 4, 2009 at 12:35 pm
Thanks, that explains a lot. It looks like I have to learn execution plans prior to indexes... now I am studying Execution plans on SQL in the Wild, nice and...
June 4, 2009 at 11:28 am
Maybe you can create a view based on your query and then select data from it?
June 4, 2009 at 7:44 am
OK, I removed unique constraint on Customer table.
Ramesh, you're right, I will change it back, it is more readable that's way 🙂
This is my own Project for learnign purposes (IS...
May 31, 2009 at 3:26 am
Thanks for your reply, I changed my code, hope it is OK now:
create table [Country](
[CountryID] int identity(1,1) not null,
[Country] varchar(50) not null,
...
May 31, 2009 at 2:07 am
I think you can use breakpoints in SQL Server 2008.
In 2005, no.
March 13, 2009 at 6:41 am
You can put 'print' commands in SP, run SP and watch for output (in Management Studio)
Or use xp_logevent in SP for writing to eventlog
Or insert data inside of SP into...
March 13, 2009 at 6:34 am
Try something like this:
select last_user_update
from sys.dm_db_index_usage_stats
where database_id = db_id( 'databasename' )
and object_id = object_id('tablename')
March 11, 2009 at 8:42 am
Viewing 15 posts - 46 through 60 (of 64 total)