Viewing 15 posts - 1 through 15 (of 79 total)
Yes, a global temp table is an option. Just have to remember the concurrency issue - can't have multiple processes executing the code concurrently, or have different code using the...
December 18, 2008 at 7:37 am
sowmya.br (12/16/2008)
Only thing is i donot want to create #a like below
CREATE TABLE #a(
...
December 18, 2008 at 7:08 am
Use "left join" instead of "inner join" on the derived tables.
December 16, 2008 at 2:59 pm
How are you executing your simple TSQL to get the error? In an SSMS query window? I've seen this error when executing from a SQL Agent job because the SQL...
December 12, 2008 at 12:05 pm
select eno,DOB,Salary
from emp
where dt_log > '01/01/2008'
The query will not make use of an index on (eno, DOB, dt_log). Try it.
Perhaps you want to add to every table a new index...
December 9, 2008 at 9:20 am
I read that functions cannot return text datatype, at least in sql2000.
December 4, 2008 at 8:50 pm
It's not particularly simple to do that stuff. But here's a sample you can work with.
-- sample table and data.
declare @tbl table (id int, trans_desc varchar(20), trans_date datetime, trans_id...
December 3, 2008 at 8:12 am
The text datatype means this must be done procedurally, i.e. in a loop of some kind.
I'm not sure, but something like this may be more efficient outside of SQL...
December 2, 2008 at 4:53 pm
What is the max that will be concatenated, i.e. the destination column datatype? char(8000), varchar(max), text?
What version of SQL Server? SQL2005 and SQL2008 have more features related to this task.
December 2, 2008 at 12:22 pm
What version of SQL Server? SQL2005+ has some new stuff that helps will these kind of queries.
December 1, 2008 at 12:23 pm
I generally use TOP to do something like that. For example:
SELECT TOP 3
id,
desc,
trans_date
FROM
...
November 25, 2008 at 3:33 pm
I see what you're doing, David.
The WHERE clause uses a...
November 22, 2008 at 8:54 pm
David's answer works because he's using an old-fashioned cursor not a cursor variable. The old-fashioned cursors have a scope of the entire session; they don't go away until you deallocate...
January 10, 2007 at 7:11 am
All params are at least input params. The value of the param is passed from the calling routine into the stored procedure.
Only those with the OUTPUT flag are output params....
January 10, 2007 at 6:34 am
Using TOP with ORDER BY is a great idea. So simple.
However, I simplified my situation a little too much. There are actually other columns that govern the sort order...
May 23, 2005 at 2:06 pm
Viewing 15 posts - 1 through 15 (of 79 total)