Forum Replies Created

Viewing 15 posts - 15,736 through 15,750 (of 18,923 total)

  • RE: Remove Zero

    Finally a simple way .

    Tx.

  • RE: Query to Get Image data type

    I'm not gonna ask why... but this will be a performance killer :

    create table Test(MetaInfo image)

    insert into dbo.Test (MetaInfo) values('True')

    Select cast(cast(MetaInfo as varbinary(50)) as varchar(50)) as MetaInfo from dbo.Test

    --True

    DROP...

  • RE: Dynamic record counting

    NP, it seems bigger than it really is. The package has only 1 step that runs in less than a sec on my pc (very few columns allow nulls...

  • RE: UPDATE with subqueries in WHERE clause?

    This syntaxe is just forbidden : UPDATE Contacts AS C

    You must use the as in the from clause. And yes my query will run much faster

  • RE: Performance tuning

    dbcc dropcleanbuffers

    dbcc FREEPROCCACHE

  • RE: UPDATE with subqueries in WHERE clause?

    UPDATE C

    Set C.fkClientLocationID = P.fkClientLocationID

    FROM dbo.Contacts C inner join dbo.Project P on P.fkContactID=C.pkContactID

  • RE: UPDATE with subqueries in WHERE clause?

    Can't test the query from here, but it should be pretty close :

    UPDATE C

    Set C.fkClientLocationID = P.fkClientLocationID

    FROM dbo.Contacts inner join dbo.Project P on P.fkContactID=C.pkContactID

    Why exactly do you want to...

  • RE: computed column references

    Not for me because I always prefix my functions name with fnFunctionName .

    It could be a problem. Maybe a check that joins...

  • RE: Remove Zero

    The numbers table is used as a sequence table. It should not be merged with your actual data.

  • RE: computed column references

    I don't think so because I think that the definition is rewritten to include the column name between brackets so DBO.ColumnName(AlsoAColumnName) would become DBO.ColumnName([AlsoAColumnName]) and the script would pick only...

  • RE: Remove Zero

    Please post the actual table definition (create script). I'm not doing this 2 more times.

  • RE: Dynamic record counting

    This is a multi part package

    First execute this in QA :

    IF Object_id('ListTableColumns_NotNulls') > 0

     DROP FUNCTION ListTableColumns_NotNulls

    GO

    IF Object_id('TablesColumnsNulls') > 0

     DROP TABLE TablesColumnsNulls

    GO

    IF Object_id('TablesColumnsNulls_Insert') > 0

     DROP PROCEDURE TablesColumnsNulls_Insert

    GO

    CREATE FUNCTION dbo.ListTableColumns_NotNulls (@TableID...

  • RE: Remove Zero

    The insert part is just for sample data to test the code.

  • RE: Remove Zero

    Declare @A table (id int identity(1,1) primary key, Name varchar(15), NewCol varchar(15))

    Insert into @A (Name) values ('0002L')

    Insert into @A (Name) values ('0011A')

    Insert into @A (Name) values ('0027')

    Insert into @A (Name)...

Viewing 15 posts - 15,736 through 15,750 (of 18,923 total)