Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all.
I have been trying to get a preceding load to work with a connection to an Access DB. I have so far not been able to get this to work. What I am trying to do is create a reference field that defines the order in which months should appear in a graph. The fiscal year begins in October so in the graph I want October to appear first on the x-axis then November, December, etc..
Below is my current script. It does load the database data but doesn't seem to do anything with the LOAD statement.
ODBC CONNECT32 TO [MS Access Database;DBQ=J:\Fleet\Reports\ScoreCard\New_Scorecard\Scorecard.accdb];
SQL SELECT *
FROM tblScoreCardByWeek_Data_FiscalYears;
LOAD *,
sMonth,
if(sMonth=10,1,
if(sMonth=11,2,
if(sMonth=12,3,
if(sMonth=1,4,
if(sMonth=2,5,
if(sMonth=3,6,
if(sMonth=4,7,
if(sMonth=5,8,
if(sMonth=6,9,
if(sMonth=7,10,
if(sMonth=8,11,
if(sMonth=9,12
)))))))))))) as FISCAL_Month_ID;
Exactly.
That was the issue. I had read that this error sometimes points to a duplicated field name but I didn't understand how the field name was being duplicated. Thanks for the help!
I am also going to implement your Pick() solution. Much cleaner!