title: Why do I get Bind Variable "DeliveryDate_Variable" is NOT DECLARED(Completely New TO Oracle)
body: <p>I have the following script in Oacle
  I do not understand why i get</p>
  
  <p>Bind Variable "DeliveryDate_Variable" is NOT DECLARED</p>
  
  <p>Everything looks ok to me</p>
  
  <pre><code>VARIABLE RollingStockTypeId_Variable NUMBER := 1;
  VARIABLE DeliveryDate_Variable DATE := (to_date('2010/8/25:12:00:00AM', 'yyyy/mm/dd:hh:mi:ssam'));
  
  SELECT DISTINCT
         rs.Id,
         rs.SerialNumber,
         rsc.Name AS Category,
         (SELECT COUNT(Id) from ROLLINGSTOCKS WHERE ROLLINGSTOCKCATEGORYID = rsc.id) as "Number Owened",
         (SELECT COUNT(rs.Id)                 
         FROM ROLLINGSTOCKS rs       
         WHERE rs.ID NOT IN(  select RollingStockId 
                              from ROLLINGSTOCK_ORDER
                              WHERE :DeliveryDate_Variable  BETWEEN DEPARTUREDATE AND DELIVERYDATE)    
         AND rs.RollingStockCategoryId IN (Select Id 
                                          from RollingStockCategories 
                                          Where RollingStockTypeId = :RollingStockTypeId_Variable)
                                          AND rs.RollingStockCategoryId =     rsc.Id) AS "Number Available"
         FROM ROLLINGSTOCKS rs
         JOIN RollingStockCategories rsc ON rsc.Id = rs.RollingStockCategoryId
         WHERE rs.ID NOT IN(
                              select RollingStockId 
                              from ROLLINGSTOCK_ORDER
                              WHERE :DeliveryDate_Variable  BETWEEN DEPARTUREDATE AND DELIVERYDATE
                            )    
         AND rs.RollingStockCategoryId IN 
                            (
                              Select Id 
                              from RollingStockCategories 
                              Where RollingStockTypeId = :RollingStockTypeId_Variable 
                            )
        ORDER BY rsc.Name                       
  </code></pre>