/****** Script for SelectTopNRows command from SSMS  ******/
  
  SELECT  top 5
      GUID,COUNT(*) as tedad
  FROM [db_triana].[dbo].[tb_order]  group by GUID order by tedad DESC
Go
SELECT TOP 1000 [IdxStudy]
      ,[Ver]
      ,[ID]
      ,[OtherID]
      ,[Name]
      ,[GUID]
  FROM [db_triana].[dbo].[tb_study] where GUID='1b8ac83a_cce2_4698_923e_091a4f0b083b'
  Go
  SELECT TOP 1000 [ID]
      ,[OrderDateTime]
      ,[ChartID]
      ,[PatientName]
      ,[SaveTargetDir]
      ,[GUID]
  FROM [db_triana].[dbo].[tb_order]  where GUID='1b8ac83a_cce2_4698_923e_091a4f0b083b'
  Go

--CREATE VIEW [dbo].[_bimaran_triana_]
--AS
--SELECT        IdxStudy AS code_triana, ID + '  ' + Name AS nam_triana
--FROM            dbo.tb_study
--GO