WelshyWizard
IS-IT--Management
Hi all,
I am looking to split a value held in a SQL Server 2000 table, and the split results need to be returned into 2 new fields on the same row.
For example:
Field 1 = 900X10FLAT
Field 2 = 900
Field 3 = 10
The value in field 1 should be split into the other 2 fields. These values will always be numerical but the end characters may be different everytime. There will always be the character 'X' between the numbers.
However, the value will not always need to be split. Whether the value is split or not will be dependant upon certain values held in field 4. For example. If field 4 = TEST then split the values, else don't split them.
Ideally I need to create this in a stored procedure that I'll call from a .NET application.
Cheers
Today is the tomorrow you worried about yesterday - and all is well.....
I am looking to split a value held in a SQL Server 2000 table, and the split results need to be returned into 2 new fields on the same row.
For example:
Field 1 = 900X10FLAT
Field 2 = 900
Field 3 = 10
The value in field 1 should be split into the other 2 fields. These values will always be numerical but the end characters may be different everytime. There will always be the character 'X' between the numbers.
However, the value will not always need to be split. Whether the value is split or not will be dependant upon certain values held in field 4. For example. If field 4 = TEST then split the values, else don't split them.
Ideally I need to create this in a stored procedure that I'll call from a .NET application.
Cheers
Today is the tomorrow you worried about yesterday - and all is well.....