Re: Joining one to many relational table



A word of advice:

What you've described has the look of a pile of string, all colored the
same, and it seems as though you are asking us to sort it out for you by
length.

An image, diagram, or chart would probably help you, or anyone looking to
help you, to visualize what you are looking to accomplish. Labels other than
'Table' and 'Column' would also make things somewhat simpler to identify,
even if they are disguised so as not to give away your intricate little
conspiracy. Otherwise you will only be spreading confusion and wasting
people's time.

If you are looking to spread confusion and waste people's time, I applaud
your efforts, as you have achieved a great success, albeit limited by your
choice of publication locale, and the fact that I enjoy wasting my time, so
you have only achieved a partial waste of my time, which is lame.

I had to think for you and I claim my $2.50 {?1}.

Microcephalic S. Bob



"sqllearner" <sqllearner@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AAD3048F-15AA-4989-9109-88404D3E18F8@xxxxxxxxxxxxxxxx
> For Table1 the values for column1 is A,A,B,B,B and the correspoding values
> in
> column2 is 2,2,3,3,3 and the correspoding values in column3 is 0,0,0,0,0.
> In
> Table2 the values for column1 is A,B and the correspoding values in
> column2
> is 2,3.
>
> I want to update Table1.Column3 = 1, where Table1.Column1 = Table2.Column1
> and Table1.Column2 = Table2.Column2. But using joins, I found it updates
> all
> 5 rows in Table1.Column3. But I want to update only 2 rows in
> Table1.Column3,
> as Table2 has 2 rows. More specifically, I want to update one to one in
> this
> one to many relational tables.
>
>
> "Mike T." wrote:
>
>> "sqllearner" <sqllearner@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im
>> Newsbeitrag
>> news:82680BDA-7D58-4D78-A16B-2536F8AA0EC8@xxxxxxxxxxxxxxxx
>> >I have two tables: Table1 has A,A,B,B,B and Table2 has A, B. I want to
>> >join
>> > Table1 with Table2 and update Table1, but I want to update only 1 for A
>> > and 1
>> > for B in Table1. How will I do it?
>>
>>
>> Are A,A,B,B,B values for one column across 5 rows in Table1? Are there
>> other
>> columns in Table1?
>>
>> For the joins, SELECT DISTINCT might be an option. For the update, I need
>> more info.
>>
>> Also, to use a New York phrase: Not for nothin', but this is the MCSE
>> group.
>> You might have a bit more luck with one of the SQLServer groups.
>>
>> --
>> Mike T.
>> MCNGP #XLI
>>
>>
>>


.



Relevant Pages

  • Re: Tricky Visual Basic Code help...
    ... moves the current record into a new record in table2. ... this with a little VBA code and a couple custom queries. ... Set a "pushFlag" column in the record in table1 to a specific ... If a duplicate is not found, ...
    (microsoft.public.access.formscoding)
  • Re: Joining one to many relational table
    ... Table1 has A,A,B,B,B and Table2 has A, B. I want to join ... > for B in Table1. ... > For Table1 the values for column1 is A,A,B,B,B and the correspoding values ...
    (microsoft.public.cert.exam.mcad)
  • Re: Help needed with importing XML
    ... You could add a gratuitous identity column to #temp and use ... Those examples showed how to decompose arbitrary XML in multiple ... table1 and table2. ... But there has to be something in the relational schema tying table1 ...
    (microsoft.public.sqlserver.xml)
  • Re: 2 column pulldown
    ... Allen Browne - Microsoft MVP. ... these field heading names come from Table2 since it is a lookup and so ... Table1 of course only has a single column name ... fieldX from Table1 is pulldown revealing candidate values of Table2. ...
    (microsoft.public.access.forms)
  • Re: Sliding and page breaks
    ... but I still have one nagging formatting problem. ... each entry in table1. ... simply pulls the first match in table2 instead of showing all the ... Otherwise I was thinking along the lines of your 2nd suggestion of using some calcs to consolidate the data down to a smaller number of tables used in the layout. ...
    (comp.databases.filemaker)