Forum Replies Created

Viewing 15 posts - 1 through 15 (of 17 total)

  • RE: TABLE Data Type

    This is a common misconception on table variables. Please see following site ...

    http://support.microsoft.com/default.aspx?scid=kb;en-us;305977&Product=sql2k

    and in particular...

    Q4: Are table variables memory-only structures that are assured better performance as compared to temporary...

  • RE: sql server 2000 trigger for checking duplicate email in a table

    I'm not 100% sure what you are looking for either. Does the below work for you ?? If so, make sure you create an update trigger also with the below...

  • RE: # of Rows in Enterprise Manager and Query Analyzer

    Hi Nilesh,

    Your indexes seem to have got out of whack .... try updating the statistics or rebuilding the indexes. That should help - from EM, the rowcount is selected from...

  • RE: I HAVE A SERIOUS PROBLEM

    I always prefer to use the scope_identity() - see example below for the reasons why.

    There are times when you may want to use @@identity to return the last inserted...

  • RE: I HAVE A SERIOUS PROBLEM

    Use scope_identity() - will give you the last identity value inserted into an identity column within the same scope ie the procedure / trigger etc....

  • RE: using variable with the TOP keyword in the SQL procedure

    exec('select top ' + @number + ' field1 from table A

    order by field1')

  • RE: Daily Data Transfer

    Also have a look at log shipping - this will probably suit your scenario better....

  • RE: Daily Data Transfer

    Set up transactional replication and distribute the data daily  - or at whatever time slice you need. See Replication in BOL

  • RE: append the records in the field

    Not too sure of your question ?? Is the below what you want ??

    SELECT 'Sometext1 ' + au_lname + ' Sometext2'

    FROM Authors

    UPDATE a

    SET    a.au_lname = 'Sometext1 ' +a.au_lname +...

  • RE: SQL Server Stored Procedure

    Try this ..... char(10) - Line Feed / char(13) - CR

    SET NOCOUNT ON

    go

    drop table #NEWLINE

    go

    create table #NEWLINE (Field1 int identity(1,1), Field2 varchar(30))

    go

    insert #NEWLINE select '1111

    11111'        

    go

    select * from #NEWLINE

    go

    update...

  • RE: select query

    Not too sure if you have a preference for what Name comes back in the query

    Eg : what name do you want for the 3A code, Schel or Mahata...

  • RE: delete from duplicate records

    If you have an identity field or some unqiue integer field like StorageLocationID - unique id .... the below will work

    drop table #StorageLocation

    go

    create table #StorageLocation ( StorageLocationID int identity(1,1)...

  • RE: SQL Statement Question

    The query below would give better performance....

    SELECT Company

    FROM   TEMP

    WHERE  City IN ('LA','NY')

    GROUP BY Company

    HAVING COUNT(*) = 2

     

  • RE: Getting dependencies

    I always search syscomments...

    Select distinct so.type,so.name

    FROM syscomments sc

    JOIN Sysobjects so

    on so.id = sc.id

    and sc.text like '%MyView1%'

     

  • RE: Select Where IN or nested?

    Misunderstood original Q...try below

    Select ID

    FROM Table

    Where IACID IN (1,2,5)

    AND IExpID >=12

    GROUP BY ID

    HAVING COUNT(*) = 3

     

Viewing 15 posts - 1 through 15 (of 17 total)