Forum Replies Created

Viewing 15 posts - 196 through 210 (of 1,217 total)

  • RE: Correlated subquery

    This should work better than correlated subquery:

    declare @t table (No int, value int)

    insert into @t

    select 1,25 union

    select 2,25 union

    select 1,45 union

    select 3,25 union

    select 1,35 union

    select 2,35 union

    select 3,35

    select tt.*

    from...

  • RE: Naming Convention

    It is a useful to have comments in all procedures and views, describing what it is, how it is used, and who and when has changed the definition... but that's...

  • RE: Delete records from table join

    Actually, Kenneth, it isn't INNER JOIN - all conditions in WHERE clause are IS NULL 😎 that means "corresponding row does not exist". It is a bit confusing because of...

  • RE: Delete records from table join

    I prefer to use the same syntax as for a select when deleting, instead of twisting it to WHERE EXISTS... I think this is what you were asking about originally...

  • RE: ignore truncate error

    Mark (5/30/2008)

    Setting ansi_warnings to off will ignore the truncate error. You are better off explicitly casting/truncating yourself though.

    Are you sure about that, Mark? Well, I wouldn't want to truncate myself...

  • RE: Temporal Project

    Hello Carl,

    ït took some time to think of a different approach, but in the end I came up with this. It is based on the idea, that if someone changed...

  • RE: Removing null in columns

    As far as I know, there isn't. COALESCE and ISNULL work when doing this thing on a row /like COALESCE (home_phone_no, office_phone_no)/, while aggregation is needed when you do the...

  • RE: please help with string function

    You can never write a query that will take care of everything and split names or addresses 100% correctly... so your task should be to write a query that will...

  • RE: Removing null in columns

    Solution depends on whether the data sample you supplied is representative. Try this and if it doesn't work as you expected, give us new sample data that will reflect all...

  • RE: SQL function equivalent to First in Access.

    The same question was posted in SQLS2005 forums

    http://www.sqlservercentral.com/Forums/Topic507496-338-1.aspx

    and received some answers there.

    Please don't cross-post. Always choose one forum where you will post your question, based on what you need to...

  • RE: Select query ignoring certain columns

    Sure... what's the problem? Only those columns that you name in the SELECT will be returned.

    If you are asking whether you can write SELECT * FROM .... and exclude some...

  • RE: Update with an inner join

    The LEFT JOINs are IMHO incorrect. The way you have written the query, only those rows where ALL columns should be updated will be affected. By putting all these additional...

  • RE: Test for existence of remote table

    Nice! I didn't know that, Barry - thanks. I'm still fairly new to 2005 and have only basic knowledge of how TRY..CATCH works.

    Well, this seems to be the solution to...

  • RE: Looking for SQL Function equivalent to First in Access

    You can use either TOP 1 or MIN / MAX functions, but in both cases you will need to filter out duplicate rows using GROUP BY (or, in case of...

  • RE: Test for existence of remote table

    Hmmm... there are certain limitations to using TRY..Catch, and - as I understand it - nonexistent objects (tables) are one of the things that doesn't work because of deferred name...

Viewing 15 posts - 196 through 210 (of 1,217 total)