Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If 'x' is the table having 'a' & 'b' fields . I need something like,
Comm =
How can I write in the script ??
Thanks in advance.
I believe it decided that "Total" is a file, and it used whatever your current path is to find that file. There's no such file, so it gives you an error. I don't have experience with access databases, but I believe you have to use the SQL keyword to tell it to send the next bit of script to the ODBC driver to pass to the database. Then you load from those results by using a preceeding load. Put it all together, and I think you want something like this:
LOAD [Inside %],
[Total Costs],
([Inside %]*([Total Costs]/100)) AS COMMISSION
;
SQL SELECT Inside %, Total Costs
FROM Total
;
Will that expression be part of the loading of table x from the database or QVD? Or will it be part of a Resident load of table x?
If so, you should be simple:
LOAD a, b, (a * (b / 100) As Comm
Hi Miller
Thanks for your reply. Expression is a part of the loading table from the database (ACCESS)
Iam getting the script error. Here is my exp.
LOAD a %,b (a % * (b/100)) AS COMM
FROM X;
Any suggestions ??
Thanks
You have '%' symbol after load a, replace it with ,
Try this
LOAD a ,
b ,
(a % * (b/100)) AS COMM
FROM X;
Hi
Thanks for your reply. Still iam getting script error…might be because of % symbol.
Field names : a %, b
Table name : X
Here is my revised exp.
LOAD a ,
Total b ,
(a % * (b/100)) AS COMM
FROM X;
Any suggestions please ??
Thanks
a % doesn't work as a field name without brackets. Field names with spaces (and I'm sure % signs) need brackets.
LOAD [a %],
Total b ,
([a %] * (b/100)) AS COMM
FROM X;
What is Total b supposed to be doing?
Total b should be enclose in the bracket as [Total b ]
Hi
Thanks for your replies. I tried both the examples and still getting script error.
This is the actual measure :
COMMISSION = (Total Costs*(Inside %)/100)
'Total Costs' and 'Inside %' are the fields in 'Total' table. ODBC connected to ACCESS database.
I have written script like this :
LOAD [Inside %],
[Total Costs],
([Inside %]*([Total Costs]/100)) AS COMMISSION
FROM Total;
Note : Field names having spaces.
Can anyone help ???
Thanks
Hi,
What is the message of your script error?
Have you checked if your FROM sentence is correct?
Regards
Hi
script is like this:
LOAD [Inside %],
[Total Costs],
([Inside %]*([Total Costs]/100)) AS COMMISSION
FROM Total;
After execution, Iam getting script error like this :
Cannot open file 'C:\Documents and Settings\ Desktop\Total'
LOAD [Inside %],
[Total Costs],
([Inside %]*([Total Costs]/100)) AS COMMISSION
FROM Total
Any suggestions ???
Thanks