Forum Replies Created

Viewing 15 posts - 661 through 675 (of 1,217 total)

  • RE: COALESCE doesn''''t LIKE CHAR

    Slight correction of my previous post:

    It seems that COALESCE does not select datatype of the last expression, but the "most appropriate" datatype - if we are talking about CHAR data, then...

  • RE: COALESCE doesn''''t LIKE CHAR

    Problem is not in the LIKE, but in the ISNULL / COALESCE.

    ISNULL ( check_expression , replacement_value )

    Arguments

    check_expression

    Is the expression to be checked for NULL. check_expression can be of...

  • RE: Eliminating duplicates without distinct

    John,

    there are no duplicities in sample data, but rows of the sample violate UNIQUE INDEX, because that index does not include SGNO:

    CREATE UNIQUE INDEX [Table1_2] ON [Table1]([STNO], [SGUB], [ACNO]) WITH...

  • RE: When to divide the table?

    I would take into consideration the following facts:

    - what is the proportion of rows that have NULL values in ALL columns of proposed second table?

    - how often will you be...

  • RE: how to use case within view

    Unfortunately you didn't post the structure of tables and how they are connected, so I can only guess. Under certain conditions, you could do without CASE:

    SELECT  head.clientcode,

     line.articlecode,

     head.language,

     COALESCE(lang.article_description,line.article_description)

    FROM table_head head

    JOIN...

  • RE: Need to write query with two conditions

    I had a good laugh now when I realized what's the problem... maybe if you try it on Monday, it will work fine :-))

    You have no upper date limit in...

  • RE: Need to write query with two conditions

    I have tested the expression from John's solution, and it evaluates to 4 if date is Monday and 2 if day is other than Monday. This is precisely what you have in your...

  • RE: Maximum allowable table row size of 8060 bytes

    There was a nice article by Steve Jones if you wish to know more about the internal things... you may find interesting info there : 

    What is the Maximum Page...

  • RE: Need to write query with two conditions

    Hello Vandy,

    you didn't specify how the date is stored... is it YYMMDD or YYDDMM? I understand that if the year is 2000 or greater, it has additional "1" at the...

  • RE: Efficiency of IN vs. other ways to filter rows

    Just my opinion, based on experience in our environment:

    - IN is way to go if you want to name a few values : WHERE user.login IN ('tom','bob','mike')

    - IN is absolutely horrible solution in...

  • RE: interleaving dates (sorting and ordering question)

    Somehow I can't make out the requirement from the example in original post. Could you please explain why 2003-12 is ordered as first? If it is ordered by month first, 2003-12...

  • RE: 640

    We support 3 database servers - 2 production, 1 for testing - all running SQLS 2000.

  • RE: Foriegn Key constraint across DB

    I'd be afraid to implement it this way, also because of performance... I would suggest the same as Kenneth - the tables should be in each client database. If you...

  • RE: date filtering

    Solution using BETWEEN is stuck with the fact, that both limits are included. Especially with datetime values, I prefer comparision using >=, < because it is easier to manage and...

  • RE: Alternative for LEFT JOIN

    Noooo.... don't use *=. It is generally the same as LEFT JOIN, only it is written in an "old" way, which means that it is not fully supported in recent...

Viewing 15 posts - 661 through 675 (of 1,217 total)