Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi:
I have this simple script:
LET vL.StartingDate = num(YearStart(today()));
LET vL.EndingDate = '20130131'; ////num(today());
Calendar:
LOAD
date(recno()+$(vL.StartingDate)-1,'YYYYMMDD') as SDate
autogenerate($(vL.EndingDate)-$(vL.StartingDate)+1);
for i = 0 to 1 ///NoOfRows(CalendarSAP)-1 /// Uncomment later. It works fine with NoOfRows
LET vL.LoopingDate = peek('SDate',$(i),'Calendar');
trace $(vL.LoopingDate);
MYTABLE:LOAD date,
field1,
field2FROM
[prueba.xls]
(biff, embedded labels, table is [Sheet1$])where date = $(vL.LoopingDate);
next i;
LET vL.Filas = NoOfRows(MYTABLE); ////DON'T WORK. WHAT CAN I DO
LET vL.Columnas = NoOfRows(MYTABLE); ////DON'T WORK. WHAT CAN I DO
Store * from MYTABLE into MYTABLE.QVD;
//Drop table MYTABLE;
vL.Filas and vL.Columnas don't get created. How can I get that information?
Thank you.
Hi Christian,
Only single quotes around the table name, and no square brackets. This should work.
flipside
Hi Christian
Try the following,
LET vL.Filas = NoOfRows('MYTABLE'); ////DON'T WORK. WHAT CAN I DO
LET vL.Columnas = NoOfRows('MYTABLE'); ////DON'T WORK. WHAT CAN I DO
Steve
Hi
Use quotes:
LET vL.Filas = NoOfRows('MYTABLE');
Another issue - I don't know if this is directly related to your problem, but its possible your vL.EndinfDate is not being handled correctly. Rather use:
LET vL.EndingDate = Num(Date#('20130131', 'YYYYMMDD'));
Regards
Jonathan
Hi.
Thanks for answering.
I've tryed already wiht quotes. It does not work.
Regarding the format. Yes, I modified the script for you to test it. The format was fine before I commented, but that's not the issue.
I just want to know how many rows and fields has a certain table, assign those values to variables, and then drop the table. That way I can make a load proof and check the performance without having to check the QVD. I want to have it on the screen right after I load.
Thank again.
Christain
Just to confirm, you are using the single quotes like ' and not the double quotes like " ?
Steve
Then it is likely that the table does not exist. If the Where clause returns no records, the table will not be created. You can test for the existence of a table by
LET vL.Filas = Alt(NoOfRows('MYTABLE'), 0);
This will return 0 if the table is empty or does not exist.
Regards
Jonathan
Hi:
let vL.Filas = NoOfRows ([O_ORCO_1] );
let vL.Filas2 = NoOfRows ('[O_ORCO_1]');
let vL.Filas3 = NoOfRows ("[O_ORCO_1]");
LET vL.Filas4 = Alt (NoOfRows([O_ORCO_1]), 0);
LET vL.Filas5 = Alt(NoOfRows('[O_ORCO_1]'), 0);
First 3 not created. Other 2 created with 0 value. It's curious since I haven't droped the table. Any workarround?

Hi Christian,
Only single quotes around the table name, and no square brackets. This should work.
flipside
Christain
Do not use the square bracket [] when using the single quotes. This should then work.
Steve
Also, does your code work if you put single quotes in the WHERE clause in the loop section? ...
(biff, embedded labels, table is [Sheet1$])where date = '$(vL.LoopingDate)' ;