Question: My query selects all of the clients EXCEPT clients that currently have an active occupancy (if they have an active occupancy, then they will have a link with the occupancy table where the end date is NULL).

I'm concatenating the LastName and FirstName of the client to set the DisplayMember of the Listbox Item and wanting to set the ValueMember of this item to the Id of the client.

```
        // Select all of the clients except for the ones who have an active occupancy
        // (if they have an occupancy with no end date)
        string query = "SELECT Id, CONCAT(LastName, ', ', FirstName) AS Name FROM Client " +
            "EXCEPT " +
            "SELECT Id, CONCAT(LastName, ', ', FirstName) AS Name FROM Client " +
            "RIGHT JOIN Occupancy ON Client.Id = Occupancy.ClientId " +
            "WHERE Occupancy.EndDate IS NULL ORDER BY Name ASC";

        using (connection = new SqlConnection(connectionString))
        using (SqlDataAdapter adapter = new SqlDataAdapter(query, connection))
        {
            DataTable dTable = new DataTable();
            adapter.Fill(dTable);

            listClients.DisplayMember = "Name";
            listClients.ValueMember = "Id";
            listClients.DataSource = dTable;
        }

```

However, when I run it I receive an error 'ambiguous column name 'Id'.'

Would I be better off adding an 'ActiveOccupancy' column to my Client table to avoid this problem or is there a way around it? Thank you.

Answer: 
Sounds like there is a column named `id` in both tables `client` and `occupancy`. The system doesn't know which one you mean. Tell it by qualifying the column:

```
...
SELECT client.id,
...

```

instead of just the unqualified name (`... SELECT id, ...`).
you need to change your 2nd query where used join with the table Occupancy and 
use `table.column` instead just use `column` name in selection

```
         SELECT Id, CONCAT(LastName, ', ', FirstName) AS Name FROM Client 
        EXCEPT 
        SELECT c.Id, CONCAT(c.LastName, ', ', c.FirstName) AS Name 
         FROM Client c
         RIGHT JOIN Occupancy ON c.Id = Occupancy.Clie
         WHERE Occupancy.EndDate IS NULL ORDER BY c.Name ASC

```