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 |
|
fredong
Yak Posting Veteran
80 Posts |
Posted - 2004-01-19 : 11:27:05
|
| I have a SQL statement below that I have the result it into a text format and I need the cursor to stop exactly where the result in the last character.However, what I got was that the cursor would only stop at the 2nd return lines after I hit the right arrow key. Can somebody help .Thanks. SQL statement------------- select'//STX12//850DABCDEFGTest 850'+char(13)+'0100NE'+a.PO_No+a.PODate+char(13)+'05ST ZZ'+char(13)+'06'+a.ShipTowhsecode+char(13)+'07'+(a.CompanyName) from A a, B b where a.id_num = b.Countrow Union Select LTRIM(@string_to_trim)+'17'+AssgnID+'+'+RTRIM(OrderQty)+'EA'+' '+' '+'MG'+char(13)+'18'+RTRIM(ItemID)from Cgo--Below is the result test and I need th cusor to stop exactly after the last character of 18TEKTDSDUPH91260 -- if you try to place your cursor after the 0 and move your arrow key it will stop at the 2nd returns.Results in Text---------------//STX12//850ABCDEFGTest 8500100NE00000000000000000407532003110505ST ZZ065510999807HIJKLMN171 +000000000000002EA MG18DUPH7997A-TEKPROOF172 +000000000000003EA MG18DUPH80005-TEKPROOF173 +0000000000000001EA MG18DUPH80064-TEKPROOF174 +0000000000000001EA MG18DUPH80099-TEKPROOF175 +0000000000000011EA MG18TEKTDSDUPH91260k |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-01-19 : 12:47:54
|
| Do not post your question again just because we haven't come up with a solution yet in the other thread:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=31848Perhaps you need to reconsider how you are going about this since it isn't working for you.Tara |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-01-19 : 13:10:14
|
| Been looking at this on another site and got a bit more info from the other thread.Don't think it's possible (or desirable) from anything that exports directly. You would probably have to remove the last crlf after the export.I would be really surprised if whatever is processing this doesn't expect the final crlf though.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|