Viewing 15 posts - 61 through 75 (of 89 total)
Another option is to dynamically build the sql statement.
declare @sql varchar(2000)
set @sql='select * from tbl where id in (' + @idlist +')'
EXEC (@sql)
If the ids are...
May 4, 2004 at 2:02 pm
You can create the temp table outside of the procedure with the columns that are consistent between the two(or more) versions of the table. Then in the sp_magic procedure, you can...
May 3, 2004 at 3:30 pm
After the execution of the procedure, you can check @@ROWCOUNT
EXEC sp_columns @table_name='X', @column_name='YY'
IF @@ROWCOUNT>0
BEGIN
Insert code here
END
Brian
May 3, 2004 at 3:05 pm
I would first run SP_Who2 and see if a specific spid is using all of the CPU and memory. If one spid is clogging the system, then you can...
December 18, 2003 at 10:43 am
When you say the account works in Outlook, are you logged in with the same domain account as SQL? In Outlook, are you seeing the message bounce back as...
December 18, 2003 at 10:04 am
Have you tried running profiler to see what queries are running? Are any of those queries running over and over(infinite loop). You may also get some clues from...
December 18, 2003 at 9:59 am
Do you want to use one procedure to build a recordset that can then be used in a second procedure? If so, create the temp table before executing the...
December 10, 2003 at 1:15 pm
You could also try to move the records you want to keep into a temp table, truncate the real table, and then move the records back from the temp table.
select...
December 4, 2003 at 3:44 pm
If you use SET ROWCOUNT @variable, make sure you SET ROWCOUNT 0 after your query.
Brian
December 4, 2003 at 3:37 pm
I too answered incorrectly. Looking at the wording of the question("which of the following could be done") means both answers can be correct.
The fact the query runs every second...
November 21, 2003 at 7:50 am
There are 4 distinct combinations of intLandUseCode and intMixedLandUseCode.
intLandUseCode intMixedLandUseCode
-------------- -------------------
1 0
1 ...
November 20, 2003 at 10:35 am
Can you submit examples of the table structures and your views and update statements. Is there a reason you can't use a case statement in the update? Then...
November 20, 2003 at 10:25 am
You can select the results of the procedure into a global temp table.
create proc #temp as
select *
into ##so
from sysobjects
go
I can then
exec #temp
select * from ##so
drop table ##so
Brian
November 19, 2003 at 3:33 pm
Thanks to all for your replies.
I understand the ability to setup security within our systems. All of our users are to login with a read only user....
November 19, 2003 at 9:10 am
ISNULL will only return a second value if the first is NULL. If you need to expand on this, you will want to use COALESCE. It will return...
November 17, 2003 at 3:19 pm
Viewing 15 posts - 61 through 75 (of 89 total)