I have a below sql query.
select * from table where name in ('${name});
I have a requirement to automate this as here i need to pass the string value name from txt file. The text file contains the differnet special characters and i have some 200 names in the text file as follows. 3" - 11" DCBA-1234 5"-8" ABC MNOP-3765 8"-16" LMNOP ABCD-9964 ABC XYZ JKLM-1212 XYZ-1673
And my below code is not fetching the complete string value, How to achieve this?
for name in `cat file.txt`
do
select * from table where name in ('${name});
done
Any insights would be more helpful!!
Thanks Much!