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)
 Issue with replace in sybase

Author  Topic 

atlachar123456
Starting Member

33 Posts

Posted - 2011-11-28 : 11:36:34
Hi,
can any one tell me why its showing "incorrect synatx near the keyword replace" in sybase database

when i ran the same below query in sql server 2005 for me i got the output with out any error like

declare @text nvarchar(100)
set @text = '1,2,3,4'
select @text = ''''+ replace(@text,',',''',''')+''''
select @text

output as -- 1','2','3','4

but we are using sybase database,i am getting error in the replace;can anyone correct it

atlaaaaaaaa

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-11-28 : 12:16:27
please post this in some sybase forums. this is ms sql server forum so solutions provided here are mostly sql server specific

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2011-11-28 : 19:48:29
REPLACE is a Microsoft specific function; not a SQL language keyword. Sybase doesn't recognize it and throws a syntax error.

=======================================
Faced with the choice between changing one's mind and proving that there is no need to do so, almost everyone gets busy on the proof. -John Kenneth Galbraith
Go to Top of Page
   

- Advertisement -