Viewing 15 posts - 151 through 165 (of 238 total)
IF <condition>
<code block>
ELSE
<another code block>
where <code block> is either one statement or block as below:
BEGIN
<some code>
END
January 23, 2003 at 6:12 pm
Greg, anybody can drop a temp table as long as that user can see it. Of course, you should use #tbl, not ##tbl. By using ## you would make it...
January 23, 2003 at 2:59 pm
In addition to everything said so far (use index!), check if you have foreign keys pointing to this table from other tables or if there are DELETE triggers on the...
January 23, 2003 at 1:32 pm
If you really need to keep the view, in your stored procedure create a temp table, insert into that table by selecting from the view, then do your joins against...
January 23, 2003 at 1:07 pm
Of course, it is possible to avoid cursors. However I cannot figure out how you built the second table. Could you be more specific? What was the pattern?
January 23, 2003 at 10:43 am
From the Enterprise Manager, selct the database desired, click on Tools, then Generate SQL Scripts. You will see from there.
January 22, 2003 at 6:41 pm
IF EXISTS( SELECT 1 FROM sysobjects WHERE name = 'table_name' AND type = 'U' ) ...
Type 'U' is for User-defined table.
Alternatively, you could use the SCHEMA object.
Edited by - mromm...
January 22, 2003 at 6:36 pm
There are several ways. The best from the perfomance viewpoint is to use bcp utility. If you need to call it from a stored procedure, then execute xp_cmdshell 'bcp...'....
January 22, 2003 at 3:02 pm
To set the memory configuration values for SQL Server right-click on the server in EM, go to Properties and open the Memory tab. You'll see the options there.
January 20, 2003 at 4:49 pm
I have not done it but may be
@server=123.456.789.012:9876
where 123.456.789.012 is the IP and 9876 is the port number?
January 20, 2003 at 1:44 pm
I know you can use CASE in SELECT, WHERE, ORDER BY and possibly HAVING clauses. The rule is the same as with other operators like +, -, etc. I think...
January 20, 2003 at 11:54 am
IF @@ERROR should be placed after EACH statement involving changes to the database. If your error handling practice is consistent and correct, it will work well. I am talking from...
January 18, 2003 at 11:36 am
Do not forget that each row has an overhead of about four bytes (forgot the exact number). Also, if you have indexes, add those up.
Some tools (ERwin is one) can...
January 17, 2003 at 6:11 pm
DISTINCT in the second query might be causing the difference.
Edited by - mromm on 01/17/2003 6:06:37 PM
January 17, 2003 at 6:06 pm
Here is what you actually need to be using in a trigger:
IF UPDATED( ColumnName ) ...
January 16, 2003 at 5:33 pm
Viewing 15 posts - 151 through 165 (of 238 total)