|
-
Break up a field
I have a field in a Database with the title of Name: It is varchar(27). Text
is input as follows: DOE JOHN MICHAEL
I want to be able to break up the NAME block into 3 different blocks for
a query. LNAME, FNAME, MNAME.
I can do it in access using:
FNAME: IIf(InStr(Mid([NAME_IND],InStr([NAME]," ")+1)," "),Left(Mid([NAME],InStr([NAME],"
")+1),InStr(Mid([NAME],InStr([NAME]," ")+1)," ")),Mid([NAME],InStr([NAME],"
")+1))
. . . for the FNAME.
I have the code for the LNAME and MNAME also.
Another problem is that I can't use CASE on the query, becuase I am trying
to create a view and CASE is not supported with view (I don't think).
Any help is greatly appreciated.
Thanks.
Tod
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks