Extracting Specific data from Rows:
-
Hi Friends, I am having problem with extracting data from a field which has datatype text in sql server 2005. Following is the two sample rows which contains the field. 1. TrackID14910417OrderID1019RefReason1019Src21244700309600019SID13640214PayCh13MJA210PurchaseID10218 2. TrackID145493211Description235USE+IT+UP+AND+WEAR+IT+OUT+-+ODYSSEY17OrderID10210PurchaseID1019RefReason10214PayCh13MJA16UserID23642B942B8-05D0-4447-BEEC-7EF11419368B217CVFDate1019SID13640213TID1019Dst21244700059600 I want to extract TrackID value from above two rows, the length of the values may vary, it might be 8,9 or 10 digits long.
Shahzad Aslam Software Engineer Softech Systems Limited Email: shehzadaslam@hotmail.com
-
Hi Friends, I am having problem with extracting data from a field which has datatype text in sql server 2005. Following is the two sample rows which contains the field. 1. TrackID14910417OrderID1019RefReason1019Src21244700309600019SID13640214PayCh13MJA210PurchaseID10218 2. TrackID145493211Description235USE+IT+UP+AND+WEAR+IT+OUT+-+ODYSSEY17OrderID10210PurchaseID1019RefReason10214PayCh13MJA16UserID23642B942B8-05D0-4447-BEEC-7EF11419368B217CVFDate1019SID13640213TID1019Dst21244700059600 I want to extract TrackID value from above two rows, the length of the values may vary, it might be 8,9 or 10 digits long.
Shahzad Aslam Software Engineer Softech Systems Limited Email: shehzadaslam@hotmail.com
I guess you need to pull out ten characters, and then parse them. In future, perhaps you can think of a more sensible format :-)
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
I guess you need to pull out ten characters, and then parse them. In future, perhaps you can think of a more sensible format :-)
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
yes 10 characters needed and then need to parse them, it could be a sensible format in the future but currently we have to continue with this..
Shahzad Aslam Software Engineer Softech Systems Limited Email: shehzadaslam@hotmail.com