when i make a select using LEFT JOIN
i recive on some rows null - which is ok!
can i instead of the null write a string of my own?
that in case of a null value write for example "zzz"?
thnaks in adane
peleg
select with left join and null values
Moderator: General Moderators
- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
- pelegk2
- Forum Regular
- Posts: 633
- Joined: Thu Nov 27, 2003 5:02 am
- Location: Israel - the best place to live in after heaven
- Contact:
how can i do this
as part of the sql syntax
- pelegk2
- Forum Regular
- Posts: 633
- Joined: Thu Nov 27, 2003 5:02 am
- Location: Israel - the best place to live in after heaven
- Contact:
yes you can
new things i have learned
Code: Select all
SELECT distinct P_makat_RAW,prod_name,if (tblweightstations.set_no is null,'99',tblweightstations.set_no) as station_num FROM uniprod.tblweighing..............- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
I assume you use MySQL so this will not help you. This is only (as far as I know) for Postgres users and I am writing it here for any others reading this who may be using that database system. Postgres has a command called coalesce, the description of which may be found here. http://www.postgresql.org/docs/7.4/inte ... ional.html