Forum Replies Created

Viewing 15 posts - 241 through 255 (of 1,186 total)

  • RE: Tables missing from sysobjects

    I believe that sysobjects is per database for that db's objects only.  If there are objects in your DB that are not in your db's sysobject table then I don't...

  • RE: VBScript Question

    I don't know about SQL-DMO but the query is SELECT * FROM sysfiles from inside the database you want...

  • RE: SQL ODBC Connection running slow

    1.  Is this a STORED-PROCEDURE or an AD-HOC QUERY?

    2.  Is this using DYNAMIC SQL?

    A possible reason for QA running MUCH faster is because QA is running off of the SERVER...

  • RE: need help on writing a sub-query

    If you are trying to determine products that are IN Boston AND IN Chicago AND IN Denver you will need to create three DISTINCT sub-queries

    FROM (SELECT Product FROM Product_Cities WHERE City...

  • RE: Getting current rows from table with from/thru dates

    Ron,

    In answer to your Vampiric example:

    How can you determine that IF his blood type IS NULL THEN NOT DELETING him is CORRECT?

    Secondly, What is to stop someone from DELETE...

  • RE: orphaned user who is also owner of the db tables

    Have you tried researching sp_change_users_login with AUTO_FIX?

  • RE: Comments of Table and Columns

    Please see below example

    sp_addextendedproperty 'caption', 'One digit identifier of system.  See TimeSystem table for more information', 'user', dbo, 'table', 'Your Table Name Here', 'column', 'TimeSystemID'

    GO

    sp_addextendedproperty 'caption', 'up to 4 digit...

  • RE: Table changes

    El,

    Unless you have auditing enabled (created by you to track changes) then unfortunately, there is no audit trail.

    Sorry

  • RE: Getting current rows from table with from/thru dates

    my 2 cents worth.

    IF you ALLOW NULL you have to determine: Is it really NULL or did someone TYPE NULL? I have been fighting NULL for a long...

  • RE: Getting current rows from table with from/thru dates

    NULL is a bad idea.  I would use a DEFAULT value of '1900-01-01'.  This way you deal with either a date value or a date value and not

    WHERE Field BETWEEN...

  • RE: update from max of other table :-(

    How bout

    UPDATE S1 SET Price = S2.Price

      FROM dbo.Stock S1

        INNER JOIN (SELECT Product, MAX(Price) Price

                      FROM dbo.Supplier

                    GROUP BY Product) S2

        ON S1.Product = S2.Product

  • RE: Table changes

    #1.  Do you know when it's schedule is?

    #2.  Do you have the source code to see what it does?

    #3.  Fire up Profiler to capture the traces....

  • RE: SQL Newbie - if ..begin ??

    This may help

    IF EXISTS (SELECT 1

                 FROM dbo.Contracts

               WHERE lastpd < nextperiod AND Claim = 1)

      BEGIN

        UPDATE contracts

        Set printedpd = nextperiod,lastprinted = getdate (),nextperiod = nextperiod  ...

  • RE: LessThanGreaterThan on a string

    ILANGO,

    The problem is that Evan is > just E.  If you want the E's as well have your query do < F.  Kind of like dealing with date fields...

  • RE: Implied Zeros? How do I convert into...

    How bout something like:

    CAST(CAST(REPLICATE('0', 6 - LEN(@Field)) + @Field AS VARCHAR(6)) AS VARCHAR(6))

Viewing 15 posts - 241 through 255 (of 1,186 total)