Forum Replies Created

Viewing 12 posts - 121 through 132 (of 132 total)

  • RE: Never saw this before

    from the help file:

    SELECT @local_variable is typically used to return a single value into the variable. However, when expression is the name of a column, it can return multiple values....

  • RE: SQL Optimization

    unfortunately, the database security at the company i am working at has restrictions on the tools that i can use which includes the ability to look at the showplan. (permission...

  • RE: SQL Optimization

    let me post a twist to this problem revolving around ORs in the where clause.

    declare @load_dt datetime

    set @load_dt = (select max(load_dt) from tblA)

    --which is going to produce a faster time?

    select...

  • RE: SQL 6.5 w/ Windows 2000

    there are known bugs with running 6.5 on windows 2000.

    here is a kb article that may help you out:

    http://support.microsoft.com/?id=249204

    here is a list of supported windows versions for sql server:

  • RE: Index Question

    maybe i mistyped what i meant to say, nowhere did i say that a clustered index enforces uniqueness, the unique constraint or the primary key constraint would enforce the uniqueness....

  • RE: How to return Scope_Identity

    another solution would be to use IDENT_CURRENT('table_name')

    Chuck

  • RE: Index Question

    Ninel

    The unique clustered index on column enterpriselistid means that this field cannot have duplicate values in other records, which is what the error you are seeing.

    If you have data...

  • RE: Style value for MONEY conversion

    in the inner query, cast the values to be a money datatype. then on the outer datatype, peform the following query using the convert function:

    select

     convert(varchar, sum(sumTxns), 1) as totalTxns,

     convert(varchar, sum(sumSpend), 1) as...

  • RE: Validating Phone Numbers

    A simple approach would be to just use the REPLACE function nested like below.

    select replace(replace(replace(@phone, '.', ''), '-', ''), ',', '')

    store this in a function on the server and reuse...

  • RE: How do I do this update with Query Analyzer (I''''m a web guy)

    Bob

    You can perform a simple update statement that will handle your criteria like below:

    update customers

    set terminationdate = a.canceldate

    from

     customers c

     inner join activities a

     on c.customerid = a.customerid

    where

     c.formercustomer = 1

     and a.activity = 'cancelled...

  • RE: How to set up a default value for a data field in SQL Server 2005

    William

    To answer your other question about query analyzer, in Management Studio, select the database you wish to query against. Also, ensure that you have the Standard Toolbar selected (View\Toolbars\Standard) and...

  • RE: How to set up Auto-Increment in SQL Server 2005

    You need to modify the table.

    Right click on the table and select modify, you will have your table displayed in the summary area. Select the column that you want...

Viewing 12 posts - 121 through 132 (of 132 total)