Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Problem with fields using resident

Hi, Sorry, I have lots of SQL experience but new to Qlik.

I have a script that loads from an odbc connection and I want to then use it in a load using resident.

Even the simple one below gives a script error as

Field not found - <fwk_num>

trade_data: 

LOAD

fwk_num

RESIDENT trade_trans

What am I doing wrong?

I tried the unqualify command that I found when looking up these type of errors but it too didnt work.

I am using the free trial version at the minute as my company is still in the process of buying licences.

Is it a restriction of the trial version?

Script after the ODBC connect string is shown below.

Thanks for reading.

trade_trans:

Select

fwk_num

FROM

  dw.CALENDAR;

trade_data: 

LOAD

fwk_num

RESIDENT trade_trans;

 

store trade_data into 201422_trade.qvd;

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Problem with fields using resident

with this I get a field not found error on my oracle db

load

  cod_logalias;

SELECT

L.COD_LOG as cod_logalias

FROM DWH_DL.U002_LOG L

;

change to uppercase the field

load

  COD_LOGALIAS;

SELECT

L.COD_LOG as cod_logalias

FROM DWH_DL.U002_LOG L

;

oracle send an uppercase field

in the load you use a lowercase --> field not found

23 Replies
datanibbler
Esteemed Contributor

Re: Problem with fields using resident

Hi Ian,

your LOAD looks all right - did you close it off with a semicolon like the others?

Not applicable

Re: Problem with fields using resident

Yes.

MVP
MVP

Re: Problem with fields using resident

check this script first

trade_trans:

Select

fwk_num

FROM

  dw.CALENDAR;

exit script;

use table viewer CTRL+T to see records and fields of trade_trans

Not applicable

Re: Problem with fields using resident

Yeah, That works. But then I had already seen data loaded and the execution progress window shows data rows being processed.

I have tried using an alias but that fails to find it too!

Annoying as it must be something really silly I'm missing.

You dont have to close down the odbc connection before using resident do you?

dfoster9
Valued Contributor

Re: Problem with fields using resident

I think you might be experiencing auto-concatenate problems. If tables have the same fields then they will be merged together.

Try again but this time use

trade_data:

LOAD

     fwk_num as fwk_num_tmp

RESIDENT trade_trans;

MVP
MVP

Re: Problem with fields using resident

no problem with odbc

I think auto concat as David suggests, use David post or this

trade_data:

noconcatenate

LOAD

fwk_num

RESIDENT trade_trans;

Not applicable

Re: Problem with fields using resident

Sorry guys, Neither noconcatenate or the alias on the load from resident make any difference.

Not applicable

Re: Problem with fields using resident

Hello,

As you are loading same field in Resident load, I would recommend using preceding load.

trade_trans:

Load fwk_num;

SQL Select

fwk_num

FROM

  dw.CALENDAR;

MVP
MVP

Re: Problem with fields using resident

fwk_num


is lowercase?

or uppercase?

Community Browser