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 |
getur.srikanth@gmail.com
Yak Posting Veteran
77 Posts |
Posted - 2008-05-02 : 12:22:11
|
I have COLUMN Names that I need to convert in PASCAL in SP results. Please provide any user function or any SP.EX: COLUMN | CONVERT TO CourseID | _courseID TITLE | _title LEARNINGLEVEL | _learningLevel coursetitle | _courseTitleThanks in advance. |
|
jsmith8858
Dr. Cross Join
7423 Posts |
|
getur.srikanth@gmail.com
Yak Posting Veteran
77 Posts |
Posted - 2008-05-02 : 14:41:56
|
Not this....,I am creating a .net class using each database table. like thisINSERT INTO @tempSELECT 5, '#region Private Fields' + CHAR(13) + CHAR(10)INSERT INTO @tempSELECT 6, CHAR(9) + 'private ' +CASEWHEN DATA_TYPE LIKE '%CHAR%' THEN 'string 'WHEN DATA_TYPE LIKE '%INT%' THEN 'int 'WHEN DATA_TYPE LIKE '%DATETIME%' THEN 'DateTime 'WHEN DATA_TYPE LIKE '%BINARY%' THEN 'byte[] 'WHEN DATA_TYPE = 'BIT' THEN 'bool 'WHEN DATA_TYPE LIKE '%TEXT%' THEN 'string 'ELSE 'object 'END + '_' + COLUMN_NAME + ';' + CHAR(9)FROM INFORMATION_SCHEMA.COLUMNSWHERE TABLE_NAME = @table_nameORDER BY ORDINAL_POSITIONHere I need to change COLUMN_NAME to Pascal |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-02 : 14:50:21
|
I guess you're asking for column names in proper case. Have a look at function in this linkhttp://weblogs.sqlteam.com/jeffs/archive/2007/03/09/60131.aspx |
|
|
|
|
|