Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

6 Replies
Anonymous
Not applicable
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')

Anonymous
Not applicable
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;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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>

Anonymous
Not applicable
Author

thank you very much Guys,

this is working !

Best wishes,

Jacek