By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,257 Members | 2,812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,257 IT Pros & Developers. It's quick & easy.

Query To Get The Data

P: 3
How Can We Get The Data From A Single Table , By Comparing The Two Different Fields, Considering One Field Value From Row One And The Other Field Value From Row Two Having The Same Values???????
Aug 7 '08 #1
Share this Question
Share on Google+
6 Replies


RuralGuy
Expert 100+
P: 375
Have you tried playing in the Query Builder for a while?
Aug 7 '08 #2

P: 3
Have you tried playing in the Query Builder for a while?

No ....How abt u??Do u hav the solution for this ???
Aug 7 '08 #3

NeoPa
Expert Mod 15k+
P: 31,494
I think you need to explain your question better.

If this is about linking between different records in a table then we would need to know at least what you want to achieve.
Aug 7 '08 #4

P: 3
I think you need to explain your question better.

If this is about linking between different records in a table then we would need to know at least what you want to achieve.
Below is the eg :table with data.Here NAME,ID,DNIS,CLI are the field name.
Expand|Select|Wrap|Line Numbers
  1. NAME         ID          DNIS       CLI
  2. BHARANI          1    33333333     22222             row1
  3. KAMAL         2       22222     44444             row2
  4. FAIZAL        3       11111111     55555             row3
  5. MANI          4       55555     66666             row4
What is the query to get the result as CLI of row1 = DNIS of row2.
Aug 8 '08 #5

P: 1
Expand|Select|Wrap|Line Numbers
  1. SELECT CsvTable.*
  2. FROM CsvTable 
  3. INNER JOIN CsvTable AS CsvTable_1 
  4. ON CsvTable.CLI = CsvTable_1.DNIS;
Aug 8 '08 #6

NeoPa
Expert Mod 15k+
P: 31,494
Below is the eg :table with data.Here NAME,ID,DNIS,CLI are the field name.
Expand|Select|Wrap|Line Numbers
  1. NAME         ID          DNIS       CLI
  2. BHARANI          1    33333333     22222             row1
  3. KAMAL         2       22222     44444             row2
  4. FAIZAL        3       11111111     55555             row3
  5. MANI          4       55555     66666             row4
What is the query to get the result as CLI of row1 = DNIS of row2.
A query cannot be that specific - hence I asked you to explain your requirement more clearly.

Under which circumstance do you want to link the records?

Is it any match? Is it all matches? Are they to be grouped and aggregated?

We can't answer your question until you actually ask it.

PS. Having said that of course, Ruth2B's post illustrates the basics of how you'd access the data generally. You would also have access there to select fields from csvTable_1.
Aug 9 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.