---
title: "Unable to see table views in SQL macro"
canonical: "https://support.appfire.com/space/SUPPORT/89139230/Unable%20to%20see%20table%20views%20in%20SQL%20macro"
format: markdown
---
## Problem statement

Table views are not listed in the *SQL statement *drop down in the *SQL settings *tab of SQL macro, whereas you can find them in the database.

## Environment

| **Application** | SQL for Confluence (Pro edition) |
| --- | --- |
| **App version** | 10.0.1 or greater |

## Cause

This issue occurs due to <span style="color: #1d1c1d">cached data of the </span>*<span style="color: #1d1c1d">SQL for Confluence </span>*<span style="color: #1d1c1d">app.</span>

## Solution

Perform the following: 

1. Log into the Confluence instance and edit the SQL macro setting to select the view in the intended page.   
Notice that the view is not available as shown in the below screenshot:
2. Log into Confluence as an Administrator and <span style="color: #091e42">navigate to</span><span style="color: #091e42"> </span>> Macro (inline-external-image)

<span style="color: #091e42"> </span>**> General configuration***.*
3. <span style="color: #000000">From the left sidebar, select</span><span style="color: #172b4d"> </span>*Cache Management**<span style="color: #172b4d"> </span>*<span style="color: #172b4d">under </span><span style="color: #172b4d">*Administration*</span><span style="color: #172b4d">.</span>
4. <span style="color: #172b4d">In the</span><span style="color: #172b4d"> </span>*Cache Statistics*<span style="color: #172b4d"> </span><span style="color: #172b4d">screen, for </span>*<span style="color: #172b4d">Bob Swift Atlassian Apps - Sql</span>*<span style="color: #172b4d">, click</span><span style="color: #172b4d"> </span>**Flush**.  
> Macro (inline-media-image)
5. <span style="color: #000000">Navigate to the required page and click the Edit icon (</span><span style="color: #000000">).</span>
6. <span style="color: #000000">Add a </span>SQL<span style="color: #000000"> macro and click </span>**Edit**<span style="color: #000000"> to open the macro editor.</span>
7. Select the *Data source profile* that has a connection to the database where the view was created.
8. In the ***SQL settings > SQL statement > Select tables and views*** dropdown, enter the required view name. You now see the intended views listed in the drop down.

> ℹ️ - It is recommended to test these steps in a non-production environment before implementing it in the production environment.
> ℹ️ - <span style="color: #1d1c1d">During a flush, only cached data that is not visible to the user is cleaned.</span>