sql - Extract a specific line from a SELECT statement based on the last Trasanction date -


good day,

i have sql code return me quantities received on time, want display latest one

select *    (select distinct         [dbo].[ttcibd001110].[t_cmnf] [manufacturer],         [dbo].[ttcibd001110].[t_item] [item code],         [dbo].[ttcibd001110].[t_dsca] [description],         [dbo].[ttcibd001110].[t_seak] [search key 1],         [dbo].[twhinr110110].[t_trdt] [transaction date],         [dbo].[twhinr110110].[t_cwar] [warehouse],         [dbo].[twhinr110110].[t_qstk] [quantity inventory unit]          [dbo].[twhinr110110] left join [dbo].[ttcibd001110]             on [dbo].[twhinr110110].[t_item]=[dbo].[ttcibd001110].[t_item]             [dbo].[twhinr110110].[t_koor]='2' , [dbo].[ttcibd001110].[t_cmnf]='manufacturerx') tabel  ltrim(tabel.[item code])='1000045' 

now, selection want select line latest transaction date, stuck.

can me in way?

thank you!

change beginning

select top 1 

and after use

order [transaction date] desc 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -