Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
jaryszek2
Creator
Creator

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
Anil_Babu_Samineni

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

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

woshua5550
Creator III
Creator III

like this ?

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

jaryszek2
Creator
Creator
Author

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

Anil_Babu_Samineni

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

woshua5550
Creator III
Creator III

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

thank you very much Guys,

this is working !

Best wishes,

Jacek