Forum Replies Created

Viewing 15 posts - 106 through 120 (of 346 total)

  • RE: SQL 2008 R2 - Syntax Error

    Did the error message give you a clue?

    Would be nice to see it.

    What's this bit trying to do?

    SELECT @ItemID = i.ItemID, @LotTrackIND = i.LotTrackingInd, @LotNumber = ''

    FROM WRHS_ItemUOM iu

    INNER JOIN...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Insert Statement not recognizing an existing field

    >> am pulling this field from another temp table in this stored procedure- data is coming from the original table for this field

    Which other field?

    You aren't referencing another...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: select part of a line of text

    select substring(strtloc+1, charindex('''',str,strtloc+1) - strtloc - 1)

    from

    (select str, strtloc=charindex('''',str) from tbl) a


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Help with the Stored Proc

    Easiest is to look at the SP.

    It will have a select statement at the end

    select ServerId, day, Status

    from ...

    ....

    change this to

    if exists (

    select *

    from ...

    ....

    where status = 'Failed')

    begin

    select result =...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Need help sql sliding window partioning.

    Partitioning is sensitive to the indexes including columns that have been implicitely included in the index.

    Create some small test tables to try it on.

    This includes a lot of switching -...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Addind a partition scheme to an existing table

    http://www.simple-talk.com/sql/database-administration/partitioned-tables-in-sql-server-2005/

    You will need to create the function and partition scheme

    I would do this by creating a new table then switching the partition with the old table to give a partitioned...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Viewing the code of stored procedure on another server

    Needs to be the database that the SP is in - that will only show SPs in master

    svr.db.schm.sp_helptext 'spname'


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Copying and comparing data

    maybe

    SELECT distinct tcms_members.dbo.memberdata2.* FROM tcms_members.dbo.memberdata2 left outer join

    msbtotal.dbo.memberdata on tcms_members.dbo.memberdata2.id =

    msbtotal.dbo.memberdata.id where msbtotal.dbo.memberdata.id is

    null

    or maybe if they aren't full duplicates something like

    select ... from

    (

    SELECT...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Collation Problem

    I would expect the table variable to default to the database collation or maybe the user but the temp table to default to the tempdb collation - I've had this...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Deleting a job also deletes job history

    Also the history will be trucated automatically when it reaches the threshold.

    I usually include a daily job to copy the jobs, steps, history... into tables in an admin database.

    It also...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Bug in CHARINDEX ?

    lol

    the versions in the links I posted are a lot simpler.


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Bug in CHARINDEX ?

    charindex doesn't support text columns as you say so it will truncate the column before the test.

    patindex should work though - check what you did.

    Here are some examples

    http://www.nigelrivett.net/SQLTsql/ReplaceText2.html

    http://www.nigelrivett.net/SQLTsql/ReplaceText.html


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Proc within a Trigger

    I wouldn't do the update of your database from the trigger. The trigger will hold a transaction and if something is being run on your database that blocks the update...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: error to connect remote named instance in sqlserver 2005 developer edition

    Is it set to allow remote connections?

    Try sp_configure or surface area config.


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Function - Long Running Query

    Have a look at my previous post about this bit.


    Cursors never.
    DTS - only when needed and never to control.

Viewing 15 posts - 106 through 120 (of 346 total)