Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: mohammed qasem
  Where is mohammed qasem?
 amman
 Jordan
 mohammed qasem
 Tags
Subject: RE: convert via select
Thread ID: 209829 Message ID: 209832 # Views: 2 # Ratings: 1
Version: Visual FoxPro 9 Category: Forms
Date: Wednesday, December 31, 2008 1:53:06 PM         
   


> hi all,
>
> is there a way to convert
> if T1.mark1=0 as still
> T1.mark1=1 as don
> T1.mark1=2 as no action
>
> at the grid1
>
> via this code
>
> WITH thisform.grid1
>  visible=.t.
> Select  T1.time1,T1.date1,T1.mark1,T2.depname,T1.discerror,T1.sno,;
>     T3.empname as 'empName_B', ;
>     T2.empname as 'empName_A', ;
>     T1.remark1,T1.remark2;
>       FROM trans1 T1 ;
>    INNER Join emp1 T2 On T1.empno = T2.empno AND T1.mark1>=0 ;
>    left Join empdep T3 On T1.fexerno=T3.empno ;
>       where T1.empno=thisform.text6.value ;
>               Order By date1,sno ;
>      nofilter ;
>             Into Cursor TAliascursor1
>   thisform.Grid1.RecordSource="TAliascursor1"  
> 

> thanks

Select  T1.time1,T1.date1,T1.mark1, ;
      cast( ;
        iCase( t1.Mark1 = 0, 'Still', ;
               t1.Mark1 = 1, 'Done', ;
               t1.Mark1 = 2, 'No Action', ;
               '' ) as c(10)) as 'mark1Condition', ;
    T2.depname,T1.discerror,T1.sno,;
    T3.empname as 'empName_B', ;
    T2.empname as 'empName_A', ;
    T1.remark1,T1.remark2;
      FROM trans1 T1 ;
   INNER Join emp1 T2 On T1.empno = T2.empno AND T1.mark1>=0 ;
   left Join empdep T3 On T1.fexerno=T3.empno ;
      where T1.empno=thisform.text6.value ;
              Order By date1,sno ;
     nofilter ;
            Into Cursor TAliascursor1


Cetin Basoz

ENTIRE THREAD

convert via select Posted by mohammed qasem @ 12/31/2008 1:30:05 PM
RE: convert via select Posted by Cetin Basoz @ 12/31/2008 1:53:06 PM
RE: convert via select Posted by M. Akram Bhatti @ 12/31/2008 1:56:06 PM