Sqlite Conversion
How do I convert the query below to sqlite?
SELECT DISTINCT
unite.UniteAd+'('+IIf(IsNull(Left(Semt.Semt,50)),'',Left(Semt.Semt,50))+')'
AS UniteAd
I tried to use case...when instead of iif but I keep get开发者_开发技巧ting error.
You will need to replace IIF and ISNULL with CASE and to replace LEFT with SUBSTR. Also, you need to use || to concatenate, instead of +.
If you've made those changes and it still doesn't work, please post the resulting SQL that is failing. I'd try it for you, but I can't figure out what you mean by:
IIf(IsNull(Left(Semt.Semt,50)),'',Left(Semt.Semt,50))
精彩评论