Viewing 15 posts - 661 through 675 (of 1,217 total)
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...
August 18, 2006 at 6:41 am
Problem is not in the LIKE, but in the ISNULL / COALESCE.
ISNULL ( check_expression , replacement_value )
check_expression
Is the expression to be checked for NULL. check_expression can be of...
August 18, 2006 at 6:22 am
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...
August 18, 2006 at 2:02 am
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...
August 18, 2006 at 1:33 am
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...
August 11, 2006 at 4:49 am
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...
August 11, 2006 at 4:25 am
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...
August 11, 2006 at 3:48 am
There was a nice article by Steve Jones if you wish to know more about the internal things... you may find interesting info there :
August 10, 2006 at 7:47 am
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...
August 10, 2006 at 3:58 am
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...
August 7, 2006 at 9:14 am
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...
August 7, 2006 at 6:01 am
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...
August 4, 2006 at 3:16 am
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...
August 4, 2006 at 2:02 am
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...
August 4, 2006 at 1:13 am
Viewing 15 posts - 661 through 675 (of 1,217 total)