Forum Replies Created

Viewing 15 posts - 901 through 915 (of 1,583 total)

  • RE: Rowcount of the biggest table

    The fastest (and most accurate) is to query sys.indexes - example:

    SELECT

    c .row_count AS [RowCount]

    FROM

    sys. objects a

    JOIN

    sys. indexes b

    ...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Unwanted parameter truncation

    I don't believe there's a way within SQL to prohibit the truncation of the strings when it's assigned to the variable. How is this proc called? If it's...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Syntax for transfering data from one table to another

    You will need to create a linked server to reference the example code FROM OPENROWSET('NAMEHERE',

    The name used in the example is: 'MSDASQL'

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Regarding replication

    Like already noted, "it depends" however, you can pretty easily add/drop articles from replication (I am assuming you are referring to transactional replication) if the immediate sync option is set...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: SQL Monitor

    I personally prefer SQL Diagnostic Manager (praying I don't get attacked from mentioning an Idera tool on here ;-)) - In my testing I liked the way the data was...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Slow Week

    I would tend to agree with Fluffy :hehe: catch up on maintenance things, learn something new, read up on one of those articles I've had bookmarks to for several months,...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Permission on reporting server

    do I also need to add them to system level as a system user?

    Do you mean on the SQL Server box itself? If so, no. If you are...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Table variables

    Thanks for the easy one! Should have been "can temp tables" be used in UDFs - that may have fooled a few :hehe:

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Getting "severe error" when referencing a table that doesn't exist

    Interesting...

    Please post your full code causing the errors, including DDL for all the tables needed, and the scripts needed to populate at least a few rows into each table. ...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Getting "severe error" when referencing a table that doesn't exist

    It works fine for me both ways...I dont get the error, seems to me you have something configured differently within your SSMS?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: how to access data base table from two different servers

    This assumes you have successfully set up and are able to use a linked server: SELECT

    a.col1,

    b.col1

    FROM

    LinkedServerA.DatabaseA.dbo.TableA

    INNER JOIN LinkedServerB.DatabaseB.dbo.TableB

    ...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Query Performance - Advice needed on small query -- plan attached

    Michael T2 (12/13/2012)


    if i take out

    AND coalesce(txSubtype,'') <> 'BACKORDER'

    no records are returned. thats why i am using the coalesce. Most of the records i need have a null...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: xp_cmdshell

    Never tried FORFILES but this works well and is very simplistic EXEC MASTER.dbo.xp_cmdshell 'del \\YourUNCPath\*.*'

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Query Performance - Advice needed on small query -- plan attached

    The reason nearly everyone on here will chine in on the use of NOLOCK (locking hints in particular) is primary because of the byproduct of using it altogether (dirty reads/potentially...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Query Performance - Advice needed on small query -- plan attached

    Simply post the DDL into your reply, and if you want to get all fancy place it between the [ code ="sql"] INSERT TSQL HERE [/ code]

    Of course remove the...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

Viewing 15 posts - 901 through 915 (of 1,583 total)