Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
greend21
Creator III
Creator III

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
Creator III
Creator III
Author

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.**

View solution in original post

11 Replies
sunny_talwar

Can you post a screenshot of the error message?

greend21
Creator III
Creator III
Author

eliran
Creator III
Creator III

Hi Dan,

Is there a load script earlier to the select script?

Regards,

Eliran.

greend21
Creator III
Creator III
Author

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
Creator III
Creator III

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

Anonymous
Not applicable

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.

Anonymous
Not applicable

... 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
Creator III
Creator III
Author

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.**

Anonymous
Not applicable

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