Click here to Skip to main content
15,895,667 members
Home / Discussions / Database
   

Database

 
QuestionSearching for a list of words Pin
hasanali0021-Oct-05 1:59
hasanali0021-Oct-05 1:59 
QuestionFind an replace text in Row in a DataTable Pin
blackhole07720-Oct-05 11:59
blackhole07720-Oct-05 11:59 
AnswerRe: Find an replace text in Row in a DataTable Pin
S Douglas20-Oct-05 22:52
professionalS Douglas20-Oct-05 22:52 
GeneralRe: Find an replace text in Row in a DataTable Pin
blackhole07721-Oct-05 9:46
blackhole07721-Oct-05 9:46 
GeneralRe: Find an replace text in Row in a DataTable Pin
S Douglas23-Oct-05 22:01
professionalS Douglas23-Oct-05 22:01 
GeneralRe: Find an replace text in Row in a DataTable Pin
blackhole07724-Oct-05 9:27
blackhole07724-Oct-05 9:27 
GeneralRe: Find an replace text in Row in a DataTable Pin
S Douglas24-Oct-05 12:29
professionalS Douglas24-Oct-05 12:29 
GeneralRe: Find an replace text in Row in a DataTable Pin
S Douglas23-Oct-05 23:40
professionalS Douglas23-Oct-05 23:40 
blackhole077 wrote:
1. Read sql table..
2. Example row (always a string) "one.two.three"
3. Pull this data from a sql table and store into a DataTable and display in a DataGrid.
4. Output row "one\two\three" by replacing '.' with '\'



Simple solution, should work for most RDBMS engines (cant believe I forgot about this one).

If you don’t mind transforming the data when pulling it out of the db use the ‘Replace’ TSQL command. This will not change the underlining data, only its presentation.

SELECT Replace([txt],".","/") AS epr
FROM tbl;

You indicated the display will be determined at runtime. So just do a simple switch or if to determine which way to pull the data. Hows that sound?

Transact-SQL Reference Replace[^]




DEBUGGING : Removing the needles from the haystack.
GeneralRe: Find an replace text in Row in a DataTable Pin
blackhole07729-Oct-05 18:24
blackhole07729-Oct-05 18:24 
GeneralRe: Find an replace text in Row in a DataTable Pin
S Douglas30-Oct-05 16:05
professionalS Douglas30-Oct-05 16:05 
QuestionDetermining whether DataRow values have changed Pin
GazzaJ20-Oct-05 5:55
GazzaJ20-Oct-05 5:55 
QuestionSomeone answer my questions,please! Pin
Deema Jack20-Oct-05 2:55
Deema Jack20-Oct-05 2:55 
AnswerRe: Someone answer my questions,please! Pin
Colin Angus Mackay20-Oct-05 6:35
Colin Angus Mackay20-Oct-05 6:35 
QuestionWeb part database access Pin
phy6njsb20-Oct-05 0:30
phy6njsb20-Oct-05 0:30 
AnswerRe: Web part database access Pin
Michael Potter20-Oct-05 11:23
Michael Potter20-Oct-05 11:23 
GeneralRe: Web part database access Pin
phy6njsb20-Oct-05 22:48
phy6njsb20-Oct-05 22:48 
GeneralRe: Web part database access Pin
Michael Potter21-Oct-05 3:21
Michael Potter21-Oct-05 3:21 
GeneralRe: Web part database access Pin
phy6njsb23-Oct-05 22:54
phy6njsb23-Oct-05 22:54 
GeneralRe: Web part database access Pin
Michael Potter24-Oct-05 3:15
Michael Potter24-Oct-05 3:15 
GeneralRe: Web part database access Pin
phy6njsb24-Oct-05 3:53
phy6njsb24-Oct-05 3:53 
Questionhelp!!!!!!!.............. please Pin
alonso2k8119-Oct-05 11:46
alonso2k8119-Oct-05 11:46 
AnswerRe: help!!!!!!!.............. please Pin
TheOnlyFalcon21-Oct-05 14:41
TheOnlyFalcon21-Oct-05 14:41 
QuestionBindingContext Pin
NormBohana19-Oct-05 8:44
NormBohana19-Oct-05 8:44 
QuestionAuto-generating SQL to fill a DataSet Pin
GazzaJ19-Oct-05 1:01
GazzaJ19-Oct-05 1:01 
AnswerRe: Auto-generating SQL to fill a DataSet Pin
miah alom19-Oct-05 4:01
miah alom19-Oct-05 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.