Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interesting bug related to date format
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Interesting bug related to date format
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01471121
Message ID:
01471121
Vues:
102
Hi everybody,

Found an interesting bug report on foxclub.ru website which I can easily reproduce. Not sure, how useful this is, but just an interesting case:
CREATE TABLE rc (id_pp int, dat_b date)    
SET STRICTDATE TO 0   
 && SET DATE GERMAN   
  SET DATE AMERICAN   
  &&USE IN query  
 && SELECT rc  
    
  ZAP IN rc  
    
 * Using this code - bug  
 *!*	INSERT INTO rc(id_pp,dat_b) VALUES (1,{01.01.2010})   
 *!*	INSERT INTO rc(id_pp,dat_b) VALUES (1,{01.01.2010})   
 *!*	INSERT INTO rc(id_pp,dat_b) VALUES (2,{01.01.2010})   
 *!*	INSERT INTO rc(id_pp,dat_b) VALUES (2,{01.01.2010})   
 *!*	INSERT INTO rc(id_pp,dat_b) VALUES (1,{01.02.2010})   
 *!*	INSERT INTO rc(id_pp,dat_b) VALUES (1,{01.02.2010})   
 *!*	INSERT INTO rc(id_pp,dat_b) VALUES (2,{01.02.2010})   
 *!*	INSERT INTO rc(id_pp,dat_b) VALUES (2,{01.02.2010})  
    
     
  * Using this code - no bug  
      INSERT INTO rc(id_pp,dat_b) VALUES (1,{^2010-01-02})      
      INSERT INTO rc(id_pp,dat_b) VALUES (1,{^2010-01-02})      
      INSERT INTO rc(id_pp,dat_b) VALUES (2,{^2010-01-02})      
      INSERT INTO rc(id_pp,dat_b) VALUES (2,{^2010-01-02})      
      INSERT INTO rc(id_pp,dat_b) VALUES (1,{^2010-01-02})      
      INSERT INTO rc(id_pp,dat_b) VALUES (1,{^2010-01-02})      
      INSERT INTO rc(id_pp,dat_b) VALUES (2,{^2010-01-02})      
      INSERT INTO rc(id_pp,dat_b) VALUES (2,{^2010-01-02})      
    
 *BROWSE  
      SELECT id_pp,dat_b, COUNT(DISTINCT id_pp) AS countp FROM rc GROUP BY id_pp,dat_b
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform