View Single Post
  #6 (permalink)  
Old March 25th, 2008, 12:36 PM
Lauramc's Avatar
Lauramc Lauramc is offline
I like Data Cubes too...

 
Join Date: Mar 2008
Location: Far Far Away
Posts: 35
Thanks: 1
Thanked 1 Time in 1 Post
Rep Power: 1
Lauramc is on a distinguished road

Awards Showcase
Microsoft SQL Server 
Total Awards: 1

Default

You forgot one of the plus signs. Try this:
Code:
SELECT @sql = 'SELECT candidate_last_name, candidate_first_name 
                     FROM vw_applicationDetail 
                     WHERE application_status_id = ' + CAST(@statusCode As varchar(10)) +
                     'AND current_status_ind = ' + CAST(@currentStatus As varchar(10)) + ' ' +
                     'AND application_deleted_ind = 0 '
Also you were missing a closed parentheses. I checked this in query analyzer. It works now

Last edited by Lauramc; March 25th, 2008 at 12:41 PM. Reason: I realized a parentheses was missing.