T-SQL query to check number of existences
- by abatishchev
I have next approximate tables structure:
accounts:
ID INT,
owner_id INT,
currency_id TINYINT
related to
clients:
ID INT
and
currency_types:
ID TINYINT,
name NVARCHAR(25)
I need to write a stored procedure to check existence of accounts with specific currency and all others, i.e. client can have accounts in specific currency, some other…