Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI, I'm new to this, and new to scripting..
I get the functions working(I can load as per the date OR as per the ser assignment types) but not in combination.. I want to load specific assignment types after a specified date.. as below.. but its not correct.
WHERE (([BookingDate]>'2010-01-01') AND ([AssignmentType]= 3 OR [AssignmentType]= 2 OR [AssignmentType]= 4 OR [AssignmentType]= 8 OR [AssignmentType]= 6);
Hope someone can help me sort this out..
Thanks
The problem is most likely that your parentheses don't match up and that BookingDate is a date and not a string. Try this one:
WHERE [BookingDate]> makedate(2010) AND match([AssignmentType], '2','3','4','6','8')
The problem is most likely that your parentheses don't match up and that BookingDate is a date and not a string. Try this one:
WHERE [BookingDate]> makedate(2010) AND match([AssignmentType], '2','3','4','6','8')
Thank you Gysbert. It worked !
i,
Make sure than your sintax is correct. A missing coma or ending with a coma just bedore the 'FROM' clause might break your code.
I am sending you a code example than you can use... ! !
Directory;
Transactions:
Load
TransLineID,
TransID,
mod(TransID,26)+1 as Num,
Pick(Ceil(3*Rand1),'A','B','C') as Dim1,
Pick(Ceil(6*Rand1),'a','b','c','d','e','f') as Dim2,
Pick(Ceil(3*Rand()),'X','Y','Z') as Dim3,
Round(1000*Rand()*Rand()*Rand1) as Expression1,
Round( 10*Rand()*Rand()*Rand1) as Expression2,
Round(Rand()*Rand1,0.00001) as Expression3;
Load
Rand() as Rand1,
IterNo() as TransLineID,
RecNo() as TransID
Autogenerate 1000
While Rand()<=0.5 or IterNo()=1;
Store Transactions into Transactions.qvd (qvd);
DROP TABLE Transactions;
// Loading QVD
Transactions:
LOAD TransLineID,
TransID,
Num,
Dim1,
Dim2,
Dim3,
Expression1,
Expression2,
Expression3
FROM
Transactions.qvd
(qvd)
// Where clause after the FROM clause
WHERE (Dim1 = 'A' OR Dim2 = 'c') AND Dim3 <> 'C';