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)
 Something similar to ASP left()?

Author  Topic 

Blastrix
Posting Yak Master

208 Posts

Posted - 2001-05-15 : 12:32:17
Does SQL has a function similar to the left() function in ASP which allows you to lop off a specified amount of characters? I'm building a search procedure for my site. Users can choose to search by individual areas of the site, or they can search the entire site. This means that the query will have to run against quite a few different tables, not all have title fields. So if on the INSERT into a temp table, if the title field happens to be 0 then I want to insert say 100 characters of the body of the specific field. I could do this in ASP, but I don't want to return monster blocks of text when I'm only looking for a 100 character title.

I really hope some part of that made sense.

   

- Advertisement -