October 10, 2012 at 5:21 pm
hi im migratting an MS Access database to SQL Server 2008, and I have a trouble trying to convert the first function from Access to T-SQL in this query:
Select Pay_table.register,First(Pay_table.type),First(Pay_table.key),
First(Pay_table.Idleacv1),Pay_table.n_row,Pay_table.n_exercise,
Pay_table.c_n_period,First(Pay_table.fperceh1),
First(Pay_table.d_hpresentation),First(Pay_table.tdiepco1),
First(Pay_table.f_previous_pay),First(Pay_table.gain),
First(Pay_table.lost),First(Pay_table.c_key_det)
From Pay_table
Group by Pay_table.register,Pay_table.n_row,Pay_table.n_exercise,
Pay_table.c_n_period
Order by Pay_table.register,
Pay_table.n_exercise,First(Pay_table.fperceh1) Desc,
First(Pay_table.d_hpresentation) Desc;
An example of the data type of the columns is this
register type key Idleacv1 n_row n_exercise
AAAAA111111 F 40012-601513 40012-601513-4 21 2011
c_n_period fperceh1 d_hpresentation tdiepco1 f_previous_pay
1 31/01/2011 6:15:00 am 1 18/07/2011
gain lost c_key_det
1632 10016 851536
Can Anyone help me please?
October 10, 2012 at 8:34 pm
Repeated post. Follow on http://www.sqlservercentral.com/Forums/Topic1371167-392-1.aspx
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply