Vedachalam Mahadevan
03/03/2025, 3:42 AMCeligo AI
03/03/2025, 3:42 AMAI generated answer (using internal Slack threads):In NetSuite, the
INSTR
function is used to find the position of a substring within a string. However, it only returns the position of the first occurrence of the substring. To find the second occurrence of a substring from the end of the string, you would need to use a combination of INSTR
and SUBSTR
functions.
Unfortunately, NetSuite's SQL functions do not directly support finding the nth occurrence of a substring. You would need to write a custom function or script to achieve this.
Here's a general approach you could take:
1. Use the INSTR
function to find the first occurrence of the substring.
2. Use the SUBSTR
function to remove the part of the string up to and including the first occurrence of the substring.
3. Repeat steps 1 and 2 to find the second occurrence.
Please note that this approach might need to be adjusted based on your specific requirements and the structure of your data.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
03/03/2025, 3:42 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.770552874
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.770287275
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.766529739
Celigo AI
03/03/2025, 3:42 AM