/ Published in: SQL
this is mine.
Expand |
Embed | Plain Text
ALTER PROCEDURE dbo.getCarModelAndID ( @userID int ) AS SELECT [tblCars].[carID], ([tblCars].[carYear] + ' ' + [tblMakes].[makeName] + ' ' + [tblModels].[modelName]) AS carName FROM [tblCars], [tblMakes], [tblModels], [tblUsers] WHERE ( ([tblCars].[makeID] = [tblMakes].[makeID] AND [tblCars].[modelID] = [tblModels].[modelID]) AND ([tblUsers].[userID] = @userID) AND ([tblCars].[userID] = [tblUsers].[userID]) )
Comments
Subscribe to comments
You need to login to post a comment.

The sad thing with stored procedures is that they don't make good snippets, as they are completely tied to 1 specific database.
needed to reference it to a friend. Snipplr is a great tool.