Hey everyone, I'm pretty new to this, not my full time job, but just something I thought I'd give a shot...
I have a database, in postgres, in which I make my query and I go fetch all the info I need.
What I need to do next is the tricky part for me.
For each line of results received, I have to output to a text file (.txt) but I have to respect a format that was given to me from the person requesting the info.
Example:
Character 1 must be G or N.
Character 2 to to 11 will be a result from my database search, which is a 10 digit string.
Character 12 to 14 must be spaces.
Another rule is:
start at character 78: input a value from my database search but it must not exceed 20 characters and if it is less then 20 character, fill the remaining with spaces.
If anyways has a code I can copy and work off of I would really appreciate it....THX!