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 2005 Forums
 Transact-SQL (2005)
 How to remove Comma from Query

Author  Topic 

khufiamalik
Posting Yak Master

120 Posts

Posted - 2008-10-16 : 04:52:23
Hello All,
I have a dynamic query like

'Select * from Employee'

I want to remove Starting Comma and ending Comma
So that Query Could become like

Select * From Employee

Is there any function which can remove starting and ending Commas

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-10-16 : 04:55:09
quote:
Originally posted by khufiamalik

Hello All,
I have a dynamic query like

'Select * from Employee'

I want to remove Starting Comma and ending Comma
So that Query Could become like

Select * From Employee

Is there any function which can remove starting and ending Commas



Post the entire dynamic code

Madhivanan

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

cvraghu
Posting Yak Master

187 Posts

Posted - 2008-10-16 : 05:03:46
Do you mean the '(apostrophe)? To remove any character you can use replace function. Check the replace function in BOL.
Go to Top of Page
   

- Advertisement -