Home select only top record
Reply: 0

select only top record

user1201
1#
user1201 Published in June 20, 2018, 12:04 am

I have SQL like this

SELECT manjalink_id, printed_serial, full_name, vm.cu_id
from [dbfastsconfigdataref].[dbo].[v_manja_user_cuid] vm
INNER JOIN dbmanjaprofile.dbo.m_manja_user m on m.manjalink_id = 
vm.manja_user_id
INNER JOIN dbfastsconfigdataref.dbo.cdf_micard mi on mi.cu_id = vm.cu_id
where m.created_timestamp >= '2018-02-01'
order by m.created_timestamp, full_name

with output

    Manjalink_id       printed_serial     full_name      cu_id
 ------------------------------------------------------------------
        101              00000123          alex          5556566
        102              00000124          alex          5556899
        103              00000126          max           8989899

and I would like to be like this:

 Manjalink_id       printed_serial     full_name      cu_id
 ------------------------------------------------------------------
        101              00000123          alex          5556566
        103              00000126          max           8989899

How to get the result as the desired output?

Thanks!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.260784 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO