Solved

Format Query to show only right 4 numbers

Posted on 2013-12-18
2
381 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Undo Button 1 35
Database maintenance 36 112
MS Access VBA How To Properly Set Up A multipart/related HTTP Request 13 73
How do a DCount on a report 1 18
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

730 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