Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: chris preston
  Where is chris preston?
 Kingston
 Jamaica
 chris preston
 To: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 Tags
Subject: RE: join 2 varables in IIF statement
Thread ID: 373376 Message ID: 373499 # Views: 32 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Friday, March 22, 2013 4:05:22 PM         
   


> >
> > Hell Anders
> > I am getting an " error building sort keys" i made a change to the year(dates) = year(tmp) but i still go the error
>
>
> Try again with
>
 SELECT Tmp.itemkey, '_'+TRANSFORM(YEAR(Tmp.documentdate)+'-'+PADL(MONTH(Tmp.documentdate),2,'0') From Tmp ...

>
> If that gets too complex I have hird way. Include the expression
> '_'+TRANSFORM(YEAR(Dates.ddate))+'-'+PADL(MONTH(Dates.ddate),2,'0') as column in Dates and refer to that column in the query Q1.
>
ALTER TABLE Dates Add yearmonth C(10) 
> UPDATE Dates SET yearmonth = '_'+TRANSFORM(YEAR(Dates.ddate))+'-'+PADL(MONTH(Dates.ddate),2,'0')
> 

> -Anders



Thanks to both of you guys, both ways will help me tremendously as I work with a lot of transaction records which always needs combining to present in different shapes and forms.

ENTIRE THREAD

join 2 varables in IIF statement Posted by chris preston @ 3/21/2013 7:36:06 PM
RE: join 2 varables in IIF statement Posted by Anders Altberg @ 3/21/2013 8:35:54 PM
RE: join 2 varables in IIF statement Posted by chris preston @ 3/21/2013 11:19:08 PM
RE: join 2 varables in IIF statement Posted by Anders Altberg @ 3/22/2013 11:51:44 AM
RE: join 2 varables in IIF statement Posted by chris preston @ 3/22/2013 4:05:22 PM
RE: join 2 varables in IIF statement Posted by Cetin Basoz @ 3/22/2013 2:10:51 PM