Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

break a colummn

Status
Not open for further replies.

Kendel

Programmer
Apr 24, 2002
1,512
US
Hi All,

I know I can break a column's value after I get the result set but can I break it in the SQL statement. something like:

Code:
Select Left(column2,4) as first4, Right(column2,4) as last4
from ...blab ..blab

Thanks.
 
Yes, I'd tried it. The thing is I'm now working with java/DB2, it's not the same as ASP/SQL Server. I know it's just some syntax error but I couldn't figure it out. I'm sorry for posting in the wrong room. Thank you.
 
Thank you SQLDenis.

If anyone has ever ran into this problem, it's:

SELECT LEFT(CHAR(COLUMN NAME),5) ....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top