It is currently 8 June 2025, 10:42 Advanced search

Funzione substr Database

Domande e risposte su come utilizzare Instant Developer Cloud al meglio

Funzione substr Database

Postby A.Piunti » 5 January 2024, 16:34

Salve,
in una query che viene eseguita lato server ho la seguente condizione:
substr(INV.IDCodice, 2) != substr(STO.IDCodice, 2)

la query sembra funzionare correttamente, ma ho un dubbio riguardo al terzo parametro della funzione substr, ossia 'length'.
substr(string,startposition,length)

Quando non indicata il confronto viene eseguito per tutta la lunghezza della strigna?
Da debug ho:
SUBSTRING(INV.IDCodice, 2 , @ 3) != SUBSTRING(STO.IDCodice, 2 , @ 3)
e non sono riuscito a capire a cosa corrisponda quel "@3".

Grazie
User avatar
A.Piunti
 
Posts: 317
Joined: 1 January 2015, 13:20

Return to Tips & Tricks - Cloud

Who is online

Users browsing this forum: No registered users and 8 guests

cron