sql - top 1 case in select statement on TSQL -


i having problem on query. how can fix this:

select (select case top 1 status         when 'inprocess' 'processing'         when 'inworkbin' 'waiting in draft'         end      ics_email_connections_trx         a.sessionid = b.sessionid      , status <> 'completed'     order a.create_date desc) last_status  

i getting error:

incorrect syntax near keyword 'top'.

any suggestions?

try:

select top 1 case status 

instead of

select case top 1 status  

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -