Click here to Skip to main content
15,890,741 members
Home / Discussions / C#
   

C#

 
AnswerRe: Open RTF file in MS Word & WordPad Pin
Luc Pattyn18-Oct-09 11:14
sitebuilderLuc Pattyn18-Oct-09 11:14 
QuestionGenerate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 3:02
AhmedMasum18-Oct-09 3:02 
AnswerRe: Generate sql select statement from another select statement Pin
Not Active18-Oct-09 3:38
mentorNot Active18-Oct-09 3:38 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 15:33
AhmedMasum18-Oct-09 15:33 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn18-Oct-09 16:14
sitebuilderLuc Pattyn18-Oct-09 16:14 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 17:09
AhmedMasum18-Oct-09 17:09 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn18-Oct-09 18:04
sitebuilderLuc Pattyn18-Oct-09 18:04 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 18:41
AhmedMasum18-Oct-09 18:41 
so you must replace words, not parts of words. That requires a parser, something that chops your text (SQL or other) into words based on whitespace and/or delimiters.

How can I replace the word if I can't find the words? Because see the following string:

select empno,empname,deptname,sal from emp, dept where emp.did= dept.did

see here empno,empname,deptname,sal is one word. Because there is no space here. Also there may be column alias.It will be more difficult if i use group by, order by, having clause. In that case it will be more difficult.
Ok it is easy to find different column name and table name (Using a parser). But problem is how can I just replace the old table name to new table name and old column name to new column name.

again the problem is:

Suppose I got emp as table but if I replace all the emp by employee then empname is also converting to employeename which is becoming to wrong column name
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn19-Oct-09 2:08
sitebuilderLuc Pattyn19-Oct-09 2:08 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum19-Oct-09 4:28
AhmedMasum19-Oct-09 4:28 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn19-Oct-09 4:38
sitebuilderLuc Pattyn19-Oct-09 4:38 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum19-Oct-09 19:22
AhmedMasum19-Oct-09 19:22 
GeneralRe: Generate sql select statement from another select statement Pin
Not Active19-Oct-09 2:08
mentorNot Active19-Oct-09 2:08 
GeneralRe: Generate sql select statement from another select statement Pin
Not Active18-Oct-09 16:24
mentorNot Active18-Oct-09 16:24 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 18:34
AhmedMasum18-Oct-09 18:34 
QuestionCode optimization Pin
tvbarnard18-Oct-09 2:14
tvbarnard18-Oct-09 2:14 
AnswerRe: Code optimization [modified] Pin
DaveyM6918-Oct-09 2:32
professionalDaveyM6918-Oct-09 2:32 
GeneralRe: Code optimization Pin
tvbarnard18-Oct-09 3:10
tvbarnard18-Oct-09 3:10 
GeneralRe: Code optimization Pin
DaveyM6918-Oct-09 3:25
professionalDaveyM6918-Oct-09 3:25 
AnswerRe: Code optimization Pin
Eddy Vluggen18-Oct-09 2:33
professionalEddy Vluggen18-Oct-09 2:33 
GeneralRe: Code optimization Pin
tvbarnard18-Oct-09 3:28
tvbarnard18-Oct-09 3:28 
GeneralRe: Code optimization Pin
Eddy Vluggen18-Oct-09 3:37
professionalEddy Vluggen18-Oct-09 3:37 
GeneralRe: Code optimization Pin
tvbarnard18-Oct-09 3:52
tvbarnard18-Oct-09 3:52 
GeneralRe: Code optimization Pin
Luc Pattyn19-Oct-09 4:21
sitebuilderLuc Pattyn19-Oct-09 4:21 
GeneralRe: Code optimization Pin
tvbarnard19-Oct-09 5:09
tvbarnard19-Oct-09 5:09 

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.