Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ratheeshsql
Starting Member
17 Posts |
Posted - 2007-01-29 : 06:33:44
|
| hi all,i have a doubt regarding a select operation performed on two tables with join statement.The table structure is as followstable name- application---------------------- ------------------------------------------appid appname version ------------------------------------------------------------------1 Test 102 Test 113 Sample 5table name- app_users -----------------------app_users_id user_id appid version date_downloaded------------------------------------------------------------1 250 1 10 1/29/2007Now i want a grid which should show data like thisAppName LastDownloadedVersion Date_Downloaded----------------------------------------------------------TestV11 10 1/30/2007SampleV5 -- ------Here the value for appname should be created by appname+'V'+latest version of that appname(eg. Application name- Test Ltest version- 11 thus appname becomes 'TestV11')Could anybody help me to solve this problem..Thanx in advance.. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-29 : 07:04:25
|
| [code]select a.appname + 'v' + cast(a.version as varchar) + ' ' + cast(au.version as varchar) + convert(varchar, au.date_downloaded, 101)from application as aleft join app_users as au on au.appid = a.appid[/code]Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|