Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get same as STRTRAN()
Message
 
To
24/06/2008 13:57:30
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01326436
Message ID:
01326443
Views:
18
>>>I need to replace all commas with something else from fields as they are selected from a table using a SQL statement.
>>
>>What about REPLACE() command?
>
>Actually, I think I need to do it on the PRINT statement instead of in the SQL:
>
>
>PRINT
>	@ChartID +
>	',' +
>	@Folder +
>	',' +
>	@DocumentName +
>	',' +
>	@DocDateTime +
>	',' +
>	@ProcessedFileName
>
>
>The @Folder and @DocumentName need to have commas replaced with hyphens.

The same:
PRINT
	@ChartID +
	',' +
	REPLACE(@Folder,',','-') +
	',' +
	REPLACE(@DocumentName,',','-') +
	',' +
	@DocDateTime +
	',' +
	@ProcessedFileName
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform