SELECT {EVENT}.[EventId],{EVENT}.[EventName],{EVENT}.[EventType],{EVENT}.[EventCode],{EVENT}.[DateFrom],{EVENT}.[DateEnd], {EVENT}.[ExhibitionCost],{EVENT}.[TravelCost],{EVENT}.[HotelCost],{EVENT}.[LogisticCost],{EVENT}.[MarketingCost],{M_EVENT_TYPE}.[Name], {M_City}.[Name],{M_COUNTRY}.[Country],{EVENT}.[Status] From {EVENT},{M_EVENT_TYPE},{M_City},{M_COUNTRY} where {EVENT}.[EventType]={M_EVENT_TYPE}.[Id] and {EVENT}.[City]={M_City}.[Id] and {EVENT}.[Country]={M_COUNTRY}.[Id] and (( @StartDate between {EVENT}.[DateFrom] and {EVENT}.[DateEnd]) or (@EndDate between {EVENT}.[DateFrom] and {EVENT}.[DateEnd])) and @CountryCode = {M_COUNTRY}.[Country] order by @Orderby Orderby i added as a parameter ( value what i assign t the parameter is
List_SortColumn_GetOrderBy(EventTable.Id, "{EVENT}.[EventName]")