DH
Programmer
- Dec 8, 2000
- 168
Hello,
I have field which currently allows users to enter the ages of their children. Currently this information is entered in one field in the following format 2,12 which means 2 children of ages 2 and 12.
The following sql statement returns the information in one row:
SELECT dependentsages FROM testTable WHERE ID = @ID
So the result is:
2,12
However, I am looking for a way to modify the above SQL statement to return two rows to look like this:
2
12
I have a split function and tried (didn't work):
SELECT Split(dependentsages,',') FROM testTable WHERE ID = @ID
Any suggestions or examples would be appreciated.
Thank you,
DH
I have field which currently allows users to enter the ages of their children. Currently this information is entered in one field in the following format 2,12 which means 2 children of ages 2 and 12.
The following sql statement returns the information in one row:
SELECT dependentsages FROM testTable WHERE ID = @ID
So the result is:
2,12
However, I am looking for a way to modify the above SQL statement to return two rows to look like this:
2
12
I have a split function and tried (didn't work):
SELECT Split(dependentsages,',') FROM testTable WHERE ID = @ID
Any suggestions or examples would be appreciated.
Thank you,
DH