Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The answer is yes if and only if you are going to perform attended reloads (meaning that this file is not going to be reloaded at a given time by a server) using the following code:
LET vFromDate = Input('Please specify date in format YYYYMMDD', 'Warning!');
That will show a dialog at the time the script reach that line prompting the user and stopping the reload until some value is entered by the user.
Hope that helps.
Miguel
Hi,
The following should work:
LET vFromDate = Date('09/02/2012', 'YYYYMMDD'); // This will return 20120209, you can change to fit your needs
LET vToDate = Date(YearEnd(Today()), 'YYYYMMDD'); // This will return 20121231
Table:
LOAD *;
SQL SELECT *
FROM Table
WHERE Period >= '$(vFromDate)' AND Period < '$(vToDate)'
Hope that helps.
Miguel
Thanks, it worked : This is my current script: It is much more simpified, but it works. I have only one question. It is possible to make vtFromDate and vToDate changeable. For example by using an inputfield. In the meantme i will try myself.
SET ThousandSep ='.';
SET DecimalSep=',';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=',';
SET MoneyFormat='€ #.##0,00;€ -#.##0,00';
SET TimeFormat='h:mm:ss';
SET DateFormat='D-M-YYYY';
SET TimestampFormat='D-M-YYYY h:mm:ss[.fff]';
SET MonthNames='jan;feb;mrt;apr;mei;jun;jul;aug;sep;okt;nov;dec';
SET DayNames='ma;di;wo;do;vr;za;zo';
LET vFromDate = Date('01/01/2012', 'YYYYMMDD'); // This will return 20120101, you can change to fit your needs
LET vToDate = Date(YearEnd(Today()), 'YYYYMMDD'); // This will return 20121231
//SET svFromDate='vFromDate';
//SET svToDate='vToDate';
ODBC CONNECT32 TO [SUDBPROD SQL2008];
//DECLARE
// @FROMDATE DATETIME,
// @TODATE DATETIME
//SELECT
// @FROMDATE = :FROMDATE,
// @TODATE = :TODATE
LOAD *;
SQL
SELECT
BoekingId,
D.Kostenplaats,
Bedrag,
Periode,
GROOTBOEK
FROM SDC_BOEKINGEN D
WHERE
D.GROOTBOEK = 8080 AND
// // #SUBSET# AND
// // @FROMDATE <= Periode AND Periode < @TODATE
'$(vFromDate)' <= Periode AND Periode < '$(vToDate)'
Hi,
The answer is yes if and only if you are going to perform attended reloads (meaning that this file is not going to be reloaded at a given time by a server) using the following code:
LET vFromDate = Input('Please specify date in format YYYYMMDD', 'Warning!');
That will show a dialog at the time the script reach that line prompting the user and stopping the reload until some value is entered by the user.
Hope that helps.
Miguel
With your previous answer i did not get the expected result, but you did gave the right answer through another answer to another question from someone else. I used your application dates-set-analysis-basics.qvw to get the expected result.