|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
'Select a||b||c as test' issue
I write a sql statement to add 4 string to 1 , it gives strange result
Select a||b||c as test if field c is null , then the result test is null . Otherwise it is normal . Is this a bug , or I need to modify the statement . any help is appreciated. |
|
#2
|
|||
|
|||
|
This is ansi sql standards. Try using
select ifnull(a, '') || ifnull(b, '') || ifnull(c, '') as test |
|
#3
|
|||
|
|||
|
Thanks for advise . Unfortunately it doesn't work ,error 'function unknown'
|
|
#4
|
|||
|
|||
|
use coalesce unstead of nullif
|
|
#5
|
|||
|
|||
|
Sorry I don't understand . Would you mind showing me the statement .
thx so much |
|
#6
|
|||
|
|||
|
Code:
select coalesce(a, '') || coalesce(b, '') || coalesce(c, '') as test |
|
#7
|
|||
|
|||
|
Thanks SwamBoogie.
I try this before your post ,but remain "function unknown" |
|
#8
|
|||
|
|||
|
Well as coalesce is standard I assumed it was supported.
You could try select nz(a, '') Maybe you have to write an IB function for this. |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > 'Select a||b||c as test' issue |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|