sql - How to Split one value from database and display it separately? -


i have 1 value field in sql database 12345-abcde, i'm having problem in displaying in vb.net this:

  • sales order no. : 12345
  • job order no. : abcde

thanks in advance. :)

something in c#:

string xx = "12345-abcde";//retrieved field database string[] words = xx.split('-'); string s1 = "sales order no. : " + words[0]; string s2 = "job order no. : " + words[1]; 

and vb.net version (xx retrieved field database):

dim xx string = "12345-abcde" dim words string() = xx.split("-"c) dim s1 string = "sales order no. : " & words(0) dim s2 string = "job order no. : " & words(1) 

Comments