If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > If I could explain the problem..........

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-20-03, 11:58
donaldt donaldt is offline
Registered User
 
Join Date: Jan 2002
Location: Nottingham - UK
Posts: 113
If I could explain the problem..........

In SQL database we need to concatenate 2 fields to display in one and turn them into an email address in the following format

joe.bloggs@company.co.uk

They are the following: forename & surname

The expression will require a . to be added between the forename & surname and @company.co.uk at the end.

Anyone help....... ?
Reply With Quote
  #2 (permalink)  
Old 10-21-03, 04:03
Lazy Lazy is offline
Registered User
 
Join Date: Sep 2003
Location: Brussel
Posts: 52
This should work:

SELECT forename || '.' || surname || '@company.co.uk' AS [name]
FROM [table]
[WHERE ...];
__________________
A good programmer is a LAZY programmer!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On