Qualify Object Names not working
Tamila
Posts: 1 New member
in SQL Prompt
I am trying to use Qualify Object Names on my query, but it doesn't seem to be working. It doesn't return any errors, but it doesn't qualify the fields. It's a simple query that joins two tables. What could be the issue here??
SELECT
ApplCodeAccountNumber,
AccountNumber,
CustomerName,
CustomerNumber,
HouseholdName,
HouseholdNumber,
HouseholdBUID,
HouseholdBUName,
SUM(NetContribution) AS NetContribution,
SUM(NetInterestIncome) AS NetInterestIncome,
SUM(TotalRevenue) AS Revenue,
SUM(AverageAssetBalance)/12 AS AverageLoansBalance,
SUM(AverageLiabilityBalance)/12 AS AverageDepositsBalance
FROM Table1 AS PR
INNER JOIN Table2 AS BU
ON CAST(HouseholdBUID AS INTEGER) = CAST(Org_ID AS INTEGER)
WHERE
Date BETWEEN @prevFirstDate AND @prevLastDate
AND Physical_Branch = 1
AND Is_Current_Business_Unit = 1
AND IsEmployeeHousehold = 0
GROUP BY
ApplCodeAccountNumber,
AccountNumber,
CustomerName,
CustomerNumber,
HouseholdName,
HouseholdNumber,
HouseholdBUID,
HouseholdBUName
SELECT
ApplCodeAccountNumber,
AccountNumber,
CustomerName,
CustomerNumber,
HouseholdName,
HouseholdNumber,
HouseholdBUID,
HouseholdBUName,
SUM(NetContribution) AS NetContribution,
SUM(NetInterestIncome) AS NetInterestIncome,
SUM(TotalRevenue) AS Revenue,
SUM(AverageAssetBalance)/12 AS AverageLoansBalance,
SUM(AverageLiabilityBalance)/12 AS AverageDepositsBalance
FROM Table1 AS PR
INNER JOIN Table2 AS BU
ON CAST(HouseholdBUID AS INTEGER) = CAST(Org_ID AS INTEGER)
WHERE
Date BETWEEN @prevFirstDate AND @prevLastDate
AND Physical_Branch = 1
AND Is_Current_Business_Unit = 1
AND IsEmployeeHousehold = 0
GROUP BY
ApplCodeAccountNumber,
AccountNumber,
CustomerName,
CustomerNumber,
HouseholdName,
HouseholdNumber,
HouseholdBUID,
HouseholdBUName
Tagged:
Answers
If this query is executed after the creation of tables, suggestions can be out of date. I would suggest to "Refresh suggestion" (SQL Prompt menu -> Refresh suggestions [ctrl+shift+d]) and then try to use "Qualify Object Names" command.
If that didn't help can you send us Prompt logs?
Hope that helps.
Krzysztof