Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What am I doing wrong? I keep getting errors and I just don't know why. I have tried different things and nothing is working. I am sure it is something easy I am missing that I will feel silly for.
Count:
LOAD
number,
date,
store,
date & ' - ' & store as StoreDateKey
;
SQL SELECT
number,
date,
store
FROM PLACE.PROD.INFO
WHERE Year(date) = $(vCurrentYear);
No worries, glad your are ok now.
It is a right pain when SQL changes the case like that, but gives no clue at all that it has.
No connect string option to block the DBMS from doing this?
I do not know, but there may well be.
I'm totally deluded, or the solution isn't that straightforward.
Apparently, the ANSI SQL standard says that all unquoted column & table names should be converted to upper case. And then ... SQL Server at least doesn't seem to give a ... about upper/lower case. It just returns the case a name was created in. Oracle on the other hand is very strict...
Ok, life is what it is...
I commonly use Oracle, which does adhere to standards very well.
Microsoft SQL and some other rdbms's are a bit more random as to what they do ..........................
As a final remark, I think this one is the least-effort-solution to make it work (copied code from OP):
Count:
LOAD
number,
date,
store,
date & ' - ' & store as StoreDateKey
;
SQL SELECT
"number",
"date",
"store"
FROM PLACE.PROD.INFO
WHERE Year(date) = $(vCurrentYear);
Put the SELECT field names between double quotes, and you'll get field names with that particular spelling. Works as an implied AS for every column.