Re: [SQL] Query with Parameters and Wildcards

2009-04-27 Thread Jure Kobal
customerfirstname, > >> customerid, customerlastname, customermiddleinitial, customerphone, > >> customerreferredby, customerstateabbr, customerstreet1, customerstreet2, > >> customersuffix, customertitle, customerworkphone, customerworkphoneext, > >> customerzip FROM lanemanage

Re: [SQL] Query with Parameters and Wildcards

2009-04-27 Thread landsharkdaddy
>> >> Please tell me is it work for you. >> >> Regards >> Hidayat >> >> - Original Message - >> From: "landsharkdaddy" >> To: >> Sent: Monday, April 27, 2009 9:19 PM >> Subject: Re: [SQL] Query with Parameters and

Re: [SQL] Query with Parameters and Wildcards

2009-04-27 Thread Jure Kobal
ers WHERE (customerlastname ILIKE $1 || > '%') > $$ > LANGUAGE SQL; > > Please tell me is it work for you. > > Regards > Hidayat > > - Original Message ----- > From: "landsharkdaddy" > To: > Sent: Monday, April 27, 2009 9:19 PM > S

Re: [SQL] Query with Parameters and Wildcards

2009-04-27 Thread dayat
(customerlastname ILIKE $1 || '%') $$ LANGUAGE SQL; Please tell me is it work for you. Regards Hidayat - Original Message - From: "landsharkdaddy" To: Sent: Monday, April 27, 2009 9:19 PM Subject: Re: [SQL] Query with Parameters and Wildcards > > When I try the foll

Re: [SQL] Query with Parameters and Wildcards

2009-04-27 Thread landsharkdaddy
When I try the following like you suggested I get an error that says "operator does not exist: || unknown SELECT customercellphone, customercity, customerdatecreated, customerdatelastmodified, customeremail, customerfax, customerfirstname, customerid, customerlastname, customermiddleinitial, cu

Re: [SQL] Query with Parameters and Wildcards

2009-04-27 Thread Mario Splivalo
landsharkdaddy wrote: I have not tried that but I will in the morning. The @ in SQL is used to indicate a parameter passed to the query. In PostgreSQL it seems that the : is the same as the @ in SQL Server. I tried something like: SELECT * FROM Customers WHERE FirstName LIKE :custfirst + '%';

Re: [SQL] Query with Parameters and Wildcards

2009-04-26 Thread landsharkdaddy
I have not tried that but I will in the morning. The @ in SQL is used to indicate a parameter passed to the query. In PostgreSQL it seems that the : is the same as the @ in SQL Server. I tried something like: SELECT * FROM Customers WHERE FirstName LIKE :custfirst + '%'; And it told me th

Re: [SQL] Query with Parameters and Wildcards

2009-04-26 Thread Scott Marlowe
On Sun, Apr 26, 2009 at 6:21 PM, landsharkdaddy 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 d

Re: [SQL] Query with Parameters and Wildcards

2009-04-26 Thread Ries van Twisk
On Apr 26, 2009, at 7:21 PM, landsharkdaddy 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.

[SQL] Query with Parameters and Wildcards

2009-04-26 Thread landsharkdaddy
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