Reply to Sorting with NULL

Your name:

Reply:


Posted by Sharif Islam on 07/28/06 19:55

I used SET CONCAT_NULL_YIELDS_NULL OFF do ignore NULL in concatation. I
have two fields:
chapterauthor
authors

Here's my query:
SELECT ([chapterauthor] + [authors]) AS CT FROM Items ORDER BY CT


Both Authors and ChapterAuthor can be null. I am trying to figure out if
I can ignore the null value when ChapterAuthor is null.

Sample data/result:
Appadurai, Arjun #chapter author is null
Appadurai, ArjunFardon, Richard (ed.) # (chapterauthor+authors)

I would like the output to be like this:
Appadurai, ArjunFardon, Richard (ed.) # (chapterauthor+authors)
Appadurai, Arjun #chapter author is null

I guess I can write a stored procedure with if/else, but I was wondering
If I can do this with a simple query. Thanks.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация