Forum Replies Created

Viewing 15 posts - 8,911 through 8,925 (of 18,926 total)

  • RE: Select * when you don't want to select everything

    SELECT

    [name] + ', '

    FROM sys.columns

    WHERE [object_id] = object_id('TableName')

    ORDER BY 1

    That way you don't have to manually put the commas.

    I'd preffer fail solution,...

  • RE: Scripts section and dates

    The articles and scripts are posted to the site long before they make it to the newsletter. If you're lucky, you'll see it in the new post or active...

  • RE: Unused Tables identification

    I did this manually once.

    Search all the code on SQL server and all the code on the client application (search for each table name, also need to be carefull for...

  • RE: add column in certain position

    I think you need to add indexes to that rebuild list as well!!!

  • RE: DB maintenance plans failed

    Depending on the DR needs, you have to delete the backups eventually. You need to figure out when a backup is no longer needed, then create a job that...

  • RE: State County City Problem

    You need one extra table called CityCounties

    CityID

    CountyID

    That's easier said than done. Doing that work for the entire US is not a small task. I'm guessing you'll have to...

  • RE: When sp_depends fails

    One more thing to keep in mind, if the proc has more than 4000 characters and that the objects used is splitted between 2 rows in syscomments, that still won't...

  • RE: Update problem

    Looks like a case where you'll need to manually look at the data and clean it. The first names will not be writtent he same in both tables and...

  • RE: Cannot insert into varchar(8000) column

    Can we see the code you are using?

  • RE: Recover deleted records

    Restore most recent backup under a different DB name. Bilk import the records from that restored table.

    Otherwise you need a log explorer like lynn suggested. You might need...

  • RE: How to find the objects that use a stored procedure

    Was too slow... but just for the fun of it :

    SELECT OBJECT_NAME(C1.id) AS Obj FROM sys.syscomments C1 LEFT OUTER JOIN sys.syscomments c2 on C1.id = C2.id AND C1.Colid =...

  • RE: Script system stored procedures in master?

    Just open a cursor, loop and print it out. Copy / paste from there into the script window.

  • RE: Table

    The question now, is it possible to change the server settings from CS to CI... never tried it and I have no solutions on top of my head.

  • RE: Table

    who's the owner??

    if you run as sa, drop the dbo part and test again.

    Could also be a view that tries to select from the base table which does not include...

  • RE: Creating a Trigger on a table by a stored procedure in another database

    The recommendation is to not create objects in production code.

    You are in dev mode, which is mode than fine.

Viewing 15 posts - 8,911 through 8,925 (of 18,926 total)