Soldato
- Joined
- 18 Oct 2002
- Posts
- 16,033
- Location
- The land of milk & beans
Admittedly my SQL is a bit rusty when deviating from the basics, but this shouldn't be as difficult as it's turning out to be.
Anyway, put simply the problem is i need to run a query, and return the values into declared variables, the below is just returning null for both entries
Any help appreciated!
Anyway, put simply the problem is i need to run a query, and return the values into declared variables, the below is just returning null for both entries

Any help appreciated!
DECLARE @AccountID int
DECLARE @BroadcastID int
DECLARE @CampaignID int
SET @BroadcastID = 1
SELECT AccountID, CampaignID FROM Broadcasts WHERE BroadcastID = @BroadcastID
SELECT @AccountID AS AccountID
SELECT @CampaignID AS CampaignID