Solved

How to create a composite field with a dynamic value plus a static value ?

Posted on 2006-11-01
2
396 Views
Last Modified: 2012-06-27
I created an Access Interface on which the user can maintain an Access SQL Server table. The table is comprised of fields
as follows:

                             BRANCH NUMBER           EMAIL ADDRESS PREFIX             EMAIL ADDRESS  
for ex:                   123                               JOHN.SMITH                              JOHN.SMITH@GOLDMAN.COM

Do you have a suggestion as to how I could ultimately have a user enter just a person's name before a
static value "@GOLDMAN value" into the field EMAIL ADDRESS PREFIX, which in the example above would be JOHN.SMITH and then I could have another field, named, for example, EMAIL ADDRESS which would contain the combination of the name the user entered (for ex: JOHN.SMITH) into the field EMAIL ADDRESS PREFIX plus the suffix @GOLDMAN.COM ?

My objective is to send emails to xxx@GOLDMAN.COM where xxx is the value in EMAIL ADDRESS PREFIX.
I did not want the user to have to enter the static value @GOLDMAN.COM at the end of each value for the field
EMAIL ADDRESS PREFIX. However, when I execute my Email address routine, I wanted to retrrieve the value as
xxx.@GOLDMAN.COM  

I realize that I could have my VBA email ACCEES routine concatenate the value @GOLMAN.COM to the end of each value for
EMAIL ADDRESS PREFIX but I was wondering if there is an alternative to save the value input by the user in 1 field named
EMAIL ADDRESS PREFIX and then have another field named EMAIL ADDRESS contain the EMAIL ADDRESS PREFIX plus the value "@GOLDMAN.COM".
I realize that this is not efficient but is there a way to do this ?

   
0
Comment
Question by:zimmer9
2 Comments
 
LVL 9

Accepted Solution

by:
dduser earned 250 total points
ID: 17851102
Insert into YourTable(BranchNumber,Email_Address_Prefix,Email_Address) values (vAL1,VAL2,VAL3 + '@GOLDMAN.COM')

Regards,

dduser
0
 
LVL 29

Assisted Solution

by:Gautham Janardhan
Gautham Janardhan earned 250 total points
ID: 17851672
select Email_Address_Prefix + Email_Address from urtable

check if access has a default value option for column if so u can specify

'@GOLDMAN.COM' while creating the table
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now