Forum Replies Created

Viewing 15 posts - 16 through 30 (of 87 total)

  • RE: SP wildcard

    There are multiple ways of doing this ....

    1) Simple Null check in the where clause

    2) Dynamic SQL

    Since the query in question is not so huge i guess we can...

  • RE: Tweaking the SQL Script

    Hi Deb,

    I was getting NULL for some of the tables when i ran the script on my DB. But when i tried this

    ISNULL( (SELECT rows FROM sqldev.workshop.dbo.sysindexes               ...

  • RE: Trigger to insert data into a notepad

    I assume you are talking about writing some details to a text file. Try this ...this is from BOL.

    E. Write variable contents to a file

    This example writes the contents...

  • RE: Tweaking the SQL Script

    Sorry a Heap is a table without a CLUSTERED Index. missed that important detail.

    Cheers!

  • RE: Tweaking the SQL Script

    1. SysIndexes system table will contain the number of rows for each table in the db. Existence of indexes is not a factor.

    rows will be populated against the row with...

  • RE: Sending thousands of e-mails from SQL Server

    Our application sends about 15 - 20 k emails each day and it does it pretty smoothly ...Not many glitches

    We have a...

  • RE: Delete taking too long

    As Brian and Tony pointed out, try disabling this constraint before deleting the records. Another way maybe to delete the records in batches of say 500 or 1000. Check it...

  • RE: SQL Schema Diagrams

    I dont think you can export ERWIN schema diagrams to Word either...or can you??

    Cheers!

  • RE: Database Change Manager Compare

    Well I really dont know how expensive the other products are....But i used the evaluation copy of SQL Compare form RED GATE and really liked it. And subsequently bought it...

  • RE: Tweaking the SQL Script

    Thats really cool Debjit.

    Dave - Thx for the excellent suggestion...Never thot abt using the rows from sysindexes...

    Out of curiosity...i am sure this will work fine for tables with clustered...

  • RE: Tweaking the SQL Script

    I have just written a simple piece of code which suffices the purpose specified by you...you can enhance it if u need it to do more ...It takes less than...

  • RE: Returning a rS from a Stored Procedure

    I am not sure there is much that you can do here unless you have some kinda logic that compares the previous value with the next one. In which case...

  • RE: Views and Temp Tables

    Thx for the quick response both of you. Good one mike.....I totally lost my plot today and needed some help desperately.

    Cheers m8!

  • RE: pulling NT domain account in T-SQL (Trigger)

    As earlier pointed out by DB,

    SELECT spid ,status ,sid ,hostname ,program_name ,cmd ,cpu ,physical_io ,blocked

     ,dbid ,convert(sysname, rtrim(loginame)) as loginname ,spid as 'spid_sort', substring( convert(varchar,last_batch,111) ,6  ,5 ) + ' ' + substring( convert(varchar,last_batch,113) ,13 ,8 ) as 'last_batch_char' from

    master.dbo.sysprocesses 

    The loginname column would give...

  • RE: Advantages of Table variables over Temp tables in Stored Procedure

    Schleep,

    I agree with you there....its recommended to use temp tables rather than table variables when the expected size of data that will be stored is huge...but it also depends on...

Viewing 15 posts - 16 through 30 (of 87 total)