Forum Replies Created

Viewing 15 posts - 1,876 through 1,890 (of 3,232 total)

  • RE: Left outer join

    That's the problem with the *= operator, it leads to an ambiguous query. Try moving the condition into the JOIN clause

    SELECT a.return_indic,

    ...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Left outer join

    That's because this is not an OUTER JOIN. Your original query is looking for rows where the cust_id is not equal. When you re-wrote it, you say cust_id...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: TSQL Locking and Updating

    Why use 2 statements? If the isolation level is read committed, why not just run the update? By filtering on the LockStatus column, SQL Server should lock other...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Need to update one table when another table is updated

    You could just as easily (and more preferably in my opinion) create a stored procedure to do all of this for you. Instead of updating your Approved field and...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: TSQL Locking and Updating

    Roy,

    I am in favor of using AppLocks for locking certain application level resources. I have not used it to lock a range of rows like what Allen is...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: INNER JOIN drags query

    Before you go down the route of armtwisting, you should follow Matt's instructions and rebuild indexes/update statistics.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Alter column order

    The ALTER TABLE ADD COLUMN command will add the new column to the end of the table. If you need to change the position of a column within a...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Select records that dont exist based off of max and min date ranges.

    Please post sample data and desired results.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Favorite Book Quote

    .....He said, β€œIt is finished!” And bowing His head, He gave up His spirit.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Login transfer

    You can use the Transfer Logins task in DTS to move your logins from SQL Server 2000 to a 2005 instance.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Incorrect syntax near 'CHAR'

    No problem. For what it's worth, check out this link on dynamic SQL.

    http://www.sommarskog.se/dynamic_sql.html

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Update Table using case when and subquery in When

    Also, if you are using this column as a flag and later scanning this column for whatever reason, you are going to get poor performance out of the scan. ...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Update Table using case when and subquery in When

    Your description is still too broad to make a guess at what you are trying to do. As Lynn suggested, read the best practices article for posting and revamp...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Incorrect syntax near 'CHAR'

    Assign your SQL code into a variable and then execute the variable. You should look into using sp_executeSQL when executing dynamic SQL.

    SET @sqlcmd ='Select * FROM Table1 WHERE '...

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • RE: Incorrect syntax near 'CHAR'

    I assume that the @FieldName variable contains a column name that you want use in your where clause? You need to use dynamic SQL if that is the case....

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 15 posts - 1,876 through 1,890 (of 3,232 total)