Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
jaryszek2
Contributor

Replace function within hashcode

Hi,

i have hashcode like this:

A'--$Q>F7+O/"ZC.T(3#U,;

And i have to replace sign ' in order to load this to MS SQL Server without errors (MS SQL Server has problem with my hashcode from txt file)

How can i write the replace function?

Thank you in advance,

Jacek Antek

1 Solution

Accepted Solutions
Highlighted

Re: Replace function within hashcode

Perhaps this?

NoConcatenate

DaneOsobowe2:

Load

Replace(Text(Hash128(PESEL, Person_ID, Company_shortcut, Department)), ',', ';') as UniqueID,

Date(Now()) as Data_Zmiany,

*

resident DaneOsobowe;

drop table DaneOsobowe;

RENAME table DaneOsobowe2 to DaneOsobowe;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

6 Replies
Highlighted
jaryszek2
Contributor

Re: Replace function within hashcode

Hashoce is my uniqueID field:

NoConcatenate

DaneOsobowe2:

load

Text(Hash128(PESEL, Person_ID, Company_shortcut, Department)) as UniqueID,

//PESEL & Person_ID & Company_shortcut & Department AS UniqueID,

Date(Now()) as Data_Zmiany,

*

resident DaneOsobowe;

drop table DaneOsobowe;

RENAME table DaneOsobowe2 to DaneOsobowe;

I think that i have to create another table here and use replace function or maybe do you know maybe better approach?

How this function should look like?

Jacek

Highlighted
woshua5550
Contributor III

Re: Replace function within hashcode

like this ?

Replace(uniqueID,Chr(39),'something')

Highlighted
jaryszek2
Contributor

Re: Replace function within hashcode

Thank you Dave.

It is possible to do that (creating UniqueID and replace it) within one table?

Or in first table i should create UniqueID and in the next replace it?

Best wishes,

Jacek

Highlighted

Re: Replace function within hashcode

Perhaps this?

NoConcatenate

DaneOsobowe2:

Load

Replace(Text(Hash128(PESEL, Person_ID, Company_shortcut, Department)), ',', ';') as UniqueID,

Date(Now()) as Data_Zmiany,

*

resident DaneOsobowe;

drop table DaneOsobowe;

RENAME table DaneOsobowe2 to DaneOsobowe;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

Highlighted
woshua5550
Contributor III

Re: Replace function within hashcode

you can do it in one table like this

Load

Relace(Text(Hash128(PESEL, Person_ID, Company_shortcut, Department)) ,Chr(39),'Something') as UniqueID

From <TableName>

jaryszek2
Contributor

Re: Replace function within hashcode

thank you very much Guys,

this is working !

Best wishes,

Jacek