Forum Replies Created

Viewing 15 posts - 26,431 through 26,445 (of 26,490 total)

  • RE: Too many rows returned

    Or you could do this:

    select

        cust.custID,

        cust.CustName

    from

        dbo.customer cust

        inner join dbo.payment pay

            on (cust.CustID = pay.CustID)

    where

        pay.DatePayment > '2004-08-01'

        and (cust.CustID like '10%' or cust.CustID like '20%')

        and pay.DatePayment...

  • RE: SQL 7.0 vs SQL 2005 outer join syntax

    Not sure which alias to use for column disposition, but try moving "disposition in ('ER''ER/CF','WD/ER') into the join statement.

     

    hth,

    Lynn

     

  • RE: Transaction Log Backup File Sizes

    The transaction log file is only truncated by a transaction log backup.  When SQL Server truncates the log file (and it may not shrink the actual size of the file),...

  • RE: Could I have an instance sql 2000 and sql 2005 in the same server?

    Yes you can.  Only one of them can be installed as the default instance.  The other has to be installed as a named instance.

    hth

    You have:

    --if (@ogt_code = 'Golf Course' and @ret_value >1) --I added this to try to fix

        --select...

  • RE: return value help..

    Shouldn't the select in the if statement look like this:

    select @ret_value = @ret_vale + 1

    I would prefer to use a set statement where you are using select to set @ret_value:

    set...

  • RE: Stored procedure with up to 1000 parameters

    If you are looking at dynamic sql and accessing variable, look at using the extend stored procedure sp_executesql.  You can find information about that procedure in BOL and I believe...

  • RE: Restoring transactional backups on a different server with a different database name

    Here is how I do it for one of our databases:

    RESTORE DATABASE [H88TRN]  -- Restore of full backup

    FROM  DISK = N'F:\sql_backups\H88PRD\H88PRD_20060804.bak'

    WITH  FILE = 1,

          MOVE N'H88PRD_data' TO N'F:\sql_DBs\User_DBs\H88TRN\H88TRN_Data.mdf',

          MOVE N'H88PRD_log' ...

  • RE: Upgrading SQL Server 2005 to SP 1

    I have a default instance of SQL 2000 and a named instance of SQL 2005 on my box as well.  I have no problem selecting the named instance of SQL...

  • RE: copy only structure from table A to table B

    Another way:

    select * into TableB from TableA where 1 = 2

    Be sure TableB does not exist.  Also this will not copy indexes, constraints, etc.

     

  • RE: Need a suggestion and solution

    If it is running 6 minutes, you may still want to do some more work.  I would suggest looking at your current indexes and perhaps running SQL Profiler to see...

  • RE: Stored procedure help needed.. BADLY

    Actually, I've used this to do some Test-Driven Development in SQL Server.  It has all been manual at this time, but it's let me capture updates without destroying the underlying...

  • RE: Problem with LEFT JOIN

    I stand corrected on stax68's code.  My misperception was on where the criteria select was being completed.  I have done some testing and I am posting those results here for...

Viewing 15 posts - 26,431 through 26,445 (of 26,490 total)