LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change 1D ARRAY to singles single string elements

Hi, 

     I have a row of data from sql

     It's have more data in row

     I need to split those data's

    Ex :

       Actual data

        "Rajesh","ramesh","raj"

       I expect element by element

        Element 1 Rajesh 

        Element 2 Ramesh

        Element 3 Raj

 

0 Kudos
Message 1 of 3
(771 Views)

@Rajeshe432 wrote:

Hi, 

     I have a row of data from sql

     It's have more data in row

     I need to split those data's

    Ex :

       Actual data

        "Rajesh","ramesh","raj"

       I expect element by element

        Element 1 Rajesh 

        Element 2 Ramesh

        Element 3 Raj

 


Your title is confusing. It is not clear what you have and what you want.

If ["Rajesh","ramesh","raj"] is a single string with comma delimiters, you can convert it into a 1D array using "spreadsheet string to array".

 

altenbach_0-1687438629992.png

 

 

Assuming   ["Rajesh","ramesh","raj"] is a 1D array of string with three elements, you can use index array to get any one. If you want to process them in order, autoindex using a FOR loop to iterate over the elements.

 

 

It would help if you could attach a simple VI that has your input and desired output.

0 Kudos
Message 2 of 3
(761 Views)

Hi Raj,

 


@Rajeshe432 wrote:

     I have a row of data from sql

     It's have more data in row

     I need to split those data's

    Ex :

       Actual data

        "Rajesh","ramesh","raj"

       I expect element by element

        Element 1 Rajesh 

        Element 2 Ramesh

        Element 3 Raj

 


To split a string into an array of substrings based on a delimiter char you may use SpreadsheetStringtoArray.

To remove quotation marks from strings you may use SearchAndReplaceString.

 

What have you tried and where are you stuck?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(760 Views)