I appreciate your response. I have my password set to my email addres +s at work. I also left my laptop at work. So therefore, I can't get + to it. Secondly, I already have a process that works great and the +syntax is correct. I will post it on Monday. I apologize. Here is +what I am doing...I have a process that pulls data from oracle, forma +ts an excel worksheet, and auto emails reports to the field by id gro +up (District Manager, Regional Manager, VP, etc…). Currently, all of + the email addresses are hard coded and they are sent by group. The +business owner wants the reports to be tailored to individuals and se +nt to that specific individual. So, I have a test process that queries the database and loads a list o +f distinct id's into an array. The email addresses are id@...com. S +o that part is easy. By using a loop, I can successfully pass the id + to the Perl code and update the correct email heading and changes th +e title of the file to the correct id and emails it to the correct ad +dress. I want to have the select * from table where id = id. ...Whe +re the id is specific to the array index. I don’t want to use an IN +‘id’ for all id’s that match. Currently, the test sql process select +s the first array index for the id, but no data returns for the next +ids. So, only id 1 (array index '0') has data. The rest of the emai +ls return no data. I just need help dynamically selecting info for a + specific id. The current process works, but I need it to be dynamic +. I hope this helps you understand. I will send the code. Will you + help me? I have worked on this all week. I just happen to do a sea +rch at home and found this posting. I know the prepare statement sho +uld probably should not be done in a while loop or a loop for that ma +tter. But I am not sure how to approach the loop. I basically took +the current process that works and tried to wrap it into a loop and p +ass the new id from the distinct list to the sql statement and email. + The email process works, but the prepare sql statement only returns + the first index. I thought that the $value could be used with a pla +ceholder and updated each time the array index incremented. But is l +ooks like that is a bad idea. Please help!!!! i.e. @id = ('A01','B55') Thank you for your advice.
In reply to Re^4: SQL queries using dynamic array
by Anonymous Monk
in thread SQL queries using dynamic array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |