Click here to Skip to main content
15,904,339 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL - DELETE Directive error Pin
ddmcr21-Oct-05 3:54
ddmcr21-Oct-05 3:54 
GeneralRe: SQL - DELETE Directive error Pin
André Ziegler21-Oct-05 5:15
André Ziegler21-Oct-05 5:15 
QuestionDisplaying date Pin
Anonymous21-Oct-05 3:25
Anonymous21-Oct-05 3:25 
AnswerRe: Displaying date Pin
Hesham Amin22-Oct-05 4:48
Hesham Amin22-Oct-05 4:48 
GeneralRe: Displaying date Pin
Anonymous23-Oct-05 23:04
Anonymous23-Oct-05 23:04 
Questioncalander value using query Pin
Member 184400621-Oct-05 2:24
Member 184400621-Oct-05 2:24 
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 

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.