ms-access


MULTIPLE JOIN IN MS ACCESS


SELECT VISA41717.Fraud_Post_Date,
VISA41717.Merchant_Name_Raw,
VISA41717.Merchant_City,
VISA41717.Merchant_Country,
VISA41717.Merchant_Category_Code,
VISA41717.ARN,
VISA41717.POS_Entry_Mode,
VISA41717.Fraud_Type,
VISA41717.Local_Amt,
VISA41717.Fraud_Amt,
VISA41717.Purch_Date,
VISA41717.Currency_Code,
VISA41717.Cashback_Indicator,
VISA41717.Card_Account_Num,
BIN.BANK,
BIN.COUNTRY
FROM ((VISA41717 AS VS)
LEFT JOIN MASTERCARD_VISA AS MV ON VS.ARN = MV.MICROFILM_NUMBER)
RIGHT JOIN BIN AS B ON LEFT(Card_Account_Num, 6) = B.INT
WHERE VISA41717.ARN IS NULL
OR MASTERCARD_VISA.MICROFILM_NUMBER IS NULL
ORDER BY VISA41717.ARN;
I tried this code but give me an error
JOIN EXPRESSION NOT SUPPORTED
Then, I tried this one:
SELECT VISA41717.Fraud_Post_Date,
VISA41717.Merchant_Name_Raw,
VISA41717.Merchant_City,
VISA41717.Merchant_Country,
VISA41717.Merchant_Category_Code,
VISA41717.ARN,
VISA41717.POS_Entry_Mode,
VISA41717.Fraud_Type,
VISA41717.Local_Amt,
VISA41717.Fraud_Amt,
VISA41717.Purch_Date,
VISA41717.Currency_Code,
VISA41717.Cashback_Indicator,
VISA41717.Card_Account_Num,
BIN.BANK,
BIN.COUNTRY,
LEFT(Card_Account_Num, 6) AS VBIN
FROM VISA41717,
BIN
LEFT JOIN MASTERCARD_VISA ON (VISA41717.ARN = MASTERCARD_VISA.MICROFILM_NUMBER
AND VBIN = B.INT);
WHERE VISA41717.ARN IS NULL
OR MASTERCARD_VISA.MICROFILM_NUMBER IS NULL
ORDER BY VISA41717.ARN;
Still there's an error
SYNTAX ERROR IN JOIN OPERATOR
I'am trying to create a table from two different tables.
Thank you in advance.
When things get too convoluted, it might help to create a query that delivers the required fields:
SELECT *, LEFT(Card_Account_Num, 6) As Card_Account_Num6
FROM VISA41717
WHERE ARN IS NULL
Now you can use the query GUI designer with this query and table BIN as source.
Consider adding a LEFT JOIN to the query with tables relative to VISA41717 and even use the string expression directly in the ON clause which is viable in MS Access SQL though expressions with constants are not: ID=7.
However, with such expressions warnings may rise if you attempt to view the query in Design View (assuming you use the GUI program, MSAccess.exe). Do note the required parentheses pairings.
...
(FROM VISA41717
LEFT JOIN MASTERCARD_VISA
ON (VISA41717.ARN = MASTERCARD_VISA.MICROFILM_NUMBER))
LEFT JOIN [BIN]
ON (LEFT(VISA41717.Card_Account_Num, 6) = [BIN].[INT])

Related Links

Ms Access: Running an update query
Access Query that brings up decimal amounts
Access 2016 Processes not being killed during Automation but same works for Access 2013/10/07
Unable to use Multivalue field in an exsting Access form
Insert value from textbox into 2 different table ms-access
Access 2013 Expression Builder not displaying
Missing ACCDB database drivers
MS Access Form button that allows user to browse/choose file, then imports file to a table
Can codesmith generator work with MS Access provider?
Access file unable to run in x64
Form.Seltop not selecting top most record
I have an ADO recordset, now I want to create a table from it but not at its connection location. How?
weighted average caluculation in access table
inputting info from one text box to another with command button
Sending attachments using access vba
Removing certain strings in an Access 2010 query

Categories

HOME
arduino-uno
vim
ionic-framework
hive
hook
angular-material
iterator
office365api
relayjs
relay
q
bookshelf.js
sqlite-net-extensions
yahoo-oauth
electronics
fsm
fingerprint
azure-media-services
swagger-ui
directx
medical
primary-key
windows-10-universal
spring-xd
imacros
google-cloud-spanner
alignment
usergrid
phaser
aurigma
grails3
conemu
dcevm
kudan
cultureinfo
autosys
shopware
intel-pin
buck
frame
oracle-fusion-middleware
catel
geopositioning
mixture-model
libvpx
sqlite2
android-fingerprint-api
streamreader
trim
quadratic-programming
google-closure
outlook-api
import-from-excel
btrace
scorm
azure-application-gateway
dandelion
nstextview
carrot
arrow-keys
jspdf-autotable
probability-density
skobbler-maps
disque
xpath-1.0
iad
rgeo
tableau-online
sysinternals
generic-programming
c3
nstableviewcell
expected-exception
comexception
oracle-warehouse-builder
app42
soundtouch
dataadapter
mylyn
limejs
lcs
selected
anonymous-methods
funscript
gdata-api
first-responder
runas
gnustep
data-loss
genshi
javax.script
self-extracting
xfbml
blitz++
vc90
privilege
anti-piracy
ubuntu-9.04
w3wp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App