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

linked table xxx is unavailable. Microsoft access cannot contact the server
Does this Dlookup have incorrect syntax?
How to combine two fields in Form to one field from Microsoft Access?
Report building from selection in datasheet
Multiple arguments IsNull function MS Access VBA
how to pass parameters to ExportWithFormatting using vbscript
Access 2010 cascading combo boxes runtime error 424
Access Month Calendar View
Shapefile to MDB with custom field structure [duplicate]
Query JET 4 database with SSIS
Microsoft Access 2010: Query Criteria moving
Is there a way to create an Access database from a Visio database model?
Access: insert multiselect box values into database
ms access extra table indexes
Recordsource vs Recordset for Unbound Forms
Access Database Remote Connection

Categories

HOME
pdf
objectgears
android-4.4-kitkat
xmpp
google-docs
analysis
yarn
cakephp-2.5
jxls
webpack-2
installshield
synchronization
gitpitch
gorm
offline
numeral.js
hapi
decomposition
zurb-foundation-6
buildbot
semantic-analysis
ping
large-file-upload
libssl
key-value-observing
android-nestedscrollview
nssegmentedcontrol
suricata
serve
swisscomdev
automake
temporary-files
awt
sas-visual-analytics
optix
galen
nand2tetris
heightmap
netcdf4
btrace
logfiles
taffy
strptime
jquery-validate
dropbox-php
veracode
darcs
setter
lync-client-sdk
gnome-shell-extensions
xcb
pcf
mongocsharpdriver
fputcsv
disque
markojs
qtableview
qdialog
wireshark-dissector
twirl
iiviewdeckcontroller
inmobi
directoryservices
dd
android-imagebutton
phalanger
asp.net-web-api-odata
mesa
oracle-warehouse-builder
java.nio.file
mysqltuner
aqtime
dbconnection
file-locking
xamlparseexception
factory-method
gdata-api
errai
deobfuscation
disclosure
zend-translate
digest-authentication
libs
misv





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