Examples of values I want to put in order
houseno
3-13-1
3-13-3/a
3-13-3/b
3-13-2/a
3-13-4
3-13-6
3-13-5/a
3-13-4/c
i want output like this below
houseno
3-13-1
3-13-2/a
3-13-3/a
3-13-3/b
3-13-4
3-13-4/c
3-13-5/a
3-13-6
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
HanookPosted Nov 4, 2013, 4:55 AM
HanookPosted Nov 4, 2013, 6:11 AM
It dependa on the input data.. can you tell me the format/sample data of houseno column...
In houseno column do you have complete address (like 300, RJVGNHI NGR) ?
Post the result of the follwoing query:
SELECT dbo.Thicky_Pants ( RIGHT(houseno, PATINDEX('%-%', REVERSE(houseno))-1) , '[abcdefghijklmnopqrstuvxyz0123456789/]', '')
FROM TableName
JAYRAMPosted Nov 4, 2013, 5:53 AM
Conversion failed when converting the varchar value '300, RJVGNHI NGR' to data type int.
JAYRAMPosted Nov 4, 2013, 4:43 AM
quarie not working...i mean not shown as above format..............
HanookPosted Nov 4, 2013, 4:29 AM
Simply you can query like this
SELECT * FROM TableName
ORDER BY houseno
HanookPosted Nov 4, 2013, 4:24 AM