Hello.
v8.2.1
Try this (and any 3-d argument):
---
select locate('','stri ng',5) from sysibm.sysdummy 1;
---
Is it a feature or a bug?
Sincerely,
Mark B. 3 4059 4.****@mail.ru wrote:
Hello.
v8.2.1
Try this (and any 3-d argument):
---
select locate('','stri ng',5) from sysibm.sysdummy 1;
---
Is it a feature or a bug?
$ db2 "values locate('','stri ng',5)"
1
-----------
5
1 record(s) selected.
This is exactly what I would expect: at position 5 is the first occurrence
where an empty string starts.
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
And how about 3-d argument length(source_s tring) ?
For example,
posstr(substr(' string', 10), '')
returns error, but
locate('','stri ng',10)
returns 10...
$ db2 "values locate('','stri ng',5)"
1
-----------
5
1 record(s) selected.
This is exactly what I would expect: at position 5 is the first occurrence
where an empty string starts. 4.****@mail.ru wrote:
And how about 3-d argument length(source_s tring) ?
For example,
posstr(substr(' string', 10), '')
returns error, but
locate('','stri ng',10)
returns 10...
That's inconsistent, indeed...
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andrew |
last post by:
Dear Experts,
I have a perl program that using Getopt:Std module, when I try to run
the GetOpt program, the following error returned:
Can’t locate Getopt.pm in @INC
(@INC contains: /opt/perl5/lib/5.00502/PA-RISC1.1 /opt/perl5/lib/5.00502
/opt/perl5/lib/site_perl/5.005/PA-RISC1.1 /opt/perl5
I am using Perl 5.6.1 in HPUX 11.
Any hints?
|
by: packrat |
last post by:
I am attempting to build a Bugzilla server on OS X.
All of this is new to me, working with the Perl, MySQL, and Bugzilla,
so I have been
banging my head often.
Software error:
When I run the bugzilla 'checksetup.pl' file, I get the following:
-------------------------------------------------------------------
|
by: John Black |
last post by:
Hi,
In debugging a core dump, I run purify against my code, it says
several "Free Memory Read" errors. All the errors are on one delete
statement. Usually this means some pointer is deleted by non-owner. But
it is really hard to locate the error code.
The code structure is like this:
class BigClass{ // this is from somebody else code
......
|
by: hikums |
last post by:
how can I use a function inside a function, for example I want to
select col1, col2 from table1 where locate(dayofweek(current
date),col3) =dayofweek(current date)
col3 is a field that contains a string like '12 4567', or
'1 4567'. This field specifies what day in the week the job executes,
and if there is a match, I want to report col1 and col2.
|
by: mwt |
last post by:
Is there a function in python that does what "locate" does in a bash
shell?
I know I could do it by using os.popen('locate'), but I'm curious if
there's a Python "native" way to go about it. Only needs to work in
Unix, but would be interesting if it was cross-platform.
Thanks.
| |
by: SushiSean |
last post by:
When executing the xmlhttp.send function to request shipper for available
shipments (I send xml as string and receive result xml):
XMLHTTP xmlhttp = new XMLHTTP();
xmlhttp.open("POST", "https://gateway.fedex.com:443/GatewayDC",
false, "", "");
xmlhttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
xmlhttp.send(strXML);
|
by: Thomas K. Nielsen |
last post by:
Hi I dynamically insert some stylesheets. I want them to be placed
before some javascript is executed. I know I can add an id to the
scripttag that I want the stylesheets to be insert above, but I then
have a problem with with backward compability(need to insert that id
to many pages) and I have a problem if my colleagues forget to add
that id to the script tag.
My question is can I locate a javascript funtion - ie I have a
initPage...
|
by: zerogreen |
last post by:
Hi
I am looking for an equivalent to the LOCATE function from MySQL.
I have a query(PHP) that looks like this:
$query="SELECT * FROM table WHERE LOCATE('".$var."', field)> 0 ORDER BY LOCATE('".$var."', field) LIMIT 10";
Any Ideas?
|
by: CtrlAltDel2008 |
last post by:
Hello everyone, i hope you can help me with this query.
The code below all works fine, referring to the SUBSTRING part, at the moment it just displays all the text from the "http" part until the end of the thread.
I am trying to get it to just grab the URL and display that only.
$sql= <<< END
SELECT
post_date
, DATE_FORMAT(FROM_UNIXTIME( post_date ) , '%d-%m-%Y') AS formatted_date
, LEFT(title, 30) AS title
, post
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |