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  | 
                             
                            
                                    | 
                                         rwaldron 
                                        Posting Yak  Master 
                                         
                                        
                                        131 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2005-06-29 : 10:25:01
                                            
  | 
                                             
                                            
                                            | Hi all ..Please help..This has been driving me nuts..I have a linked server in SQL to a Pervasive DB...If I run the query SELECT *From OPENQUERY(servicebase_live_link, 'SELECT * from contacts')I get the correct databack as the table contacts just contains Datatypes CHAR.However when I run the query  SELECT *From OPENQUERY(servicebase_live_link, 'SELECT * from jobs')I get the error "Error converting data type DBTYPE_DBDATE to datetime."I know this is because the Table jobs contains datatypes of CHAR,DATE,INTEGER,TIME and to start with I know the date datatype must be causing problems....I have tried returning just one column (date_booked) and casting certain fields (date_booked) to get around this but none work.Such asSELECT *From OPENQUERY(servicebase_live_link, 'select CAST(date_booked AS DATETIME) from jobs')Can someone please help me get this to work ...Do I need to explicitly set all the fields that are set to these datatypes ?Thx in advanceRay.. | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     Bustaz Kool 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    1834 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2005-06-29 : 20:59:14
                                          
  | 
                                         
                                        
                                          | What does the imported "date string" look like?  You should be able to convert the source data into an acceptable format.HTH================================================================='Tis with our judgements as our watches: none Go just alike, yet each believes his own. -Alexander Pope, poet (1688-1744)  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |