Solved

Format Query to show only right 4 numbers

Posted on 2013-12-18
2
350 Views
Last Modified: 2013-12-18
I have a query that shows 16 text characters (credit card numbers).  the field from the table is formatted as text.

I want my query to show ************1223 as the card number instead of the whole number.  What format characteristics do I have to give this?

I know that in excel there is a RIGHT formula where i specify the number of fields...

My SQL statement looks like this:

SELECT Batchupload.[card type] AS CardType, Batchupload.amount, GetPendingBalances.Name, GetPendingBalances.Account, GetPendingBalances.Email, GetPendingBalances.CardNumber
FROM GetPendingBalances INNER JOIN Batchupload ON GetPendingBalances.ID = Batchupload.[line num]
WHERE (((Batchupload.[batch message])="declined"));

Open in new window


The field i want formatted is GetPendingBalances.CardNumber
0
Comment
Question by:colin911
2 Comments
 
LVL 19

Accepted Solution

by:
jss1199 earned 500 total points
ID: 39728145
Same as Excel :)

=RIGHT([GetPendingBalances.CardNumber],4)

reference: http://www.techonthenet.com/access/functions/string/right.php
0
 

Author Closing Comment

by:colin911
ID: 39728152
awesome!  thanks.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

746 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

13 Experts available now in Live!

Get 1:1 Help Now