Reply to Re: Setting up a store procedure...

Your name:

Reply:


Posted by JJ297 on 12/20/07 20:26

On Dec 20, 2:51 pm, "Plamen Ratchev" <Pla...@SQLStudio.com> wrote:
> You can simply pass the letter selected by the user as a parameter to the
> stored procedure and then pull the list. The stored procedure can be
> something like this:
>
> CREATE PROCEDURE GetTitles(
> @letter NVARCHAR(1))
> AS
> SELECT title_id, title
> FROM Titles
> WHERE title LIKE @letter + '%'
> ORDER BY title
>
> Anith has a good suggestion to create a computed column on LEFT(title, 1)
> that is indexed. Then the WHERE filter will be computed_column = @letter.
>
> HTH,
>
> Plamen Ratchevhttp://www.SQLStudio.com

Thanks Plamen this is easy enough and it works! Thanks Anith for your
suggestion too!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация