aron.ridgway
Registered User.
- Local time
- Today, 23:09
- Joined
- Apr 1, 2014
- Messages
- 148
Hi There, i have created a Union sql Table View, that i have connected to in access. Its a list from 5 different companines of Supplier accounts. I need to create an autonumber for this table? Not sure if this may be more SQL based than access, but any pointers would be greatly appreciated!!
SELECT PLSupplierAccountID AS AccountID, SupplierAccountNumber AS AccountNumber, SupplierAccountName AS AccountName, 'RWL' AS Company
FROM Roth.dbo.PLSupplierAccount
UNION ALL
SELECT PLSupplierAccountID AS AccountID, SupplierAccountNumber AS AccountNumber, SupplierAccountName AS AccountName, 'FAH' AS Company
FROM FAH.dbo.PLSupplierAccount
UNION ALL
SELECT PLSupplierAccountID AS AccountID, SupplierAccountNumber AS AccountNumber, SupplierAccountName AS AccountName, 'RFG' AS Company
FROM RFG.dbo.PLSupplierAccount
UNION ALL
SELECT PLSupplierAccountID AS AccountID, SupplierAccountNumber AS AccountNumber, SupplierAccountName AS AccountName, 'RFP' AS Company
FROM RFP.dbo.PLSupplierAccount
UNION ALL
SELECT PLSupplierAccountID AS AccountID, SupplierAccountNumber AS AccountNumber, SupplierAccountName AS AccountName, 'RFW' AS Company
FROM ALOPS.dbo.PLSupplierAccount
SELECT PLSupplierAccountID AS AccountID, SupplierAccountNumber AS AccountNumber, SupplierAccountName AS AccountName, 'RWL' AS Company
FROM Roth.dbo.PLSupplierAccount
UNION ALL
SELECT PLSupplierAccountID AS AccountID, SupplierAccountNumber AS AccountNumber, SupplierAccountName AS AccountName, 'FAH' AS Company
FROM FAH.dbo.PLSupplierAccount
UNION ALL
SELECT PLSupplierAccountID AS AccountID, SupplierAccountNumber AS AccountNumber, SupplierAccountName AS AccountName, 'RFG' AS Company
FROM RFG.dbo.PLSupplierAccount
UNION ALL
SELECT PLSupplierAccountID AS AccountID, SupplierAccountNumber AS AccountNumber, SupplierAccountName AS AccountName, 'RFP' AS Company
FROM RFP.dbo.PLSupplierAccount
UNION ALL
SELECT PLSupplierAccountID AS AccountID, SupplierAccountNumber AS AccountNumber, SupplierAccountName AS AccountName, 'RFW' AS Company
FROM ALOPS.dbo.PLSupplierAccount