Re: Query with Parameters and Wildcards

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Query with Parameters and Wildcards
Дата
Msg-id dcc563d10904262154n19dd9f77pe81fe23eebeeac2e@mail.gmail.com
обсуждение исходный текст
Ответ на Query with Parameters and Wildcards  (landsharkdaddy <ldodd@landsharksoftware.com>)
Ответы Re: Query with Parameters and Wildcards  (landsharkdaddy <ldodd@landsharksoftware.com>)
Список pgsql-sql
On Sun, Apr 26, 2009 at 6:21 PM, landsharkdaddy
<ldodd@landsharksoftware.com> wrote:
>
> I have a query that works on SQL Server to return customers that contain the
> string entered by the user by accepting parameters and using the LIKE
> keyword. I would like to move this to postgreSQL but I'm just not sure how
> to get it done. This is the query
>
> SELECT * FROM Customers WHERE FirstName LIKE @custfirst + '%';
>
> This works great on SQL Server but not on postgreSQL. Any help would be
> appreciated.

Have you tried:

SELECT * FROM Customers WHERE FirstName LIKE 'custfirst%';

What does the @ do in sql server?


В списке pgsql-sql по дате отправления:

Предыдущее
От: Ries van Twisk
Дата:
Сообщение: Re: Query with Parameters and Wildcards
Следующее
От: landsharkdaddy
Дата:
Сообщение: Re: Query with Parameters and Wildcards