Forum Replies Created

Viewing 15 posts - 46 through 60 (of 119 total)

  • RE: nulls in a table

    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...

  • RE: help with stored procedure

    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...

  • RE: help with stored procedure

    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...

  • RE: help with stored procedure

    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...

  • RE: update IIS Log table?

    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,...

  • RE: Space Available

    well, there's sp_spaceused

  • RE: Displaying Query Data Using Variable

    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...

  • RE: How to determine whether string is a number?

    very nice, thanks!

    Billy

  • RE: How to determine whether string is a number?

    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...

  • RE: Disappearing records

    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...

  • RE: Trigger - Can they be bypassed?

    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...

  • RE: syntax for updatetext

    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...

  • RE: SQL Help (first and last record)

    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...

  • RE: SQL Help (first and last record)

    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...

  • RE: Remove Leading Zeros

    Very nice, BrenBart and coondapoor!

    Edited by - bp on 08/29/2003 12:52:37 PM

Viewing 15 posts - 46 through 60 (of 119 total)