A
Ansible
The below make-table query returns 232 records when I click VIEW. But if I
click RUN, the table it creates has 233 records. A simpler count query
returns the correct 233 records. When I enter a different year at the What
Year prompt, I get the same problem - VIEW gives 1 less record than RUN.
These are linked tables from SQL Server. If I run the query (as a Select or
as an Insert Into) in SQL Server Manager, it returns the correct 233 records.
Why would the preview in Access be different from when it executes the
make-table? Thanks.
SELECT dbo_application.application_id AS [Appl ID],
dbo_application.last_name AS [Last Name],
dbo_application.first_name AS [First Name],
(SELECT [program]+'-'+[location] AS Pref1 FROM dbo_preferences
WHERE (((dbo_preferences.rank)=1) AND ((dbo_preferences.application_id)=
dbo_application.application_id ))) AS Pref1,
(SELECT [program]+'-'+[location] AS Pref2 FROM dbo_preferences
WHERE (((dbo_preferences.rank)=2) AND ((dbo_preferences.application_id)=
dbo_application.application_id ))) AS Pref2,
(SELECT [program]+'-'+[location] AS Pref3 FROM dbo_preferences
WHERE (((dbo_preferences.rank)=3) AND ((dbo_preferences.application_id)=
dbo_application.application_id ))) AS Pref3,
(SELECT [program]+'-'+[location] AS Pref4 FROM dbo_preferences
WHERE (((dbo_preferences.rank)=4) AND ((dbo_preferences.application_id)=
dbo_application.application_id ))) AS Pref4,
(SELECT [program]+'-'+[location] AS Pref5 FROM dbo_preferences
WHERE (((dbo_preferences.rank)=5) AND ((dbo_preferences.application_id)=
dbo_application.application_id ))) AS Pref5,
dbo_application.selection_program AS [Selected Program],
dbo_application.selection_location AS [Selected Location],
straight_through AS Cat, application_year
INTO FOO_TEMP
FROM dbo_application
WHERE (dbo_application.application_year)= [What_Year?]
ORDER BY dbo_application.last_name, dbo_application.first_name
click RUN, the table it creates has 233 records. A simpler count query
returns the correct 233 records. When I enter a different year at the What
Year prompt, I get the same problem - VIEW gives 1 less record than RUN.
These are linked tables from SQL Server. If I run the query (as a Select or
as an Insert Into) in SQL Server Manager, it returns the correct 233 records.
Why would the preview in Access be different from when it executes the
make-table? Thanks.
SELECT dbo_application.application_id AS [Appl ID],
dbo_application.last_name AS [Last Name],
dbo_application.first_name AS [First Name],
(SELECT [program]+'-'+[location] AS Pref1 FROM dbo_preferences
WHERE (((dbo_preferences.rank)=1) AND ((dbo_preferences.application_id)=
dbo_application.application_id ))) AS Pref1,
(SELECT [program]+'-'+[location] AS Pref2 FROM dbo_preferences
WHERE (((dbo_preferences.rank)=2) AND ((dbo_preferences.application_id)=
dbo_application.application_id ))) AS Pref2,
(SELECT [program]+'-'+[location] AS Pref3 FROM dbo_preferences
WHERE (((dbo_preferences.rank)=3) AND ((dbo_preferences.application_id)=
dbo_application.application_id ))) AS Pref3,
(SELECT [program]+'-'+[location] AS Pref4 FROM dbo_preferences
WHERE (((dbo_preferences.rank)=4) AND ((dbo_preferences.application_id)=
dbo_application.application_id ))) AS Pref4,
(SELECT [program]+'-'+[location] AS Pref5 FROM dbo_preferences
WHERE (((dbo_preferences.rank)=5) AND ((dbo_preferences.application_id)=
dbo_application.application_id ))) AS Pref5,
dbo_application.selection_program AS [Selected Program],
dbo_application.selection_location AS [Selected Location],
straight_through AS Cat, application_year
INTO FOO_TEMP
FROM dbo_application
WHERE (dbo_application.application_year)= [What_Year?]
ORDER BY dbo_application.last_name, dbo_application.first_name