Forum Replies Created

Viewing 15 posts - 301 through 315 (of 346 total)

  • RE: reference from one table to another

    try joining to the source table to access the image field (bit surprised you don't want the id in mls).

    This shouldn't affect you getting an error on the mls table...


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

  • RE: Searching for "sa = blank" in stored procs

    Another way is to script all the SPs and search the files (easy if you use sourcesafe then you will already have the files and lots of other benefits).

    Or you...


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

  • RE: Keeping the production db up to date with the dev

    >> Am I a control freak

    Yes.

    For a dba that's a good thing.


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

  • RE: Keeping the production db up to date with the dev

    I don't let developers get that close to the database (depends on what your developers are I guess, but database structure should be considered important).

    If the structure changes then the...


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

  • RE: reference from one table to another

    Try adding a trigger to the vreb_photo table which updates mls..photoc field.

    Note in your defintion you are not saying which row in vreb_photo to get the values from which should...


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

  • RE: reference from one table to another

    You could do this with a bit map

    1 + 2 + 4 + 8 + ...

    Probably more convoluted but

    update mls

    set photo = coalesce(left('1' + char(convert(binary(8),medium_photo1)),1),'')

    + coalesce(left('2' + char(convert(binary(8),medium_photo2)),1),'')

    +

    from [mlshuphoto].[dbo].[mls_photo] ph

    where...


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

  • RE: Views: A view contains five columns, c1..c5

    You could also add a non-clustered index on cols c1 & c2. It would also have to cover the query to be useful but would mean the minimum page reads.

    The...


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

  • RE: Recreate detached database file from a backup

    Nope - well not obviously.

    You can code the detach directly after the restore so it's done immediately.

    Why do you want to do it?


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

  • RE: I dont trust my client

    email probably won't work as the client can probably stop emails being sent to you easily.

    Zero dev fees and trusting the client to market the site is dubious - do...


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

  • RE: Table variable and sp-recompilation

    To get round the error

    DELETE d

    from @TMPTB d

    WHERE EXISTS

    (

    SELECT ID

    FROM @TMPTB DUP

    WHERE

    DUP.COL1 = d.COL1 AND

    DUP.COL2 = d.COL2 AND

    DUP.ID < d.ID

    )

    It is caused by the alias aliasing the table rather than...


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

  • RE: Moving a database from one server to another

    Easiest to just use backup and restore.

    Backup the database

    copy the backup file to the destination server

    restore from the local backup file.

    You can do all this using tsql if you wish...


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

  • RE: routine maintenance plan

    Depends on the system as to what needs to be performed.

    (I don't like the maintenance plans - especially as I've seen systems messed up by them - you can code...


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

  • RE: DELETING FILES & FOLDERS

    Not sure that sql server is the best thing to do this from - maybe a client app would be better.

    You can execute any do commands using master..xp_cmdshell

    to get all...


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

  • RE: Returning NULL's at the end of a recordset

    You can also swap the order (the literal just has to be the same case as the field).

    order by case when @dir = 'up' then 1 else prec end desc,...


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

  • RE: Reconstructing Time-Series Data

    You could join to a derived table with the 10 min intervals rather than a temp table - but it's not pretty, depends if you want to do it in...


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

Viewing 15 posts - 301 through 315 (of 346 total)