How can I pass a mailing list to a mail job? - pentaho

I get a mail list from a SQL query as a string ('xxx#gmail.com, yyyy#gmail.com'), but when I pass that variable to Job Mail Function, it doesn't recognize as a list but as an email address. I tried to make a transformation to a field with different values (each row is address), but the variable only accepts one value, so I get an error.
I tried passing address list as string

Email addresses are space separated, not comma separated. Replace those commas by spaces and it should work.

Related

How to create a multi-line input in Google Colab?

Is it possible to create an input field with multiple lines?
Or is the single string input the only option at this time?
(##param {type:"string"})
We want to make an input field with multiple rows, for example a list of string values.

SQL column with email body and chart conversations with lot of spaces - how to clean

I have a SQL query outputting a column which contains data from emails and chart conversations with lot of spaces, special characters, how can I clean and make this data show up in one row so that I could save the table output into a CSV file.
PS: the query output is in millions.
This could help. Instead of the space character use just empty quotes as the third parameter.

ssrs user typing in multiple values in a parameter or leaving it blank

I am creating a report in SSRS and have a parameter for the end users to search for an account number. Within the report the parameter is set to null by default to show all accounts. When the parameter is not null the user should be able to type in a single account or multiple accounts separated by commas. My problem is when I try to type in multiple accounts I get this error:
"An expression of non-boolean type specified in a context where a condition is expected, near ','."
Here is my sql query:
SELECT * FROM test_db WHERE (AccountNumber IN (#Account)) OR (#Account IS NULL)
The code on the parameter for #Account is
=IIF(IsNothing(Parameters!Account.Value),Parameters!Account.Value,Split(Parameters!Account.Value,","))
You don't need to do anything with it. If you make the #Account parameter multi-value, you can simply type each entry followed by [Enter], no commas, just your required value, one on each row of the parameter drop down.
Then your original query will work, SSRS will automatically convert the multi-value list into a comma separated list and inject it into your SQL. If this doesn't make sense, let me know and I'll put a complete answer with some images. You may need to change you query to
SELECT *
FROM test_db
WHERE AccountNumber IN (#Account)
OR ISNULL(#Account, '' ) = ''
This will take care of blanks too. So blanks/Null should return everything

How to separate and count string from TEXT column PostgreSQL

I have a field in the Client table called "Attachment Name" which has the names of every attachment that a client has, the way the names are saved are the following, it alwas starts with a “^” character, then the name of the file, when you have to save another file the same character is placed.
So for example, in client number 1423 we have "^file1^userGuide^file3", in this case we have 3 files, File1, userGuide and File3.
What i need is a way to know the clients that have only ONE file attached, or the ones that have more than one file.
I know this is an awfull way to store file names, but i did not do it this way and its not my call to change it.
I have been working with this sentence:
Select regexp_split_to_array("attachment_name", E'\\^+') from clients
But i could not make it work at all.
The following counts the number of attachments that appear in the list:
select unnest(regexp_split_to_array(attachment_name, '[\^]')) as attachment, count(*)
from clients
group by attachment;
EDIT:
I answered the wrong question.
If you want only one attachment, then something like this:
select count(*)
from clients c
where attachment_name not like '^%^%'

Extracting e-mail addresses from Sharepoint site/database

I would like to extract e-mail addresses from a Sharepoint site/database.
One list item in Sharepoint can contain several addresses inside a textbox, so I need some sort of regular expression or other trick to recognize what is an e-mail address and what is not.
So I'm not sure which approach is the best.
SQL Queries and/or script?
You can write the custom code in C# that will traverse through each and every item of the list. If one item of the list contains more than one email address then there should be email separator character like semicolon or comma. You can break/split the string from that point and then check each token with regular expression to verify if it is a valid email address or not.
I hope this helps!