Forum Replies Created

Viewing 15 posts - 5,101 through 5,115 (of 7,187 total)

  • RE: using a table variable.

    foxjazzG (8/30/2011)


    So table variables can only be used in cursor functions.

    Not as far as I know. What are you trying to do?

    John

  • RE: Dynamically checking rows in a table for data changes in SQL

    Possibly. It works for the sample data you supplied. Please will you supply some data for which it won't work, and I'll take a look?

    John

  • RE: Char to PLU_NUM(float)

    Sushant

    What is PLU_NUM(float)? Do you just mean float? If you need to compare numbers in a character column with numbers in a numerical column, you will need to...

  • RE: SQL 2008 R2 msdb 95.66% frag

    Reindex those tables regularly, depending on how much job, backup and maintenance plan activity you have. Here is what I do:

    -- Try this on a test server before unleashing...

  • RE: Dynamically checking rows in a table for data changes in SQL

    What is the relationship between RecNum and RecInd? I've left out RecInd in the solution below because it looks redundant.

    The first thing to do is to group by RecNum...

  • RE: sp_msforeachtable

    Or use one of the INFORMATION_SCHEMA views and avoid the need to join at all:

    SELECT TABLE_SCHEMA, TABLE_NAME

    FROM INFORMATION_SCHEMA.COLUMNS

    WHERE COLUMN_NAME = 'ItemInsertedWhen'

    John

  • RE: NoLock Hint on a Read-only database

    In that case, you have the risk that tables will be updated between when your SELECT statement starts and when it finishes, possibly causing dirty reads. Using NOLOCK may...

  • RE: Derived Columns in alphabetical order

    Henk

    I don't know of any way to change the order in which the derived columns are displayed. However, I can't think of any reason why it would be important...

  • RE: Help to identify the user database that originated the Insert

    You can use CURRENT_USER to get the name of the user doing the insert, and then you can look up that user in sys.database_principals to find the default schema for...

  • RE: Moving files

    Data_God (8/25/2011)


    I got this one wrong but only after I tried using the script below on my SQL Server 2008 R2 environment.

    Could someone explain why the script below allows...

  • RE: Want a solution on cursor problem

    This problem is not related to just presentation.

    Please will you expand on that? What else is it related to?

    And i m not having knowledge about VB Macro in...

  • RE: Delete or cancel a backup job and start over

    Search this site (or elsewhere) for "simple recovery model" and read about recovery models and backing up the transaction logs. One of the things you'll notice is that you...

  • RE: Delete or cancel a backup job and start over

    SELECT recovery_model_desc

    FROM master.sys.databases

    WHERE [name] = '<InsertYourDatabaseNameHere>'

    As for backing up the log, I imagine that if you don't know whether you do it, then you don't do it. When you...

  • RE: User rights script after restore..

    Right, so if I understand correctly, you are restoring a database from instance A to instance B? Does the user SVCREMOTE exist in the database on instance A? ...

  • RE: Truncating log file vs Checkpoint

    Yes and yes. There are certain commands that will truncate the log without backing it up. I suggest you go to the link that Jason posted - I'd...

Viewing 15 posts - 5,101 through 5,115 (of 7,187 total)