Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

composite table columns

Status
Not open for further replies.

aliaga61

MIS
Apr 18, 2002
2
US
i have a composite attribute, person_name, under table 1. person_name has first_name, last_name, middle_initial...etc.

how do i write a query to pull out just those names by first name? when i try to say:

select first_name from table 1;

it tells me that first_name is an invalid column name. is there some way to give it a path to first name?
 
Hi:

From your description, person_name contains the first name, last name, and middle initial. Your select statement evidently fails because first_name is not a column or attribute of your database.

It sounds like person_name delimits the names by comma, but you don't say for sure. Short of redesigning your database, it looks like you need to parse person_name for the first name.

If your database doesn't have an extension that does this, perhaps you can write a stored procedure to do this.

Regards,

Ed
Schaefer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top