Forum Replies Created

Viewing 15 posts - 181 through 195 (of 210 total)

  • RE: Rewrite an IF statement

    Yep, you're right Jack. For some reason I went off under the assumption that one or the other would be populated but not both. Plus my query would've need to...

  • RE: Rewrite an IF statement

    I generally like to avoid using ORs in my WHERE clause so I modified your statement to use an AND. Check out the query plans for these two and see...

  • RE: restore issue in sql 2000

    I run the following script when I need to close out connections.

    alter database [db_name] set SINGLE_USER with rollback immediate

    go

    alter database [db_name] set MULTI_USER with rollback immediate

    go

  • RE: SQL Profiler and "'password' was found in the text of this event."

    Steve Jones - Editor (9/18/2008)


    Which event is this?

    SP: StmtCompleted

    Issue comes up from time to time because of legacy code that uses @Password as an input parameter.

  • RE: Usage of T-SQL script in SQL server Agent jobs

    Don't think there is a job option to do this. You could try managing it through a process table that each step would update and validate against.

    Ex.

    Job Step 1

    - does...

  • RE: SQL decimal formatting issue

    Multiply the column by .01

    select [col_name] * .01 from [tbl_name]

  • RE: Cannot get this script to run

    Your update statement is referencing a table in the WHERE clause. You need to reference ComputerOperationsServerInformation in your FROM clause to get this to work.

    Try this instead:

    updateb

    setb.SupportedByText = c.[Support Team]

    fromBuilds...

  • RE: Needs Help on Indexes?

    Try this:

    selectso.[name] as tbl_name

    , si.[name] as indx_name

    , STATS_DATE(si.[id], si.indid) as StatisticsDate

    fromdbo.sysobjects so

    inner join dbo.sysindexes si on so.[id] = si.[id]

    whereINDEXPROPERTY(si.[id], si.[name], 'IsStatistics') = 0 -- remove statistics

  • RE: Shrinking transaction log

    Have you tried running CHECKPOINT against the db before DBCC SHRINKFILE?

  • RE: DBCC INPUTBUFFER

    Ok, found the answer to my question...stumbled across this link (below) in another discussion. Gives background of sysprocesses columns added through SQL Server 2000 SP3 and stored proc example to...

  • RE: nest cast & convert select statements

    This will also work for the example given, however, the number of characters returned is directly dependent on the precision and scale you specify.

    declare @num float

    set @num = -888.99

    select len(convert(decimal(10,2),@num))

    Converting...

  • RE: Executing S.P. so default parameter values are used

    Don't call the parameter when you exec the SP

    exec my_sp

    @p2 = [some value]

    , @p3 = [some value]

    go

  • RE: nest cast & convert select statements

    Do you have an example of what you're trying to achieve?

  • RE: Tips on Best Practices for TSQL

    I agree with Jack that best practices are relative to what you're trying to achieve but here are a couple things I constantly ding our developers on.

    - Use of SELECT...

  • RE: Run SQL Server Agent job from the command line

    What is the job doing to process the AS400 data? If its calling a DTS package, BCP or using SQL statement(s) you might be able to extract out the job...

Viewing 15 posts - 181 through 195 (of 210 total)