On 7 Feb 2011, at 1:06pm, venkat easwar wrote:
> As far as I am aware trim will remove the characters only in ends, not in the
> middle. Assume an input like "12venkatpw", this cannot be trimmed. Or am I
> wrong
> somewhere. Guess NO.
Venkat, you are quite right. Sorry about that.
Simon.
-users@sqlite.org
Sent: Mon, February 7, 2011 6:08:29 PM
Subject: Re: [sqlite] Trigger to filter out characters
Simon,
Thanks. Trim(X,Y) is useful but I need to remove anything other than '0' - '
'9' and a few more characters.
180+ characters need to be removed (filtered out).
So I will need t
@bigfraud.org>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Mon, February 7, 2011 6:19:04 PM
Subject: Re: [sqlite] Trigger to filter out characters
On 7 Feb 2011, at 12:38pm, Harish CS wrote:
> Thanks. Trim(X,Y) is useful but I need to remove anythin
Simon Slavin wrote:
> On 7 Feb 2011, at 8:38am, Harish CS wrote:
>
>> Table T has two varchar columns A and B. UI allows entering values into
>> column A only.
>> On insert/update of records, I need to take out the value of A, filter out
>> anything other than '0' to '9',
On 7 Feb 2011, at 12:38pm, Harish CS wrote:
> Thanks. Trim(X,Y) is useful but I need to remove anything other than '0' - '
> '9' and a few more characters.
> 180+ characters need to be removed (filtered out).
> So I will need to call Trim() so many times.
> Since we cannot write loops I wonder
the Bugs
From: Harish CS <cshar...@gmail.com>
To: sqlite-users@sqlite.org
Sent: Mon, February 7, 2011 6:01:31 PM
Subject: Re: [sqlite] Trigger to filter out characters
Venkat,
Thanks.
But this is not filtering characters.
For example, if user enters '
>Could you please show me how to write the condition (to filter out
>characters)?
Use the strfilter function found in extension-functions.c downloadable
from http://www.sqlite.org/contrib/
Once built and loaded, you can use a trigger similar to
create trigger if not exists trFilterAB after
Simon,
Thanks. Trim(X,Y) is useful but I need to remove anything other than '0' - '
'9' and a few more characters.
180+ characters need to be removed (filtered out).
So I will need to call Trim() so many times.
Since we cannot write loops I wonder how I can call it many times.
-Harish
Simon
Harish CS <cshar...@gmail.com>
> To: sqlite-users@sqlite.org
> Sent: Mon, February 7, 2011 2:59:50 PM
> Subject: Re: [sqlite] Trigger to filter out characters
>
>
> Hi Venkat,
>
> Could you please show me how to write the condition (to filter out
> chara
On 7 Feb 2011, at 8:38am, Harish CS wrote:
> Table T has two varchar columns A and B. UI allows entering values into
> column A only.
> On insert/update of records, I need to take out the value of A, filter out
> anything other than '0' to '9', '*', '#', '+' 'p', 'w' characters and copy
> it to
Subject: Re: [sqlite] Trigger to filter out characters
OOPS.. a mistake.. find the corrected things below.
create trigger if not exists after insert on when
new.A IN ('0','1','2','3','4','5','6','7','8','9','*','#','+','p','w')
beginupdate set B=new.A;
end;
Missed set in my last mail. It would ha
From: venkat easwar <hareas...@yahoo.com>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Mon, February 7, 2011 4:41:19 PM
Subject: Re: [sqlite] Trigger to filter out characters
Well. I thought it should be an easy deal f
ish CS <cshar...@gmail.com>
To: sqlite-users@sqlite.org
Sent: Mon, February 7, 2011 2:59:50 PM
Subject: Re: [sqlite] Trigger to filter out characters
Hi Venkat,
Could you please show me how to write the condition (to filter out
characters)?
Thanks,
Harish
venkat easwar wrote:
&g
t; To: sqlite-users@sqlite.org
> Sent: Mon, February 7, 2011 2:08:16 PM
> Subject: [sqlite] Trigger to filter out characters
>
>
> Table T has two varchar columns A and B. UI allows entering values into
> column A only.
> On insert/update of records, I need to take out t
From: Harish CS <cshar...@gmail.com>
To: sqlite-users@sqlite.org
Sent: Mon, February 7, 2011 2:08:16 PM
Subject: [sqlite] Trigger to filter out characters
Table T has two varchar columns A and B. UI allows entering values into
column A only.
On insert/update of records, I need to take out the
Table T has two varchar columns A and B. UI allows entering values into
column A only.
On insert/update of records, I need to take out the value of A, filter out
anything other than '0' to '9', '*', '#', '+' 'p', 'w' characters and copy
it to column B. Is it possible to write a trigger to achieve
16 matches
Mail list logo