Posted By

vedgiee on 07/01/10


Tagged


Versions (?)

Another Stored Procedure


 / Published in: SQL
 

this is mine.

  1. ALTER PROCEDURE dbo.getCarModelAndID
  2. (
  3. @userID int
  4. )
  5. AS
  6. SELECT
  7. [tblCars].[carID],
  8. ([tblCars].[carYear] + ' ' + [tblMakes].[makeName] + ' ' + [tblModels].[modelName])
  9. AS carName
  10. FROM
  11. [tblCars],
  12. [tblMakes],
  13. [tblModels],
  14. [tblUsers]
  15. WHERE
  16. (
  17. ([tblCars].[makeID] = [tblMakes].[makeID] AND [tblCars].[modelID] = [tblModels].[modelID])
  18. AND
  19. ([tblUsers].[userID] = @userID) AND ([tblCars].[userID] = [tblUsers].[userID])
  20. )

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Vordreller on July 1, 2010

The sad thing with stored procedures is that they don't make good snippets, as they are completely tied to 1 specific database.

Posted By: vedgiee on July 1, 2010

needed to reference it to a friend. Snipplr is a great tool.

You need to login to post a comment.