Query question!

B

Bob Vance

LastName(Text) and ClientID(Number)
Are say 2 fields in my query how can I get the expression in Uppercase
First 3 characters in LastName & OwnerID
to get something like SMI45
 
J

John W. Vinson

LastName(Text) and ClientID(Number)
Are say 2 fields in my query how can I get the expression in Uppercase
First 3 characters in LastName & OwnerID
to get something like SMI45

An answer:

UCase(Left([LastName], 3) & OwnerID

The question:

WHY on earth would you want this?

It's redundant. It's no more unique than the OwnerID already is. It's not
mnemonic (is SMI34 or SMI127 Janet Smith?) It's an "intelligent key" (and no,
that's not a compliment, unfortunately).

It's easy to create this... but what use will it serve?
 
B

Bob Vance

Thanks John, its a unique bank code given to my clients for a bank reference
on a statement, the first 3 letters gives you a heads up who it is but the
individual ID number is final, hmm what about say "St George Club" Would I
get STG I was going to use this in my query too =UCase .........Regards Bob

John W. Vinson said:
LastName(Text) and ClientID(Number)
Are say 2 fields in my query how can I get the expression in Uppercase
First 3 characters in LastName & OwnerID
to get something like SMI45

An answer:

UCase(Left([LastName], 3) & OwnerID

The question:

WHY on earth would you want this?

It's redundant. It's no more unique than the OwnerID already is. It's not
mnemonic (is SMI34 or SMI127 Janet Smith?) It's an "intelligent key" (and
no,
that's not a compliment, unfortunately).

It's easy to create this... but what use will it serve?
 
B

Bob Vance

This works except for St George
BankCode: Left([OwnerLastName],3) & [OwnerID]
Thanks Bob


Bob Vance said:
Thanks John, its a unique bank code given to my clients for a bank
reference on a statement, the first 3 letters gives you a heads up who it
is but the individual ID number is final, hmm what about say "St George
Club" Would I get STG I was going to use this in my query too =UCase
.........Regards Bob

John W. Vinson said:
LastName(Text) and ClientID(Number)
Are say 2 fields in my query how can I get the expression in Uppercase
First 3 characters in LastName & OwnerID
to get something like SMI45

An answer:

UCase(Left([LastName], 3) & OwnerID

The question:

WHY on earth would you want this?

It's redundant. It's no more unique than the OwnerID already is. It's not
mnemonic (is SMI34 or SMI127 Janet Smith?) It's an "intelligent key" (and
no,
that's not a compliment, unfortunately).

It's easy to create this... but what use will it serve?
 
M

Maarkr

UCase(Left(replace([OwnerLastName], " ",""), 3))

Bob Vance said:
This works except for St George
BankCode: Left([OwnerLastName],3) & [OwnerID]
Thanks Bob


Bob Vance said:
Thanks John, its a unique bank code given to my clients for a bank
reference on a statement, the first 3 letters gives you a heads up who it
is but the individual ID number is final, hmm what about say "St George
Club" Would I get STG I was going to use this in my query too =UCase
.........Regards Bob

John W. Vinson said:
LastName(Text) and ClientID(Number)
Are say 2 fields in my query how can I get the expression in Uppercase
First 3 characters in LastName & OwnerID
to get something like SMI45

An answer:

UCase(Left([LastName], 3) & OwnerID

The question:

WHY on earth would you want this?

It's redundant. It's no more unique than the OwnerID already is. It's not
mnemonic (is SMI34 or SMI127 Janet Smith?) It's an "intelligent key" (and
no,
that's not a compliment, unfortunately).

It's easy to create this... but what use will it serve?


.
 
B

Bob Vance

Brilliant Mark thanks for the help :)
Regards Bob

NameCode: UCase(Left(Replace([OwnerLastName]," ",""),3)) & [OwnerID]

Maarkr said:
UCase(Left(replace([OwnerLastName], " ",""), 3))

Bob Vance said:
This works except for St George
BankCode: Left([OwnerLastName],3) & [OwnerID]
Thanks Bob


Bob Vance said:
Thanks John, its a unique bank code given to my clients for a bank
reference on a statement, the first 3 letters gives you a heads up who
it
is but the individual ID number is final, hmm what about say "St George
Club" Would I get STG I was going to use this in my query too =UCase
.........Regards Bob

LastName(Text) and ClientID(Number)
Are say 2 fields in my query how can I get the expression in Uppercase
First 3 characters in LastName & OwnerID
to get something like SMI45

An answer:

UCase(Left([LastName], 3) & OwnerID

The question:

WHY on earth would you want this?

It's redundant. It's no more unique than the OwnerID already is. It's
not
mnemonic (is SMI34 or SMI127 Janet Smith?) It's an "intelligent key"
(and
no,
that's not a compliment, unfortunately).

It's easy to create this... but what use will it serve?


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Why wont my query Show Owner Name 3
Query Expression Help! 26
Filter a Listbox 27
Overdue Query help needed 3
Query 2
Combo Box 2
question about running a comparison query 2
query 1

Top