I want to search for a specific keyword in all col...
# ask-stanley-ai
m
I want to search for a specific keyword in all columns in all suiteql-tables. How can I do that? I am not looking for the manual way you just proposed
c
AI generated answer (using internal Slack threads):
To search for a specific keyword in all columns in all suiteql-tables, you would need to write a script that iterates over all the tables and their respective columns. However, NetSuite does not provide a direct way to get a list of all tables and columns via SuiteQL or SuiteScript. Here's a general approach you can take: 1. Get a list of all tables and columns: Unfortunately, NetSuite does not provide a direct way to get a list of all tables and columns via SuiteQL or SuiteScript. You might need to manually compile a list of all tables and their respective columns that you want to search through. 2. Iterate over the tables and columns: Once you have the list of tables and columns, you can write a SuiteScript that iterates over each table and column, performing a SuiteQL query to search for the specific keyword. Here's a pseudo-code example:
Copy code
pseudo
for each table in tables:
    for each column in table.columns:
        suiteQL = `SELECT ${column} FROM ${table} WHERE ${column} LIKE '%${keyword}%'`
        result = runSuiteQL(suiteQL)
        if result is not empty:
            print `Keyword found in table ${table}, column ${column}`
Please note that this approach might be time-consuming and resource-intensive depending on the number of tables and columns you have in your NetSuite account. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830777586
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.82045722
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816823363
Please provide your feedback on this answer.