I have two tables (`Items` and `Item_Types`), and I want to do something like the following as a formula in a calculated column in the `Item_Types` table:

```
SELECT SUM(Items.Qty_In_Stock) FROM Items WHERE Items.Item_Type = Item_Types.ID

```

But Management Studio isn't liking it.

How can I do this? Or have I just got my syntax wrong? I'm not great with SQL.

Thanks

EDIT: I think I need to be more specific.

One `ItemType` can have many `Items`.

Each `Item` has a `Qty_In_Stock` field.

I want to get a sum of all `Qty_In_Stock` fields *where `Items.Item_Type` = `Item_Types.ID`* - not just a sum of the entire column.

Cheers