| 
                
Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with. 
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | prasuStarting Member
 
 
                                        1 Post | 
                                            
                                            |  Posted - 2008-07-14 : 02:37:55 
 |  
                                            | I am trying to transform data into Excel2000 from the following SQL Query .I am getting INVALID POINTER error.Please give solution at the earliest.use POMDB  select  a.company_code,a.locn_no,datediff (dd,getdate(),f.due_date) as age ,f.due_date ,    a.indent_no,indent_date,isnull(g.po_no, ' ') po_no,stock_no,stock_variant,   (select description from common..ims_stock_master d (nolock)   where b.company_code  = d.company_no   and b.locn_no  = d.location_no   and  b.stock_no  = d.stock_no)   as description,    purchase_uom,b.required_qty_puom,b.authorised_qty_puom as pqr_authorised_qty_puom,   b.po_covered_qty_puom,b.po_authorised_qty_puom,b.balance_rec_qty_puom,     indent_type,indent_category,indent_status,     (select param_value from pomdb..pur_comp_parameter_detail c (nolock)   where  a.company_code  = c.company_code   and  a.purpose   = c.param_code   and  c.param_class  = 'USRDFL'   and c.param_cat  = 'POM'   and c.param_type  = 'WUSD')as dept,   req_emp_no,     (select h04_first_name from common..h04_namemaster e (nolock)    where a.company_code  = e.c03_organisation_code   and a.req_emp_no  = e.h01_emp_num ) as emp_name,   a.authorise_user_name,isnull(rec_wh_no,'' ) as rec_wh_no    from  pomdb..pur_indent_header  a (nolock),   pomdb..pur_indent_detail  b (nolock),   pomdb..pur_indent_schedule  f (nolock),   pomdb..pur_po_indent  g (nolock)    where  a.company_code  = b.company_code  and a.company_code  = f.company_code  and a.company_code  *= g.company_code        and a.company_code  = 'ARGRPARB'  and  a.locn_no  = b.locn_no  and  a.locn_no  = f.locn_no  and  a.locn_no  *= g.locn_no        and  a.indent_no  = b.indent_no   and  a.indent_no  = f.indent_no   and  a.indent_no  *= g.indent_no     and b.indent_serial  = f.indent_serial  and b.indent_serial  *= g.indent_serial  and  f.schedule_no  *= g.indent_schedule  and  a.indent_status  =  ('A')  and  b.balance_rec_qty_puom > 0      -- and  b.po_covered_qty_puom > 0    order by datediff (dd,getdate(),f.due_date) desc ,a.indent_no            vph |  |  
                                |  |  |  |  |  |