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.
| Author |
Topic |
|
Plotin
Starting Member
21 Posts |
Posted - 2003-09-25 : 10:58:13
|
| Hi I am trying to build a string kind like the followingFunction Main(rstFields)Main = TrueEnd FunctionTried the following syntax using a varchar variableDeclare @string varchar(50)Set @string = 'Function Main(rstFields)' + Char(13) + 'Main = True' + Char(13) + 'End Function'The result was Function Main(rstFields)� Main = True� End FunctionThanks for your help |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2003-09-25 : 11:01:57
|
| HUH ?????don't know if this helps, but a newline is a combination of a carrage return (CHAR(13)) and a linefeed (CHAR(10)).edit: oops, had them backwards ...- Jeff |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-09-25 : 12:20:44
|
| It also depends on what editor you are using. For Query Analyzer, you'll need both as Jeff mentioned. But why are you building code inside T-SQL code?Tara |
 |
|
|
Plotin
Starting Member
21 Posts |
Posted - 2003-09-26 : 20:00:54
|
| Thanks It worksPS:The reason I am writing code within T-SQL is because an application receives VBScript code snippets from a SQL database |
 |
|
|
|
|
|