Forum Replies Created

Viewing 15 posts - 1,711 through 1,725 (of 1,999 total)

  • RE: Stored procedures with table parameter

    can you add an extra parameter for the database name?

    then your sql could refernce the full name of the table. e.g

    database.tableowner.tablename

    or could you post your stored procedure so we can...

  • RE: Special Characters in SQL Servers

    i generally use the following format

    declare @strsql navarchar(2000)

    set @strsql=' select abc,def,ghi,'''+chr(99)+''' from mytable

    exec (@strsql)

    i con't remember if its chr or char as i'm away from my BOL at the...

  • RE: Performance and Query engine

    quite possibly - i know that msaccess has several similar issues - but i can't beleive they'd make the same mistakes on SQL2005

    i think you'd better wait for service pack...

  • RE: An If statement in the Where clause

    if you use WHERE (PublishOnIntra = 1 OR @READONLY=1) that should be SARG proof

    as i'm sure this is passed as WHERE (PublishOnIntra = 1 OR 1=1)

  • RE: Performance and Query engine

    not sure about the performance drop, but i might be able help you on the convert problem

    the issue is convert(decimal(18,0),a.itemnumber - your where clause filters out alphas, but it...

  • RE: Top Vs Row count

    can you post both queries? these may give you different results (sometimes)

    you can see the difference in the exec plan by pasting in to sql query anlyser and choosing the...

  • RE: Usage of User Defined Datatypes in SQL Server 2000

    UDT's are present and supported in SQL server 2005

    however defaults and rules are deprecated (they still work, but you can't edit them or create new ones

  • RE: xp_cmdshell fails

    if it's the connection then that problemw ould apply to all commands issued, not just xp_cmdshell

    have you tried a simple xp_cmdshell 'Dir c:\' command to check other xp_cmdshell actions

    or try...

  • RE: Problems with Update Trigger

    agreed

  • RE: An If statement in the Where clause

    SELECT MediaNewsId, MediaNewsHeadline, MediaNewsReleaseDate, MediaNewsBody

    FROM CC_MediaNews

    WHERE (PublishOnIntra = 1 OR @READONLY=1) AND StoryStatus = 4 AND MediaNewsReleaseDate <= GetDate() AND Project = @ProjectID

    ORDER BY MediaNewsHeadline

    i think is what Preethiviraj...

  • RE: Cannot Open SQL Server Log Subdirectories

    eek - it sounds like you have a few problems !!

    A couple of suggestions here

    - ensure your database transaction logs are backed up or databases are in simple mode....

  • RE: Performance and Query engine

    can you post examples of a query where this happens?

  • RE: $Mft corrupt

    take the database offline ASAP- take a copy of the files to a new array or remote location and check the disk out

    problems with the disk could lead to corruption...

  • RE: Problems with Update Trigger

    i'd also advise the following changes

    if update (Inaktiv)

    begin

    if (select Inaktiv from inserted)(select Inaktiv from deleted)

    begin

    INSERT INTO ....

    end

    end

    that way your trigegr doesn't fire when you update a row but set it's...

  • RE: An If statement in the Where clause

    CREATE PROCEDURE spGetNews

    @ProjectID Int,

    @ReadOnly bit

    AS

    set nocount on

    if @readonly=1

    begin

    SELECT MediaNewsId, MediaNewsHeadline, MediaNewsReleaseDate, MediaNewsBody

    FROM CC_MediaNews

    WHERE StoryStatus = 4 AND MediaNewsReleaseDate <= GetDate() AND Project = @ProjectID

    ORDER BY MediaNewsHeadline

    end

    if @readonly=0

    begin

    SELECT MediaNewsId, MediaNewsHeadline,...

Viewing 15 posts - 1,711 through 1,725 (of 1,999 total)