Viewing 15 posts - 14,761 through 14,775 (of 14,953 total)
One of the articles on the front page of the site today, about running totals and ranking functions, has an answer that might work for you.
Insert into a temp table,...
January 31, 2008 at 2:00 pm
I disagree with the point about the transactions.
Dictionary definition of "valid": "well based or logical" (Compact Oxford English Dictionary, as referenced on http://www.onelook.com).
Doing a transaction and rollback on a table...
January 31, 2008 at 12:17 pm
JMSM (1/28/2008)
I cant understand what changes do you want to make, the code that i changed give me errors when executing query. Was...
January 29, 2008 at 7:32 am
Bryansky (1/29/2008)
just curious,... why K. Brian Kelley's user level is "Keeper of the Duck"? I didn't see that one in the level list... 😛 :hehe:
Sounds like a joke on some...
January 29, 2008 at 7:25 am
I definitely think dynamic SQL is your best option here.
If you really, really don't want to do that, and have only a limited number of sort options, then If...Else might...
January 29, 2008 at 7:20 am
I've tested Except vs Left Outer Join, and end up with nearly the same execution plans. Only difference is the Left Outer Join had a "Filter" in it, and...
January 28, 2008 at 3:28 pm
The only solution I can easily think of is write to a log file instead of a log table. Rollback won't "unwrite" the log file.
January 28, 2008 at 3:07 pm
If you're doing this in T-SQL, the only way I know of to do this is use xp_CmdShell to insert a list of the file names into a temp table,...
January 28, 2008 at 2:58 pm
Dynamic SQL is usually the easiest solution for this, unless you have a very limited set of options. Using a CASE statement in your Order By clause works, but...
January 28, 2008 at 2:53 pm
insert into Actor
default values
If you want more than one at at time:
set nocount on
insert into Actor
default values
go 100
Will insert 100 rows. Change the 100 to whatever number you want.
January 28, 2008 at 2:34 pm
Instead of Not In, I recommend a left outer join.
"AND tb4.ID NOT IN (SELECT DISTINCT tb7.ID
FROM Tbl_Tmp_Trace tb7
WHERE tb7.Estadoid = 3094610094
AND tb7.Tipo = N'Chamadas')"
Replaced with (in the From clause):
"left outer...
January 28, 2008 at 9:19 am
select *
from Table1
inner join Table2
on Table1.Column1 = Table2.Column2
Put your table names and column names into this.
January 27, 2008 at 9:38 am
I'm looking at the query, and it looks like it could be simplified. Can you provide the table structure and a couple of rows of sample data, for the...
January 25, 2008 at 2:02 pm
Viewing 15 posts - 14,761 through 14,775 (of 14,953 total)