Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Informix Topics / September 2003

Tip: Looking for answers? Try searching our database.

Does Informix-SQL have Perl-like functions?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Professor Bruno - 27 Aug 2003 23:58 GMT
Greetings,

Apologies if this has been answered before.

Does Informix-SQL have functions such as Perl's 'split'.

We have a field which contains data delimited by "-" (dashes); the data
is of variable length so we can't use field1[x,x] types of
approaches.

Any help in this regard would be appreciated.

Thanks in advance.

Max Pyziur
pyz@brama.com
rkusenet - 28 Aug 2003 01:16 GMT
> Greetings,
>
[quoted text clipped - 9 lines]
>
> Thanks in advance.

Informix does not have, but a function split can be written easily.
to achieve the same, provided you are in 9.x version.

You can call it as

select split(fld1)
from table
where ....

and it will spew back different fields.

Please contact me at srkrishna at yahoo.com and I can help you there.

rk-
--
The email address is bogus.
preetinder dhaliwal - 28 Aug 2003 01:23 GMT
1) u can call a c function which will use strtok to do this

2)
MAIN                                                      
define l_string  char(50)                                
    define l_arr ARRAY[50] of char(50)                  
    define l_cnt,j,l_cnt_tmp smallint                    
                                                         
   let l_cnt =1                                          
   let l_cnt_tmp =1                                      
   let l_string = "dhali-preet"                          
   for j=1 to length(l_string)                          
      if  l_string[j] = "-"  then                        
            let l_cnt = l_cnt + 1                        
           let l_cnt_tmp = 1                            
           continue for                                  
       end if                                            
         let l_arr[l_cnt][l_cnt_tmp] = l_string[j]      
           let l_cnt_tmp = l_cnt_tmp + 1                
end for                                                  
for j=1 to l_cnt                                          
display "val:",l_arr[j]                                  
end for                                                  
                                                         
end main                          

Rgds
Preetinder                      
~                                                        
 

>Greetings,
>
[quoted text clipped - 13 lines]
>pyz@brama.com
>  

sending to informix-list
Paul G. Brown - 28 Aug 2003 23:05 GMT
> Greetings,
>
> Apologies if this has been answered before.
>
> Does Informix-SQL have functions such as Perl's 'split'.

 http://www.iiug.org/software/index_ORDBMS.html

  And more specifically:

 http://www.iiug.org/software/archive/split_udr_README

  Which describes it.
Jean Sagi - 30 Aug 2003 08:01 GMT
I saw what this functions do and it look awesome!

What is interesting most, to me, is the term:

"Bladelet"

How it is related a Bladelet to a Datablade?
Where can I find Information on "Bladelets"?

Thanks in Advance,

Chucho!

Paul G. Brown wrote:
> Professor Bruno <pyz@panix.com> wrote in message news:<bijd3j$mh8$1@reader2.panix.com>...
>
[quoted text clipped - 11 lines]
>
>    Which describes it.

Signature

Atte,

Jes?s Antonio Santos Giraldo
jeansagi@myrealbox.com
jeansagi@netscape.net

sending to informix-list

Jean Sagi - 31 Aug 2003 08:37 GMT
ok.

It looks interesting to learn.

Chucho!

Obnoxio The Clown wrote:
> Jean Sagi wrote:
>
[quoted text clipped - 28 lines]
>>>
>>>   Which describes it.

Signature

Atte,

Jes?s Antonio Santos Giraldo
jeansagi@myrealbox.com
jeansagi@netscape.net

sending to informix-list

Jean Sagi - 26 Sep 2003 18:44 GMT
Thanks for the info.

Certainly bladelets are the way to start understanding the blde concept which for what I've seen is very powerfull.

This is a must learning tech.

Chucho!

-----Original Message-----
From: Paul Brown <paul_geoffrey_brown@yahoo.com>
To: Jean Sagi <jeansagi@myrealbox.com>
Date: Fri, 29 Aug 2003 08:03:19 -0700 (PDT)
Subject: Re: Does Informix-SQL have Perl-like functions?

Well -

  "DataBlade" is such a big, heavy term, laden down with
  implications of complexity and so on.

   "BladeLet" on the other hand, is a small, friendly word
   bright and hopeful and here to help.

   If "DataBlade" were a dog, it would be a rotweiler, but
   "BladeLet" is a highland terrier.

   Other than that there is no technical difference. DataBlades
   are shipped in binary form where BladeLets come with source
   code. DataBlades have better documentation and are generally
   supported by IBM/INFORMIX while BladeLets are after-market
   extensions written by interested folk. But both use the same
   product interfaces and SQL features to get where they want
   to go.

   Hope this helps!

    KR

               Pb

--- Jean Sagi <jeansagi@myrealbox.com> wrote:
> I saw what this functions do and it look awesome!
>
[quoted text clipped - 26 lines]
> >
> >    Which describes it.

Jean Sagi
jeansagi@myrealbox.com
jeansagi@netscape.net

sending to informix-list
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.