Forum Replies Created

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

  • RE: Issue with High wait stats

    Hi Jason,

    thanks for that, I'll add them to the exclusions list in the query.

    Ta

    David

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: Trouble in Using Stored Procedure in Excel

    Hi There,

    Have a look at this web page, it should give you what you need. I use this method and it works fine.

    http://codebyjoshua.blogspot.com.au/2012/01/get-data-from-sql-server-stored.html

    Ta

    David

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: Pulling my hair on this issue in SSIS (2008 r2):An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Incorrect syntax near the keyword 'SET'.".

    Hi resender,

    Try using --execute sp_executesql (@SQL)

    Rather than --execute sp_executesql @sql

    Ta

    David

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: Weird Join Problem

    I haven't tested this but i think your issue is with the ISNULL in the weird bit. When the name is NULL you set it to None. this does not...

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: ODBC Connections

    Hi,

    I suspect you have a non numeric character in a column which you are trying to populate a column which is numeric datatype. if the column in the source data...

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: Select convert to 2 decimal places, comma, right aligned

    I agree this should be done in the frontend app.

    This code will give you the commas and decimal places

    SELECT CONVERT(VARCHAR, CAST('1234567890' AS MONEY),1)

    As for left or right justification, that...

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: Replace all the characters in a string by specific character

    Hi there,

    If it is a straight like for like replacement then this would work

    update [mytable]

    set [mycolumn] = '#########'

    where len([mycolumn]) = 9

    If the task is more complex then you will need...

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: Script to display record side by side

    Hi there,

    I would look to be using two CTE to replace your selects and then query those to produce your report so something like

    WITH cte1 <columns>

    <SELECT Statement>,

    cte2 <columns>

    <SELECT Statement>

    select <columns>

    from...

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: master db backup failed

    Hi There,

    I don't really understand what it is that you are trying to do. Is it the backups which are failing, if so what are the errors or is your...

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: Customize sp_who2 for non sysadmin users

    There maybe a better solution using Adam Machanic's WhoIsActive stored proc, he has a variable @show_system_spids so you can stop those appearing and you can filter by database. you could...

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: Transaction Log Current Active Location

    I have ripped this out of Glenn Berry's excellent Diagnostic Information Queries (go grab a copy of the script)

    Anyway this should give you what you need.

    SELECT DB_NAME([database_id])AS [Database Name],

    ...

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: Records don't get deleted despite user having correct rights

    Is there any BEGIN TRANSACTION.... ROLLBACK in the error handling, indeed are they hitting the error trap for some reason

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: Trouble with removing a defunct file

    Hi There,

    If you go to D:\Data are there 3 files for this database? In your post the two .ndf files seem to have the same name?

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: MS CRM 40Gb table, 47k rows

    Hi,

    A quick google of the table name throws up alsorts of posts about this table growing hugely, so much so that there is a microsoft kb article about clearing it...

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • RE: MS CRM 40Gb table, 47k rows

    Hi Jend,

    Can you post the table structure, it sounds like it is a very wide table or maybe it houses images or some such thing.

    Ta

    David

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

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