Forum Replies Created

Viewing 15 posts - 46 through 60 (of 238 total)

  • RE: Is there a difference?

    It is better to put the most distinct restriction (date in this case) first anyway. You never know what surprises to expect from the optimizer. So why gamble? It become...

  • RE: Removal of Foreign Key's from DB.

    Here is a modification of the script above to create a batch that would do the work. You would then apply the batch to the given database:

    select 'ALTER TABLE '...

  • RE: pinning a temp table to memory

    I think using a table variable instead of a temp table will help you:

    DECLARE @t1 TABLE( c1 int, c2 varchar(10) )

    now @t1 is a local table variable. Memory for it...

  • RE: Dates for report

    WHERE invoicedate BETWEEN

    DATEADD( mm, -6, CAST( CAST( DATEADD( dd, 1-DAY( getdate()), getdate() ) AS CHAR( 11 ) ) AS DATETIME ) )

    AND

    CAST( CAST( DATEADD( dd, 1-DAY( getdate()), getdate() )...

  • RE: condition on a FROM clause or WHERE clause

    If you are talking about JOIN condition, it is better and more correct in the JOIN clause, not in the WHERE clause. It is also better to limit your result...

  • RE: UDF in SubQuery causing odd error

    The code seems very complex and... "not SQL-like". It looks more like coding of nested function calls in a procedural 3GL. This is not really appropriate for SQL. God knows...

  • RE: Permission list for Tables

    No cursor, no stored procedure:

    select

    convert(sysname,db_name()) TABLE_QUALIFIER,

    convert(sysname,user_name(o.uid)) TABLE_OWNER,

    convert(sysname,object_name(o.id)) TABLE_NAME,

    convert(sysname,user_name(p.grantor)) GRANTOR,

    convert(sysname,user_name(u.uid)) GRANTEE,

    convert(varchar(32),case p.action

    when 193 then 'SELECT'

    when 195 then 'INSERT'

    when 196 then 'DELETE'

    when 197 then 'UPDATE'

    else 'REFERENCES'

    end) PRIVILEGE,

    convert(varchar(3),case...

  • RE: How to Execute Views from VB

    quote:


    This quote from your first post :

    quote:


    By the way, why usage of a...

  • RE: Update problem

    UPDATE W

    SET FTSTab = '1',

    ReferenceTN = W2.TN

    FROM AP_FTS_Working W

    JOIN AP_FTS_Working W2

    ON W2.FTSTab = '0'

    AND W.FTSTab IS NULL

    AND W.Acct_No = W2.Acct_No

  • RE: to create table of daily status from change log

    So what is the primary key on this table? What is the exact table definition?

  • RE: upto 2 decimals

    Is TestField1 column of type float? What if you output @val1 rught before the INSERT statement? What does it print?

    You forgot to show me the CREATE TABLE statement.

    I actualy...

  • RE: upto 2 decimals

    What is your exact table CREATE statement and exact INSERT statement?

  • RE: add extra column to insert to read in a trigger

    This is impossible unless you actually create that column. Your solution would be to implement business logic in a stored procedure or elsewhere, not in the trigger.

  • RE: SQL Server Reporting Services

    It should be a part of Yukon beta 1, right?

  • RE: Check constraint

    Nigel is right - always.

Viewing 15 posts - 46 through 60 (of 238 total)