3 Replies Latest reply: May 15, 2014 10:16 AM by Olly Bond RSS

    stubborn quotation mark

    pth3x _

      Any idea how I can get rid of the quotation mark after the name?

      e.g. Hudson, Paul"

      The csv. file has names in quotes "Hudson, Paul"

      I can get rid of the first quote with: Stuff(Name,1,1," ")

      But I am stymied by the final quote......

        • stubborn quotation mark
          Olly Bond

          Hello pth3x,

           

          When you open the CSV data in Monarch as a database, you should have the option to indicate that the data is in quote marks and Monarch should remove these for you.

           

          If you open the file as a report, then Monarch will just show you everything that's there.

           

          But you can get rid of them in two ways using a calculated field:

           

          strip(;chr(34)) should remove all the " characters (ASCII code 34).

           

          substr(;2;len()-2) will return the string starting at the second character and two characters shorter than the overall length.

           

          Hope this helps,

           

          Olly

            • stubborn quotation mark
              pth3x _

              Thank you Olly.

              I appreciate learning new calculated fields.

              Curious that when I open the .csv as a database it does ask me what text qualifiers to use: , ', or ". I have been using , but it includes the " anyways....

                • stubborn quotation mark
                  Olly Bond

                  Aha - that dialog might be a little ambiguous. Monarch is asking you what qualifiers are used in the CSV file, not what qualifiers you want to see in your table. So if you select , you're telling Monarch to show you everything between the field separators. If you select " as the qualifier, then the data should show up in your table as:

                   

                  Hudson, Paul

                   

                  and not as

                   

                  "Hudson, Paul"

                   

                  All the best,

                   

                  Olly