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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Code not working help!!!

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-10-20 : 08:09:28
Nicola writes "Below is some code i need the carriage return to pick up text in database which i have already inserted.

your help would be appreciated!
thanks

SELECT princestrust_nspcc_2004.lot_no,
Auctionlots2005.lot_desc,
Auctionlots2005.donated,
REPLACE(Auctionlots2005.notes,char(13),'
')AS Auctionlots2005.notes,

Auctionlots2005.details,
Auctionlots2005.subject,
Auctionlots2005.url, princestrust_nspcc_2004.NoBidders,

max(princestrust_nspcc_2004.bid_amount) as bid
FROM princestrust_nspcc_2004,
Auctionlots2005
WHERE princestrust_nspcc_2004.Lot_no = Auctionlots2005.lot_no and princestrust_nspcc_2004.Lot_no = MMColParam

Group by princestrust_nspcc_2004.lot_no,
Auctionlots2005.lot_desc,
Auctionlots2005.donated,

Auctionlots2005.notes,
Auctionlots2005.details,
Auctionlots2005.subject,
Auctionlots2005.url,
princestrust_nspcc_2004.NoBidders"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-20 : 09:14:11
You cant use Replace function on Text column until you convert it to varchar

Try something like this

select replace(cast(textCol as varchar(8000)),char(13),'') from yourTable

or

select replace(substring(textCol,1,8000),char(13),'') from yourTable

Apply this logic in your query

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -