Link to home
Start Free TrialLog in
Avatar of PMH4514
PMH4514

asked on

parse a string into two pieces in view?

If I have a field of type nvarchar(255), is it possible within a single select statement to split the value into two fields? For example of a given record:

dbo.image.filepath = 'e:\domain\repository\v000012.bmp'

Instead of simply saying "select filepath from image" to result in a single column containing that entire string,  I would do something like:

 "select [some code here??] as path, [some code here??] as filename from image"

where the result would be:
path = 'e:\domain\repository\'
filename = 'v000012.bmp'

I am trying to perform this split within the select statement that defines a view.

Thanks


ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PMH4514
PMH4514

ASKER

perfect! thanks