Viewing 15 posts - 46 through 60 (of 119 total)
Run the following code produced from below:
SELECT 'SELECT ''' + COLUMN_NAME + ''', COUNT(*) FROM ' + TABLE_NAME + ' WHERE ' + COLUMN_NAME + ' IS NULL;'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE IS_NULLABLE...
October 16, 2003 at 2:56 pm
Ok... thanks for everyone's responses. However, for discussion purposes, I don't think using the LIKE operator for the optional parameters is not entirely sufficient. What would you do...
October 16, 2003 at 11:25 am
Thanks... just wondering you would consider piecing together the sql statement and running it. I tried it and it appears to execute a lot faster. Below is...
October 15, 2003 at 6:06 pm
Actually, I only want to select records where last name is "Ringer". It does not matter what the first name is. I can't leave out first name parameter...
October 15, 2003 at 2:54 pm
I see... thanks... the query cost of option 1 is 15% compared to 85% of option 2...
USE TEMPDB
GO
SET NOCOUNT ON
CREATE TABLE TABLE_A(THE_ID INT NOT NULL IDENTITY(1,1) CONSTRAINT PK_TABLE_A PRIMARY KEY,...
October 14, 2003 at 12:26 pm
You need to piece together the sql statement and then execute it as shown below:
HTH
Billy
ALTER PROCEDURE dbo.TestTableName
(
@TableName nvarchar(32)
)
AS
begin
declare @SQL_STMT VARCHAR(4000)
SET @SQL_STMT = 'SELECT * FROM ' + @TableName + ';'
exec...
October 14, 2003 at 11:58 am
very nice, thanks!
Billy
October 10, 2003 at 8:46 pm
Thanks Jonathan.
I actually never thought that 4d4 would evaluate to a number. For me, '4d4' evaluates to only 4. Totally bizarre. I wonder if it is a...
October 10, 2003 at 7:40 pm
Thanks NPeeters for your response.
Nope, the additions are part of the transaction but I don't think they were rolled back because there are no gaps in the identity column (for...
September 30, 2003 at 3:42 pm
Also, altering table to disable to trigger means that you need to have sufficient permissions to do so. If your application can only read or write data, then disabling...
September 26, 2003 at 1:20 pm
Look up REPLACE in BOL. It should do the trick. See below:
--- cut here ---
DECLARE @agency TABLE(footer varchar(8000))
INSERT INTO @agency(footer) VALUES('<TABLE BGCOLOR=''#CCCCCC'' BORDER=0><TR><TD>Do you</TD><TR></TABLE><TABLE BORDER=0><TR><TD>mean</TD><TR></TABLE><TABLE BGCOLOR=''#CCCCCC'' BORDER=0><TR><TD>like this?</TD><TR></TABLE>');
INSERT INTO...
September 23, 2003 at 10:43 pm
I found another way too!
It combines Johnathan's and David's methhod...Johnathan's method includes employees that don't have orders and David's method requires less resources to execute.
SELECT E.EMPLOYEEID, (select freight from orders...
September 23, 2003 at 12:40 pm
Thanks Jonathan but it is not what I am looking for.
Min(OrderDate) and Max(OrderDate) only works if you assume that Northwind does not pre-date or post-date their orders, which or may...
September 22, 2003 at 5:19 pm
Very nice, BrenBart and coondapoor!
Edited by - bp on 08/29/2003 12:52:37 PM
August 29, 2003 at 7:35 am
Viewing 15 posts - 46 through 60 (of 119 total)