Stack Exchange
ORA-06550: close symbol encountered
set serveroutput on;
DECLARE
  CURSOR 
  IS 
    SELECT SVL_ID 
      FROM SALES_VEHICLES 
     WHERE SVL_N = 'some value';--314653;

    TYPE SVD_TA IS TABLE OF VSALES%ROWTYPE;
    SV SVD_TA;
BEGIN
  OPEN VSALES;
  FETCH VSALES BULK COLLECT INTO SV LIMIT 1000;
  CLOSE VSALES;

  IF SV.COUNT() <> 0 
  THEN
    FOR I IN 1..SV.COUNT() 
    LOOP
       UPDATE SALES_VEHICLES
          SET SVL_M  = 'some value', 
              SVL_M  = SVL_C_N
        WHERE SVL_ID = I.SVL_ID;

       COMMIT;
     END LOOP;
   END IF;
   EXIT WHEN VSALES%NOTFOUND;
  END LOOP;
  CLOSE VSALES;
END;

I having trouble debugging this. The error is at line 32, column 5. I would be immensely grateful if you can help me out with this issue. 

You are closing the cursor twice. Once after retrieving it and once at the very end. But yhy are you using a cursor for this at all? The whole procedure can be replace with a single update statement - which will also be a lot faster then your slow row-by-row approach.

I have been asked to not use the single update statement. I tried closing the cursor only once and I am still get the ORA 06550 error.(encountered the symbol end)

No offence, but that is a stupid request. Why do something the slow and non-scalable way?

I am sorry. I am new to PL/SQL. My boss asked me to do this. Can you please tell me how can I fix this?

What happens if the cursor returns more than 1000 rows? Also, the commit should be outside the loop.

You have double close tthe same cursor in line 15 and 32.
Probably you don't want to close just after fetch.
BEGIN
  OPEN VSALES;
  LOOP
  FETCH VSALES BULK COLLECT INTO SV LIMIT 1000;

  IF SV.COUNT() <> 0 
  THEN
    FOR I IN 1..SV.COUNT() 
    LOOP
       UPDATE SALES_VEHICLES
          SET SVL_M  = 'some value', 
              SVL_M  = SVL_C_N
        WHERE SVL_ID = SV(I).SVL_ID;;

       COMMIT;
     END LOOP;
   END IF;
   EXIT WHEN VSALES%NOTFOUND;
  END LOOP;
  CLOSE VSALES;
END;


I tried closing the cursor only once and I am still get the ORA 06550 error.(encountered the symbol end)

Because you have also two end loop; and only one loop. Probably you're missing loop after opening cursor @ishan

@ishan try that

I found the solution. I was missing the following. Here's what I changed
FROM THIS:
 WHERE  SVL_ID    = I.SVL_ID;

TO THIS:
 WHERE  SVL_ID    = SV(I).SVL_ID;


It seems a bit more complicated than it needs to be. For a plain cursor loop, you could just do this:
begin
    for r in (
        select svl_id 
        from   sales_vehicles 
        where  svl_n = 'some value' --314653;
    )
    loop
        update sales_vehicles
        set    svl_m  = 'some value', svl_m  = svl_c_n
        where  svl_id = r.svl_id;
    end loop;

    commit;
end;

Or if you really want to use an array (and take the chance that it'll take more memory than you bargained for):
declare
    type svid_tt is table of sales_vehicles.svl_id%type;
    l_svids svid_tt;
begin
    select svl_id bulk collect into l_svids
    from   sales_vehicles 
    where  svl_n = 'some value';--314653;

    if l_svids.count > 0 then
        forall i in 1..l_svids.count 
            update sales_vehicles
            set    svl_m  = 'some value', svl_m  = svl_c_n
            where  svl_id = l_svids(i);
    end if;

    commit;
end;

You could make the array version more robust by adding a limit clause and a loop, and checking for bulk exceptions etc.
