RE- CASE WHEN In Access SQL ==> I am guilty

D

damjanu

A search on these newsgroups for "case when"
has returned arround thousand articles on this
topic, for sure I will find what I need there,
sorry to waste your time, and mine.

Hope nobody replied to my previous post
Damjan
 
A

Albert D. Kallal

In fact, I see 4 posts to your previous question, all with good answers and
work arounds.

Try a bit patience here. We can help you, but we are not going to come to
your house and do your dirty laundry for you!


--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.attcanada.net/~kallal.msn

You can use the fact that nulls propagate in expressions when you use + to
concatenations.

Nulls DO NOT propagate when you use "&" to concatenate. When you deal with
non-nulls, then you can use & or +

So, really, all you need is:

select (r.name & (" >> " + p.name)) as full_name from myTable

The above will work just fine.

if p.name is null, then the ">>" will also be dropped.

if we use

(" >> " & p.name)

Then, the " >> " will appear, even WHEN p.name is null
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top