I have the following query in SQL Server
SELECT name,id FROM [someDatabase]
where id like 'testName'
Now I want to use name and id in another query and define name as NAME and id as ID
SELECT DISTINCT vision FROM [someDatabase] WHERE name = NAME
And id = ID
I'm not familiar with SQL server syntax. How do I define these two as local variables?
Thanks in advance.