Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

greend21
Contributor II

Field Names Must Be Unique Within Table Issues

Would anyone know why I am receiving the error that field names must be unique within a table for the below part of my load?

CashAging:

SQL SELECT ReportDate AS [Report Date],

ReceiptStatus,

ReceiptType,

1DayCnt,

1DayAmt,

2DayCnt,

2DayAmt,

3DayCnt,

3DayAmt,

3PlusDayCnt,

3PlusDayAmt

FROM CSSC_Sequence_SIT.dbo.rptCashMaster

;

1 Solution

Accepted Solutions
greend21
Contributor II

Re: Field Names Must Be Unique Within Table Issues

I was looking at the log file and was about to attach it when I saw the issue. Qlik Sense is not recognizing the numbers at the beginning of the fields as part of the field name. See below. Wrapping the fields that begin with a number in [ ] solved the issue.

"11 fields found: ReportDate, ReceiptStatus, ReceiptType, DayCnt, DayAmt, DayCnt,"

**EDIT: for anyone that might find this useful later, it is actually SQL returning the column names without the numbers in the front so Qlik Sense then thinks they are named the same.**

11 Replies
MVP
MVP

Re: Field Names Must Be Unique Within Table Issues

Can you post a screenshot of the error message?

greend21
Contributor II

Re: Field Names Must Be Unique Within Table Issues

eliran_s
Contributor II

Re: Field Names Must Be Unique Within Table Issues

Hi Dan,

Is there a load script earlier to the select script?

Regards,

Eliran.

greend21
Contributor II

Re: Field Names Must Be Unique Within Table Issues

Just this one but even if I comment it out it will not work. I don't see why I wouldn't be able to have report date in both tables. I want one filter for report date that will affect my charts for each table.

CollectionEffectivness:
SQL SELECT ReportDate [Report Date],
BackLog CEBacklog,
MultiNational CEMultinational,
CreditDebit CECreditDebit,
CE_EfftAge_Days,
CE_BillAge_Days,
CE_DueAge_Days,
CE_YTDTotalAmt,
OR_90PlusDayYTDAmt,
    OR_EfftAge_0_30Amt,
OR_EfftAge_31_60Amt,
OR_EfftAge_61_90Amt,
OR_EfftAge_91Amt,
OR_EfftAge_0_30Cnt,
OR_EfftAge_31_60Cnt,
OR_EfftAge_61_90Cnt,
OR_EfftAge_91Cnt
FROM CSSC_Sequence_SIT.dbo.rptCE_ORMaster
;

STORE CollectionEffectivness into [lib://QVD/CollectionEffectivness.qvd](qvd);
Drop Table CollectionEffectivness;

ychaitanya
Contributor III

Re: Field Names Must Be Unique Within Table Issues

Seems to be the weird one.. i would actually try creating the new app and test the same only with the above piece of code.


Thanks

CY

Re: Field Names Must Be Unique Within Table Issues

I cannot spot anything adrift in any of the script you have shared.

Would you be able to share / attach the whole log file from  a failed load.  Great if you could comment out as much stuff as you can whilst retaining the error, as that leaves less things to suspect as the culprit.

Re: Field Names Must Be Unique Within Table Issues

... that reminds of once yonks ago when I had a weird script error and it ended up that there was joker hex pair in the script that was invisible.  Don't know how it got there but it sure caused grief until I got rid of it.

greend21
Contributor II

Re: Field Names Must Be Unique Within Table Issues

I was looking at the log file and was about to attach it when I saw the issue. Qlik Sense is not recognizing the numbers at the beginning of the fields as part of the field name. See below. Wrapping the fields that begin with a number in [ ] solved the issue.

"11 fields found: ReportDate, ReceiptStatus, ReceiptType, DayCnt, DayAmt, DayCnt,"

**EDIT: for anyone that might find this useful later, it is actually SQL returning the column names without the numbers in the front so Qlik Sense then thinks they are named the same.**

Re: Field Names Must Be Unique Within Table Issues

I must admit I never knew that in sql, columns starting with numbers can cause issues

I did a quick search and found this, sql - Column Name beginning with a number? - Stack Overflow

Community Browser