Forum Replies Created

Viewing 15 posts - 436 through 450 (of 1,131 total)

  • RE: Audit trigger including transaction or sp name

    The original SQL command can be obtained using DBCC INPUTBUFFER

    You will need to parse out the stored procedure name from various possibilities including:

    exec sp_spaceused 'Party' , 'true'

    execute sp_spaceused 'Party'...

    SQL = Scarcely Qualifies as a Language

  • RE: Shrinking almost empty datafile not possible

    In the SHRINKFILE statement, you have specified TRUNCATEONLY, which de-allocate starting from the end of the file to the begining of the file until the first extent with any data...

    SQL = Scarcely Qualifies as a Language

  • RE: How to return null or blank when database column dose not extist in database

    Use the "LEFT OUTER JOIN" option as described in Books OnLine:

    SELECT ada_category.catname

    ,ada_category.catamount

    ,ATA_SurveyPurchase.purchasedate

    ,ATA_SurveyPurchase.taken

    ,ATA_SurveyPurchase.UniqueId

    FROM ada_categorycat

    LEFT OUTER JOIN

    ATA_SurveyPurchase

    ON ATA_SurveyPurchase.catid = ada_category.catid

    AND ATA_SurveyPurchase.userid = 2

    ORDER BY ATA_SurveyPurchase.purchasedate...

    SQL = Scarcely Qualifies as a Language

  • RE: how Unable to access sql server 200 through windows authentication

    If you a member of the local administrators group and there a SQL Server login named BUILTIN\Administrators, then you can connect with sysadmin privileges.

    BUILTIN\Administrators and "SA" are created as part...

    SQL = Scarcely Qualifies as a Language

  • RE: Log File & Performance

    From benchmarks I have run using SQLIOStress, having the data and log files on separate RAID-1 drives increases thruput by a factor of 6 compared to both on the same...

    SQL = Scarcely Qualifies as a Language

  • RE: Disk Keeper defragmentation - real time?????

    For database files ( mdf, ndf and ldf extensions), if the files are properly sized then there should be no need to perform disk defragmentation. As "SQL Oracle" indicated, defragmentation...

    SQL = Scarcely Qualifies as a Language

  • RE: query

    The SQL Standard syntax for renaming a columns is

    ALTER TABLE [owner.]table-name

    RENAMEcolumn-name TO new-column-name

    SQL Server does not support the standard syntax including 2008. Instead the system procedure...

    SQL = Scarcely Qualifies as a Language

  • RE: Temporal Project

    Read your post and an running tests including scalability tests.

    The testing is being performed versus a table containing database file io statistics that have been gathered each hourly...

    SQL = Scarcely Qualifies as a Language

  • RE: Maximum Number of "When Then" lines in a CASE statement?

    Based on a test, 512 WHEN are accepted.

    SQL = Scarcely Qualifies as a Language

  • RE: order of execution

    When there is a function used in the select and the grouping, I have seen cases where the optimizer is confused if everything is not typed identically - do not...

    SQL = Scarcely Qualifies as a Language

  • RE: order of execution

    Re: your performance difference, you have a tautology in the first SQL Statment. "c.caseid = c.caseid"

    SELECT convert(varchar,c.lastupdated,101)

    ,cast(count(b.defendantid) as float)/cast(count(a.defendantID) as float)

    FROM dbo.ActivityReceipt c(nolock)

    inner join [dbo].[Defendants] a(nolock) on(c.caseid =...

    SQL = Scarcely Qualifies as a Language

  • RE: order of execution

    Regarding order of CAST ( COUNT() ) , setting showplan_text on shows that the COUNT is performed before the CAST.

    StmtText

    SELECT CAST( count(type) as float) / CAST( count(number ) as float)...

    SQL = Scarcely Qualifies as a Language

  • RE: sp_cursoropen

    sp_cursoropen, sp_cursorfetch and sp_cursorclose are used when a SQL Statement includes local and a remote tables such as

    select * from localtable join Remote.DB.owner.remotetable on

    [\code]

    Effectively, for each row...

    SQL = Scarcely Qualifies as a Language

  • RE: 4-table join not returning all the data I need

    Without knowing the primary key and foreign keys, this will be difficult to solve. Here is guess at your schema:

    create table SurveyQuestions

    ( QuestionID

    PRIMARY KEY ( QuestionID ) )

    create table...

    SQL = Scarcely Qualifies as a Language

  • RE: Query running very slow

    Noticed that in both tables the column "ID" is defined as nvarchar(13) but the example data is "001", "002", "003". Is this column actually a numeric data type or...

    SQL = Scarcely Qualifies as a Language

Viewing 15 posts - 436 through 450 (of 1,131 total)