Hi,This is my table setup[url]http://www.mshelp.be/img/logs.JPG[/url]I want to retrieve the logs by profileId.This is the stored procedure which I'm using. Don't get any syntax error, only not the correct output.create procedure sp_Select_log_By_ProfileId @ProfileId intas select l.LogId, l.LogDescription, l.CreatedOn, l.LogAuthorId from Logs l inner join ProfileLogs pl on pl.LogId = l.LogId where pl.ProfileId = @ProfileId;
Can anyone help me ?