ORA-00932: inconsistent datatypes: expected CHAR got NUMBER

I am trying to SUBSTR the first 3 character in use this query -> CASE WHEN (RMSTMP_PNG.ota_activity_lotinfo.KEY = ‘TestProgram’) THEN TO_CHAR(SUBSTR(RMSTMP_PNG.ota_activity_lotinfo.VALUE,1,3)) ELSE 0 END AS Test1 But it return me this ORA-00932: inconsistent datatypes: expected CHAR got NUMBER 00932. 00000 – "inconsistent datatypes: expected %s got %s". May i know what wrong in my query? I tried to use To_NUMBER or To CHAR, it also return me same error. Appreciate if someone could help on this issue. Below is my query:

SELECT RMSTMP_PNG.ota_activity.EQP_ID, SUM(CASE WHEN (RMSTMP_PNG.ota_activity.MESSAGE='Load lot success.' AND RMSTMP_PNG.ota_activity_lotinfo.KEY = 'Quantity') THEN 1 ELSE 0 END) AS LOT_ID, SUM(CASE WHEN (RMSTMP_PNG.ota_activity.MESSAGE='Load lot success.' AND RMSTMP_PNG.ota_activity_lotinfo.KEY = 'Quantity') THEN TO_NUMBER(RMSTMP_PNG.ota_activity_lotinfo.VALUE) ELSE 0 END) AS QUANTITY, CASE WHEN (RMSTMP_PNG.ota_activity_lotinfo.KEY = 'TestProgram') THEN TO_CHAR(SUBSTR(RMSTMP_PNG.ota_activity_lotinfo.VALUE,1,3)) ELSE 0 END AS Test1 FROM RMSTMP_PNG.ota_activity  FULL OUTER JOIN RMSTMP_PNG.ota_activity_lotinfo ON RMSTMP_PNG.ota_activity.ID = RMSTMP_PNG.ota_activity_lotinfo.ID  WHERE RMSTMP_PNG.ota_activity.MODIFIED_DATE >= to_date('27-Sep-2020') AND RMSTMP_PNG.ota_activity.MODIFIED_DATE < to_date('27-Sep-2020') + 1  group by RMSTMP_PNG.ota_activity.EQP_ID,RMSTMP_PNG.ota_activity_lotinfo.VALUE, RMSTMP_PNG.ota_activity_lotinfo.KEY order by RMSTMP_PNG.ota_activity.EQP_ID 

Is this method of 32 char hash generation secure enough for online-based attacks?

A fellow developer and I have been having a discussion about how vulnerable a few different methods of developing a hash are, and I’ve come here to see if smarter people than I (us?) can shed some light.

In PHP, I feel the below is secure ENOUGH to generate as 32 character value that could not be reasonably broken via online attack. There are some other mitigating circumstances (such as in our specific case it would also require the attacker to already have some compromised credentials), but I’d like to just look at the "attackability" of the hash.

str_shuffle(MD5(microtime())) 

The suggested more secure way of generating a 32 character hash is:

bin2hex(random_bytes(16)) 

I acknowledge the first hash generation method is not ABSOLUTELY SECURE, but for an online attack I think being able to guess the microtime (or try a low number of guesses), and know the MD5 was shuffled and/or find a vulnerability in MT which str_shuffle is based on is so low as to make it practically secure.

But I would love to hear why I’m a fool. Seriously.

EDIT — This is being used as a password reset token, and does not have an expiry (although it is cleared once used, and is only set when requested).

John the Ripper / Hashcat rule, reject candidate if char at position X is the same as character at position Y

I’m using John to generate some word lists and I’m trying to figure out the most optimized way to do the next step. What I want to do is add ever possible 3 digit number to a set where the first digit of the number is not the same as the first digit in the set

Set example 123ABC

to add

+ 213 = 123ABC213 OK

+ 131 = 123ABC131 REJECT

I see rules that reject unless a string includes, but not a comparison function like this.

I could make the whole list and prune it after with a python script, but it would be way bigger than needed.

Thank you!

help me create a char inspired in Illidan stormrage 5e

i love the apparence of illidan, but i seems like impossible to copy, and your abbilityes is awelsom, i have bit of ideas, but my build never fits right, i need help to build, for those who don’t know him

1 – is an dual wield nigth elf, whith horns and devil wings.

my idea:(warlock have Alter Self at will to create horns or Sorcerer have wings, draconic but similar, but bolth is mutually exclusive.)

2- have huge attack speed, huge damage and he doesn’t wear armor.

my idea is use class with extra attack or barbarian retaliation and things like arcane armor, draconic resilience or Unarmored Defense

3- skills: the bets skill is metamorphosis can turn-self in to a demon my idea is use true polymorph in my-self

Fire Aura (DH in WoW, as well as certain talents in HotS and a main basic ability in WC3, a DoT dealing aura for fire damage)

My idea: fire shield

Evasion

My idea: rogue or monk have evasion, but i think only a high CA is enouth, like 18-20, arcane armor seems enouth.

if anyone knows how to do it, especially how it looks, would like to play with a drow with wings and horns, please help me build it.

¿.toUpperCase() o .equalsIgnoreCase() en variables tipo char?

public void setGenero(char genero) {     System.out.println("Ingrese el genero");     genero=teclado.next().charAt(0);     if (genero.equalsIgnoreCase().chatAt(0)=='H'){ //Aqui esta el error. En el equalsIgnoreCase()         this.genero=genero;     } } 

En este codigo tengo una variable de tipo char a la cual busco que solo se le pueda ingresar M (De mujer) o H (De hombre) para especificar el genero de una persona. Pero el usuario puede ingresar esas letras en mayusculas o en minusculas y quiero que el programa las ignore. Tambien lo he intentado con el .toUpperCase() pero me sale el mismo error.

He visto que el .equalsIgnoreCase() y el .toUpperCase() se usan en variables de tipo String pero tambien que funciona con los Char. Mi profesor de Programacion nos enseño eso pero no recuerdo el codigo.

Microsoft flow – Get First Char from File Name

I have a form that creates docx files from a form / word template.

User inputs

  • Firtname = Joe
  • Lastname = Dirt

Then a file is created “Joe Dirt – New Hire.docx”

I like to find a way to get the first letter of the file “J” to then be able to move it to onedrive folder based on the Letter. So move J files to J folder.

I have my sharepoint document viewer all setup to file the Directory Tree “A-Z” Just cant get them in it 🙁

I tried the variable sub string but couldn’t get it right. anything helps. thank you.

Current FLow

enter image description here

understanding bash redirection using > char

I am learning bash and am not able to understand what is going wrong with the output redirection in the following example:

I have a file called myfile.txt with the following content.

Practice makes Perfect

I am going to use tr command to replace P with p:

cat myfile.txt | tr P p 

This does what I want, now I am going to put the result back into the original file:

cat myfile.txt | tr P p > myfile.txt 

But after executing the above command myfile.txt is empty… why is this happening?


If I send the output to a different file, then it works as expected:

cat myfile.txt | tr P p > anotherfile.txt