Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to user id to show in from date to upto date in mssql server

-- [=====[ Option 1 ]=====]
SELECT	TOP 1 
        TransID, [Date] 
FROM    #RNT1 
ORDER BY [Date] DESC, 
         TransID DESC

-- [=====[ Option 2 ]=====]
SELECT TOP 1 
       TransID, [Date]
FROM   #RNT1
WHERE  [Date]= (SELECT Max([Date]) FROM #RNT1)
ORDER BY TransID DESC
Comment

PREVIOUS NEXT
Code Example
Sql :: SQL Manipulação de Tabelas Constraint 
Sql :: sql server o arquivo solicitado não pode ser baixado 
Sql :: ora 00001 in oracle 
Sql :: sql interview questions 
Sql :: tsql rename column name 
Sql :: oracle parse string 
Sql :: mysql faster insert 
Sql :: All Some Any 
Sql :: microsoft sql server import bak file 
Sql :: sql trim 
Sql :: is not null mysql 
Sql :: oracle sql first day of quarter 
Sql :: parsing float to int in mysql 
Sql :: How to Remove milliseconds from Date time 
Sql :: find employee with max salary sql 
Sql :: Error in connection_import_file(conn@ptr, name, value, sep, eol, skip) : RS_sqlite_import: test.csv line 2 expected 11 columns of data but found 1 
Csharp :: c# mark as deprecated 
Csharp :: convert system.byte a string c# 
Csharp :: c# get username 
Csharp :: c# async sleep 
Csharp :: csgo throw last grenade bind 
Csharp :: c# store strings in file 
Csharp :: change height of rect transform unity 
Csharp :: c# datetime dd/mm/yyy hh:mm:ss 
Csharp :: enum loop 
Csharp :: unity key pressed 
Csharp :: string to int c# 
Csharp :: windows form rounded corners 
Csharp :: c# log to console 
Csharp :: c# date formats custom 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =