Question: can i use 

insert into (Table)
 values(xyz)
 where (xzy)

I am inserting values based of a checkbox selection

```
begin
  for idx in 1 .. apex_application.g_f01.count
  loop
    if apex_application.g_f01(idx) is not null then
       insert into CONSOLIDATE
         (filenumber, 
          INCOMINGDATE,
          filename
         )
         values
         (apex_application.g_f01(idx),
          apex_application.g_f03(idx),
          apex_application.g_f04(idx)

         );
    end if;
  end loop;
end;

```

which works great ..but now i want to use where Temporary='yes' in that statement..

I know u can use insert into (select x,y,z) where (xyz)
but i want the specific values from the check box..

Answer: 
Nope, you can't use `WHERE`, but you can use `CASE`, e.g.

```
values
     (case when apex_application.g_f01(idx) in ('A', 'B', 'C') then apex_application.g_f01(idx)
           else null
      end,
      apex_application.g_f01(idx),
      ...

```
Please try this, just select your check box values from dual and apply where condition as necessary

```
begin
  for idx in 1 .. apex_application.g_f01.count
  loop
    if apex_application.g_f01(idx) is not null then
       insert into CONSOLIDATE
         (filenumber, 
          INCOMINGDATE,
          filename
         )
         SELECT
          apex_application.g_f01(idx),
          apex_application.g_f03(idx),
          apex_application.g_f04(idx)
         FROM DUAL
         WHERE apex_application.g_f01(idx) = 'XYZ'  ;
    end if;
  end loop;
end;

```