Forum Replies Created

Viewing 15 posts - 376 through 390 (of 458 total)

  • RE: simple question i''''m sure... declare sp?

    Okay, I think I get where you're going... A few more questions:

    The data from sp_blocky, is it a string, tabular data, or what?

    If it returns tabular data what you...

  • RE: simple question i''''m sure... declare sp?

    You're declaring a variable but the question is are you assigning the return value of sp_blocky to it, are you assigning the variable the string value 'sp_blocky'? How are...

  • RE: Variable To Select All

    I prefer an OR statement:

    SELECT * FROM VarianceReportTable

    WHERE Market = @market

    OR @market = '-1'

  • RE: Performance Tuning Stored Procedures

    People can and do write whole books about performance tuning in SQL Server (I know, I've bought a few). I think it's unrealistic to assume that a single article...

  • RE: disable group of triggers

    I assume you're using SQL 2005 because you said you want to disable the trigger. I'd just query the system tables... here's the first part (you can probably figure...

  • RE: SQL Prompt IntelliSense for SQL Server

    I tried this roughly 2-3 weeks ago and found a lot of the same issues. Using it was extremely slow and it consumed a great deal of system resources....

  • RE: Formula parsing

    Why use EXEC()?

    DECLARE @price DECIMAL

    , @vat DECIMAL

    , @total DECIMAL

    SET @vat = 0.1

    SET @price = 10

    SET @formula = @vat * @price

  • RE: Tricky update

    Ack... I'm off today. After each of those ELSE statements there needs to be an END.

  • RE: Tricky update

    You could also do something like this, however I don't know if I'd call that more "elegant":

    UPDATEa

    SETa.name =

    CASE WHEN b.columnname = 'name' THEN b.value

    ELSE a.name

    ,a.email =

    CASE WHEN b.columnname...

  • RE: Tricky update

    Ack... change one of those lines:

    WHERE TABLE_SCHEMA = 'tblA'

    should read:

    WHERE TABLE_NAME = 'tblA'

  • RE: Tricky update

    I'm having a little trouble understanding your question... While I rarely advocate using cursors, this seems like the ideal time to make use of one.

    DECLARE @sql NVARCHAR ( 4000...

  • RE: Cannot design DTS Package

    You may want to reinstall your client tools on the server. The DTS designer client may have become corrupted.

  • RE: multivalue para in store proc

    Nope, it's the dynamic SQL. When you use dynamic SQL you have to turn all single-quotes within the string that you want evaluated into double-single-quotes (not double quotes). ...

  • RE: SQL to list all Procs using TABLE abc or VIEW xyz

    Assuming your dependencies are in order you can query sysobjects and sysdepends... something like this should work:

    SELECTso2.name

    FROMsysobjects so

    JOINsysdepends sd

    ONso.id = sd.depid

    JOINsysobjects so2

    ONsd.id = so2.id

    WHEREso.name = 'table_or_view_name'

    ANDso2.xtype = 'P'

  • RE: Maintenance Plan - Should data and index job be scripted?

    I wouldn't perform the same maintenance on system databases (master, model, msdb, tempdb) as you would on user databases.

    1. I wouldn't concern yourself with too many optimizations on master /...

Viewing 15 posts - 376 through 390 (of 458 total)