substring extraction

View: New views
5 Messages — Rating Filter:   Alert me  

substring extraction

by romsok :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

If I have a column that contains email addresses, is there a way for me to select just the domain from SQL, so for dave@..., bob@..., I will get just "gmail.com", and "yahoo.com"?

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@...
https://lists.sourceforge.net/lists/listinfo/monetdb-users

Re: substring extraction

by Guillaume Theoret :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You'll probably have to write your own external function to do that.

The MS_STUFF example might help:
http://monetdb.cwi.nl/projects/monetdb/SQL/Documentation/External-Functions.html#External-Functions

On Wed, Nov 4, 2009 at 7:45 PM, Roman Sokolyuk <romsok.tech@...> wrote:

> Hi,
>
> If I have a column that contains email addresses, is there a way for me to
> select just the domain from SQL, so for dave@..., bob@..., I
> will get just "gmail.com", and "yahoo.com"?
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> MonetDB-users mailing list
> MonetDB-users@...
> https://lists.sourceforge.net/lists/listinfo/monetdb-users
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@...
https://lists.sourceforge.net/lists/listinfo/monetdb-users

Re: substring extraction

by romsok :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Actually,

I found a way to do it in SQL - here is the example:

SELECT SUBSTRING(user_email,POSITION('@' IN user_email) + 1) AS emai




On Wed, Nov 4, 2009 at 10:42 PM, Guillaume Theoret <smokinn@...> wrote:
You'll probably have to write your own external function to do that.

The MS_STUFF example might help:
http://monetdb.cwi.nl/projects/monetdb/SQL/Documentation/External-Functions.html#External-Functions

On Wed, Nov 4, 2009 at 7:45 PM, Roman Sokolyuk <romsok.tech@...> wrote:
> Hi,
>
> If I have a column that contains email addresses, is there a way for me to
> select just the domain from SQL, so for dave@..., bob@..., I
> will get just "gmail.com", and "yahoo.com"?
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> MonetDB-users mailing list
> MonetDB-users@...
> https://lists.sourceforge.net/lists/listinfo/monetdb-users
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@...
https://lists.sourceforge.net/lists/listinfo/monetdb-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@...
https://lists.sourceforge.net/lists/listinfo/monetdb-users

Re: substring extraction

by Guillaume Theoret :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Where did you find the POSITION keyword? I haven't seen any reference
to it in the documentation.

On Thu, Nov 5, 2009 at 5:14 PM, Roman Sokolyuk <romsok.tech@...> wrote:

> Actually,
>
> I found a way to do it in SQL - here is the example:
>
> SELECT SUBSTRING(user_email,POSITION('@' IN user_email) + 1) AS emai
>
>
>
> On Wed, Nov 4, 2009 at 10:42 PM, Guillaume Theoret <smokinn@...>
> wrote:
>>
>> You'll probably have to write your own external function to do that.
>>
>> The MS_STUFF example might help:
>>
>> http://monetdb.cwi.nl/projects/monetdb/SQL/Documentation/External-Functions.html#External-Functions
>>
>> On Wed, Nov 4, 2009 at 7:45 PM, Roman Sokolyuk <romsok.tech@...>
>> wrote:
>> > Hi,
>> >
>> > If I have a column that contains email addresses, is there a way for me
>> > to
>> > select just the domain from SQL, so for dave@..., bob@..., I
>> > will get just "gmail.com", and "yahoo.com"?
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> > 30-Day
>> > trial. Simplify your report design, integration and deployment - and
>> > focus
>> > on
>> > what you do best, core application coding. Discover what's new with
>> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> > _______________________________________________
>> > MonetDB-users mailing list
>> > MonetDB-users@...
>> > https://lists.sourceforge.net/lists/listinfo/monetdb-users
>> >
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and focus
>> on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> MonetDB-users mailing list
>> MonetDB-users@...
>> https://lists.sourceforge.net/lists/listinfo/monetdb-users
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> MonetDB-users mailing list
> MonetDB-users@...
> https://lists.sourceforge.net/lists/listinfo/monetdb-users
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@...
https://lists.sourceforge.net/lists/listinfo/monetdb-users

Re: substring extraction

by romsok :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


It's listed here:

http://monetdb.cwi.nl/projects/monetdb//SQL/Documentation/SQL-Features.html#SQL-Features

On Fri, Nov 6, 2009 at 9:42 AM, Guillaume Theoret <smokinn@...> wrote:
Where did you find the POSITION keyword? I haven't seen any reference
to it in the documentation.

On Thu, Nov 5, 2009 at 5:14 PM, Roman Sokolyuk <romsok.tech@...> wrote:
> Actually,
>
> I found a way to do it in SQL - here is the example:
>
> SELECT SUBSTRING(user_email,POSITION('@' IN user_email) + 1) AS emai
>
>
>
> On Wed, Nov 4, 2009 at 10:42 PM, Guillaume Theoret <smokinn@...>
> wrote:
>>
>> You'll probably have to write your own external function to do that.
>>
>> The MS_STUFF example might help:
>>
>> http://monetdb.cwi.nl/projects/monetdb/SQL/Documentation/External-Functions.html#External-Functions
>>
>> On Wed, Nov 4, 2009 at 7:45 PM, Roman Sokolyuk <romsok.tech@...>
>> wrote:
>> > Hi,
>> >
>> > If I have a column that contains email addresses, is there a way for me
>> > to
>> > select just the domain from SQL, so for dave@..., bob@..., I
>> > will get just "gmail.com", and "yahoo.com"?
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> > 30-Day
>> > trial. Simplify your report design, integration and deployment - and
>> > focus
>> > on
>> > what you do best, core application coding. Discover what's new with
>> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> > _______________________________________________
>> > MonetDB-users mailing list
>> > MonetDB-users@...
>> > https://lists.sourceforge.net/lists/listinfo/monetdb-users
>> >
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and focus
>> on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> MonetDB-users mailing list
>> MonetDB-users@...
>> https://lists.sourceforge.net/lists/listinfo/monetdb-users
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> MonetDB-users mailing list
> MonetDB-users@...
> https://lists.sourceforge.net/lists/listinfo/monetdb-users
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@...
https://lists.sourceforge.net/lists/listinfo/monetdb-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@...
https://lists.sourceforge.net/lists/listinfo/monetdb-users