Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
davelalande
Starting Member
3 Posts |
Posted - 2011-12-28 : 10:17:25
|
| I have some police blotter data I receive daily and am [url=http://quincymagazine.com/News/GeneralNews/PoliceFeed.aspx]publishing for a small town portal.[/url] Unfortunately it comes in as an attachment and the software I am using to automatically publish it doesn't recognize the codes in the attachment. I am trying to figure out a way to make it more readable. As is now the text is all run together.The text includes a case number at the beginning of each entry formatted like this XX-XXXXX. If I could figure out how to run a query against to format the text that would add a carriage return before each XX-XXXXX, this would make the text much more readable / useful.Any suggestions on what the query should look like?Thanks for any help you can lend me.Dave |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
davelalande
Starting Member
3 Posts |
Posted - 2011-12-28 : 11:16:36
|
quote: Originally posted by X002548 Do I get a "get out of jail free" CARD?Brett8-)
Yes... :) |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
davelalande
Starting Member
3 Posts |
Posted - 2011-12-28 : 14:04:11
|
quote: Originally posted by X002548 OKFIRSTTry using CHARINDEXCan you do a SELECT That shows you the data you want?DO you know what Books Online (BOL) Is?Brett8-)
I am a babe in the woods as it pertains to SQL. I cobbled together a query to truncate a table, but other than that, I don't know much. I can find the table and field that needs parsed, but I wouldn't know how to look for "XX-XXXXX" within the text and insert a carriage return before each, then move to the next record.I will find the table and field names that the data is report back here.Thanks,Dave |
 |
|
|
|
|
|