Select second column if first is null
Hi guys
How can I select another column if the first one is null? PHP Code:
|
Re: Select second column if first is null
Two threads my guy.
|
Re: Select second column if first is null
Quote:
|
Re: Select second column if first is null
I don't understand really. Do you want to skip NULL entries?
Code:
/** Or perhaps this: http://www.w3schools.com/sql/sql_null_values.asp P.S. If you delete your other post the whole thread will be gone unless someone replies to it. |
Re: Select second column if first is null
Quote:
|
Re: Select second column if first is null
That is not explanatory at all. If anything you made it harder to understand. I think I get the point though.
In your other post you named them SteamID and IP, which means you want to use SteamID whenever possible and IP otherwise. This is a problem directly caused by dproto at which point I don't care. |
Re: Select second column if first is null
Quote:
|
Re: Select second column if first is null
There's literally no reason to save by IP, even with Dproto.
|
Re: Select second column if first is null
Quote:
|
Re: Select second column if first is null
Try
Code:
SELECT Iif(slotitem1 Is Null, slotitem2, slotitem1) As Item |
All times are GMT -4. The time now is 09:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.