I cannot get the variables to work in the Oracle PL / SQL where clause. I came from the background of Microsoft SQL Server and it was easy there. For example, what steps would you have to take to do something similar to the following?
declare @var int set @var = 1
select * from SomeTable where SomeField = @var
It doesn't seem like it should be complicated in PL / SQL, but obviously it is: - / I heard that I need to use cursors, etc. In PL / SQL?
Any help would be greatly appreciated. Thank.
Mattb source
share