Viewing 15 posts - 151 through 165 (of 441 total)
winston Smith (10/16/2009)
its
select max(OrderID),OrderStatus from #orderline
group by OrderStatus
I was trying joins and subqueries and a...
October 16, 2009 at 7:57 am
What do you mean Top 1 by status? What is the desired output, how can we choose which of the row to return by status? Do you want the latest,...
October 16, 2009 at 7:43 am
What type of file are you using? I know I had problems in the past, when trying to read tab delimited files, so here's what I've come up with:
I read...
October 14, 2009 at 11:59 am
Well then, don't use the variable, it was only for the demo. Use your column name instead, and select it directly from your table.
October 14, 2009 at 5:14 am
Does this help?
DECLARE @STR NVARCHAR(10)
SET @STR = 'ABCDEFGHI'
SELECT substring(@str, 1, len(@str) - 3) + ' ' + right(@str, 3)
October 14, 2009 at 4:46 am
Ok, first, you have several indexes that use the column fCompanyID as the first indexed column, and that includes different columns along with them. That is useless if your clustered...
October 13, 2009 at 2:21 pm
You are in sql2005? Click include actual plan, in the toolbar, and right click the execution plan, save as, and add to a zip, to post here, we will be...
October 13, 2009 at 1:42 pm
How many rows is returned, of the 300 000 rows, and, why do you call it so much, is there a possibility to return all rows at once, so the...
October 13, 2009 at 1:09 pm
Well, Happy to have helped, I wasn't so sure of the requirement, seeing how only the top clause was missing! 😀
Have a nice day,
October 7, 2009 at 10:52 am
2Tall (10/7/2009)
The basic query is...
October 7, 2009 at 9:47 am
Hi,
I am not aware of a technique to completely cache the results of a query. Here's what I suggest you though:
1. Post the query with the DDL of the tables,...
October 5, 2009 at 10:55 am
Grant Fritchey (10/2/2009)
repent_kog_is_near (10/1/2009)
October 2, 2009 at 12:08 pm
riga1966 (10/2/2009)
Bingo!Thanks a lot Garadin!
Blehh... well thanks! Hehe! :hehe:
October 2, 2009 at 6:58 am
Well, if you really want to use the exists clause, you need to add a condition with the first table #T1.
Here's how you can do it:
SELECT *
FROM #t1
WHERE...
October 1, 2009 at 2:18 pm
Hi Mike, there is no "Easy" way of doing this through SSMS, but here's what I've recently seen in use on a production environment:
You can use the SQLCmd mode (Query...
September 29, 2009 at 8:56 am
Viewing 15 posts - 151 through 165 (of 441 total)