Houstonking
New Member
- Joined
- Jul 12, 2016
- Messages
- 41
Hello I have attached query in power query connected to SQL Server Database - how do i get a list of account numbers in the query from excel list - the list is as below and they change daily -
1234444
4445555
6666555
SELECT Distinct CONVERT(VARCHAR(50), a.entered, 101) AS Entered
, CONVERT(VARCHAR(50), a.contractdate, 101) AS ContractDate
,a.[LDC]
, a.[BusinessUnit]
WHERE a.[AppLocation] IN ('Daily')
AND a.[AccountNo] in (here there needs to be a list of account numbers from excel sheet)
so should look like AND a.[AccountNo] in ('1234444','4445555','6666555')
1234444
4445555
6666555
SELECT Distinct CONVERT(VARCHAR(50), a.entered, 101) AS Entered
, CONVERT(VARCHAR(50), a.contractdate, 101) AS ContractDate
,a.[LDC]
, a.[BusinessUnit]
WHERE a.[AppLocation] IN ('Daily')
AND a.[AccountNo] in (here there needs to be a list of account numbers from excel sheet)
so should look like AND a.[AccountNo] in ('1234444','4445555','6666555')