Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 left or right function
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

casati74
Posting Yak Master

Italy
109 Posts

Posted - 09/06/2006 :  04:31:36  Show Profile
Hello I have a table name ending with s; every table have a ID Column named how table without s

es:

CCHeats 'table name'
CCHeatID 'columnID'

I want set @var1 = tableName withotu s +ID

set @var1 = CCHeat+ID

How can i do it?????

Thank's

SwePeso
Patron Saint of Lost Yaks

Sweden
30421 Posts

Posted - 09/06/2006 :  04:35:02  Show Profile  Visit SwePeso's Homepage
set @var1 = LEFT(@CCHeat, LEN(@CCHeat) - 1) + 'ID'

Peter Larsson
Helsingborg, Sweden
Go to Top of Page

casati74
Posting Yak Master

Italy
109 Posts

Posted - 09/06/2006 :  04:38:45  Show Profile
thank's a lot
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22864 Posts

Posted - 09/06/2006 :  09:11:33  Show Profile  Send madhivanan a Yahoo! Message
Can you explain what you are trying to do with that string?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000