SQL statement in datawindow

In my Datawindow painter, I would like to use "LIKE" in the where clause of
my SQL SELECT STATEMENT, but it doesn't seem to show the correct results.  I
want to show the results from the database where the input (a retireval
argument) matches anything that's entered close to that entry.  I tried
something like this:

ie.

SELECT name, address, city, province, postal_code
 WHERE name like '%(:name)%';

How can I use LIKE in the WHERE clause where string I am trying to match is
an input retrieval argument?


0
Chirag
3/8/2001 1:08:58 AM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

3 Replies
476 Views

Similar Articles

[PageSpeed] 25

where name like '%' + :name + '%' ;

Paul Horan [TeamSybase]
Buffalo, NY

"Chirag Patel" <patelc@mcss.cas.mcmaster.ca> wrote in message
news:ErxaV62pAHA.258@forums.sybase.com...
> In my Datawindow painter, I would like to use "LIKE" in the where clause
of
> my SQL SELECT STATEMENT, but it doesn't seem to show the correct results.
I
> want to show the results from the database where the input (a retireval
> argument) matches anything that's entered close to that entry.  I tried
> something like this:
>
> ie.
>
> SELECT name, address, city, province, postal_code
>  WHERE name like '%(:name)%';
>
> How can I use LIKE in the WHERE clause where string I am trying to match
is
> an input retrieval argument?
>
>


0
Paul
3/8/2001 4:46:11 AM
I tried what you suggested, but I got a messsage at runtime which stated:

SELECT Error: ORA-01722: Invalid Number

I tried to make some sense out of the error, but could not.  The input I
entered was "John" and tried many others as well.  But, I couldn't get it to
work.  If the input is empty there are no complaints.  Why does this error
message show?


Paul Horan[TeamSybase] <paul.horan@adelphiacom.com> wrote in message
news:HDNEzz4pAHA.199@forums.sybase.com...
> where name like '%' + :name + '%' ;
>
> Paul Horan [TeamSybase]
> Buffalo, NY
>
> "Chirag Patel" <patelc@mcss.cas.mcmaster.ca> wrote in message
> news:ErxaV62pAHA.258@forums.sybase.com...
> > In my Datawindow painter, I would like to use "LIKE" in the where clause
> of
> > my SQL SELECT STATEMENT, but it doesn't seem to show the correct
results.
> I
> > want to show the results from the database where the input (a retireval
> > argument) matches anything that's entered close to that entry.  I tried
> > something like this:
> >
> > ie.
> >
> > SELECT name, address, city, province, postal_code
> >  WHERE name like '%(:name)%';
> >
> > How can I use LIKE in the WHERE clause where string I am trying to match
> is
> > an input retrieval argument?
> >
> >
>
>


0
Chirag
3/10/2001 12:58:22 AM
the use of the"+" will result in an error at run-time (ie. invalid number),
but it will work is if you replace the "+" with "||"...

Thanks.

> where name like '%' + :name + '%' ;
>
> Paul Horan [TeamSybase]
> Buffalo, NY
>
> "Chirag Patel" <patelc@mcss.cas.mcmaster.ca> wrote in message
> news:ErxaV62pAHA.258@forums.sybase.com...
> > In my Datawindow painter, I would like to use "LIKE" in the where clause
> of
> > my SQL SELECT STATEMENT, but it doesn't seem to show the correct
results.
> I
> > want to show the results from the database where the input (a retireval
> > argument) matches anything that's entered close to that entry.  I tried
> > something like this:
> >
> > ie.
> >
> > SELECT name, address, city, province, postal_code
> >  WHERE name like '%(:name)%';
> >
> > How can I use LIKE in the WHERE clause where string I am trying to match
> is
> > an input retrieval argument?
> >
> >
>
>


0
Chirag
3/10/2001 9:20:35 PM
Reply:

Similar Artilces:

DataWindow This, DataWindow That...
Blah blah blah You've heard it enough that you don't even want to comment on how many times... The DataWindow. ....but it can't be enough anymore...can it? This from one of our colleagues (and yes my apologies for taking it out of context)... "...PB covers all you need to do that in ONE Tool. This includes Windowprogramming ( meaning the interface to the user: Windows, Sheets, diallougeboxes, etc.), Database operability AND Reporting! Well, I see als well as many other PB users that some of the implementations and features PB offers are improvable. But thi...

Help! How to modify the sql select statement for a nested datawindow inside a composite datawindow?
Help! How to modify the sql select statement for a nested datawindow inside a composite datawindow? Would the following work? dw_nest.Object.DataWindow.Table.Select="select employee_id from ..." Please help. jungan@aboex.com GetChild () ??? "Jun Gan" <jungan@aboex.com> wrote in message news:40e48313$1@forums-2-dub... > Help! > > How to modify the sql select statement for a nested datawindow inside a > composite datawindow? > > Would the following work? > > dw_nest.Object.DataWindow.Table.Select="select e...

Top Statement and INDEX= Statement in Datawindow SQL Painter
Hi, Is there any way to put TOP and INDEX statement into Sql definition in Datawindow painter in graphical view. I know that I can go to "Convert to Sytax" but I want to learn if there is an option like "DISTINCT" in painter. SQL Example: Select TOP 100 Name,Surname FROM Names (INDEX = INX_name) Thanks for all Ali 'Top 100' you can do by making the first item in the select list a computed column TOP 100 Name I can't think of a way of doing Index. I never use graphical mode for anything other than very simple queries (and usually no...

How to share the datawindow to inner datawindow of nested datawindow
How to share the datawindow to inner datawindow of nested datawindow. Ex -------- dw_1 is normal datawindow dw_nes is nested datawindow, both are placed one window dw_nes contain dw_child datawindow Question ---------------- i want to share dw_1 and dw_child. I have tried the below code, getting error dw_1.sharedata( dw_nes.object.dw_child) It's the dot notation. You will need to dw_nes.GetChild("dw_child", ldwc) where ldwc is a _local_ datawindowchild. <kzganesan@gmail.com> wrote in message news:4c64c402-bac5-4ee0-83aa-4ac08ffe43e5@r66g2000hsg.go...

changing datawindow connection is breaking my datawindow SQL
Hi I have had to move a number of datawindows from Oracle 9i running on a windows 2003 to Oracle 9i on AIX 4.3.3 (which is also on a private network, and requires a VPN to connect to). In the datawindow designer, I have also had to change the database interface from O90 Oracle 9i to an ODBC datasource (because I was not able to connect). In doing so, I have had to graphically re-create all the DW SQL again because I get this error: Table "XYZ" has no columns, possible invalid table format. Do you want to continue in graphic mode? If I select "NO", the SQL is...

Export datawindow select statement form all datawindows
I have a large application with a lot of DWs. DB is SQL Server 2000. Some DW use " (double quotes) in the select statement (not '), and now, with PB105 and oledb, this statements fails (MS native driver works) I know that " isn't a valid character for delimiting strings in SQL, but this large application was written by many people :) How can I find all " in all select statements in all DW within my application to do a replace. Thanks, Alex B. Hi Alex, I'm not sure wether some tool like PBL Peeper is capable...

modifiyin a datawindow in a datawindow
Hi, When I want to modify a datawindow, then it's just dw1.modify() But what do I have to do when I want to modify a datawindow in a datwindow ? I tried : dw1.dw2.modify() but that doesn't work. Anyone can help me out with this ? thanks. Regards, David get the dw via getchild & apply modify In article <4575976f.4dda.1681692777@sybase.com>, David says... > Hi, > When I want to modify a datawindow, then it's just > dw1.modify() > > But what do I have to do when I want to modify a datawindow > in a datwindow ? > I tried : dw...

nested SQL statements in datawindows
We are developing a N-Tier application for the internet using EA Studio 3.0 and are having a SQL conflict. I am curious if there is a problem with using a nested sql statement, like th following, as data source SQL for a datawindow. Now the reason why this is distressing, is due to the fact that as a sql query I get the desired results, as well as during a HTML datawindow preview. What seems to happen is when the SQL statement is nested the retrieval arguments are no longer picked up and read properly. SELECT table1.name, table1.fname, ...

How do I pass an SQL statement to a datawindow?
Hello, I am creating a custom query module for my application. In that module I build the SQL statement (SELECT column1 FROM table1...), in my application, based on the criteria the user selects. I now need to display the records and I figured I could do that by passing the SQL to the datawindow and have the datawindow do the retrieval and formatting of the columns but I couldn't find any way to do that. Anyone have any ideas or suggestions? Thanks!! Take a look at SyntaxFromSQL function. Look at example 2 specifically Hope this helps Anil Lou wrote: >...

Datawindow from arbitrary SQL statement
Hi - I have an SQL statement which executes fine on my host, the results of which I would like displayed (read-only) in a datawindow. I can't seem to define a datawindow that has as its syntax arbitrary SQL, since the DW painter seems to want to be able to "understand" it ... that is, my statement uses "WITH" clauses, and UNIONs, etc to the extent that is not graphically representable. Can I just tell the dw painter "never mind, just run the statement as is and help me layout the results " ? Thanks Choose Convert to Syntax, then try to ...

add sql statement on datawindow
a datawindow is very close to a database table. so i think it's useful to use sql statement to get data from a datawindow, instead of select data to a datawindow then save data to a database temp table and then use sql to get data from it. especially for n tie program,it will be more usefull hobby I don't really understand this request. I can't think of any reason to retrieve into a datawindow, then save the retrieved data back into a database temp table, and then use embedded SQL to re-retrieve the data back into the application. That's three trips across the ...

How do I pass an SQL statement to a datawindow?
Hello, I am creating a custom query module for my application. In that module I build the SQL statement (SELECT column1 FROM table1...), in my application, based on the criteria the user selects. I now need to display the records and I figured I could do that by passing the SQL to the datawindow and have the datawindow do the retrieval and formatting of the columns but I couldn't find any way to do that. Anyone have any ideas or suggestions? Thanks!! Take a look at SyntaxFromSQL function. Look at example 2 specifically Hope this helps Anil Lou wrote: >...

Getting SQL statement from Datawindow
Hi! Is there a way to get the exact SQL statement that will be generated when calling dw.Update()? dw.GetSQLSelect() returns the statment in this form ... SELECT xx, yy FROM ... I am trying to get the statement in this form. UPDATE xx SET .... INSERT INTO XXX(xxx) VALUES(xx).... Thanks, Geoff Have a look at sqlPreview event. On Wed, 16 Jul 2003 15:52:54 +0900, in powersoft.public.powerbuilder.datawindow Geoffrey Sy <gsy@alliance.com.ph> wrote: >Hi! > >Is there a way to get the exact SQL statement that will be generated when >calling d...

DataWindow Within DataWindow
How Can I access/modify object/control from a Datawindow within Datawindow. When i access/modify object/control from a Datawindow i used dw_1.modify("name.text = 'new val'") but within another datawindow or child datawindow it doesnt work. Your description is difficult to understand due to the terminology. First, a datawindow is assigned to a control - either a datawindow control or a datastore. Second, the Modify function can only be called within a script. With that as a basis, can you rephrase the question and describe more precisely what you want to do? ...

Web resources about - SQL statement in datawindow - sybase.powerbuilder.datawindow

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Intelligent Versus Surrogate Keys
Should I use business columns as primary key fields for tables in thedatabase, or generate artificial primary key values? When business-related ...

chevy volt
ProEXR File Description =Attributes= channels (chlist) compression (compression): Zip dataWindow (box2i): [0, 0, 5119, 2475] displayWindow (box2i): ...

Enable - A comprehensive solution for the localization of PowerBuilder applications Untitled Document ...
Enable is localization/ translation tool used by PowerBuilder developers to make their applications multilingual.Enable is a powerful tool that ...

comp.lang.clipper.visual-objects - Google Groups
comp.lang.clipper.visual-objects 1-20 von 33006 Themen werden angezeigt Integrity of a file marcosm...@gmail.com 09:35 Combobox value Lu 08:12 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
Developers can choose Win32 or newer style .Net development

PowerToTheBuilder - PowerBuilder UI Controls
HOME - COMPONENTS - PB UI DESIGNER - DOWNLOAD\PURCHASE - SUPPORT - FAQ - ABOUT Take Control of your UI with PB Ultimate Suite PowerToTheBuilder.com ...

Beautiful iPad Mini 3 Concept Reimagines Appleā€™s Tablet With iPhone 6 Design, Gold Color [Images]
The iPhone 6 may be grabbing all of the recent headlines due to its impending announcement, but spare a thought for those who prefer to stay ...

Java Networking - Real's HowTo
Real's HowTo Custom Search Java Language String and Number Applet AWT Swing Environment IO Javascript interaction JDBC Thread Networking JSP ...

Business Intelligence Products - Database Management, Data Warehousing & Mobility Software - Sybase Inc ...
Sybase offers a variety of Business Intelligence (BI) software like products for database management, data warehousing and mining, data integration ...

Resources last updated: 11/27/2015 9:36:51 PM