OK,

When looking at this it doesn't make sense to me. If I run this in SQL 2000,
it converts the query to this


SELECT     Bookings.BO_ID, BookingItems.BI_ID
INTO            BookingOptions
FROM         Bookings CROSS JOIN
                      BookingItems

And the BO_ID is always the same when it shouldn't be.

 
 
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273
 
-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED] 
Sent: Friday, 7 July 2006 6:33 PM
To: SQL
Subject: RE: How would I go about doing this in a SP?

Don't need an SP for this..

SELECT table_a.table_a_id, table_b.table_b_id
INTO table_c
>From table_a,  table_b




-----Original Message-----
From: Andrew Scott [mailto:[EMAIL PROTECTED] 
Sent: 07 July 2006 07:40
To: SQL
Subject: How would I go about doing this in a SP?

My SQL is not at the level of expertise, I understand that I need a way to
create a table based of two other tables.

Table A has records with a RecordId, and Table B also has this with a
relationship of many to one to Table A.

Now I need to create a Table C that will sit in between these 2 that
contains the RecordID of Table A and all relationships of RecordID's from
table B that contain the recorded from Table A.

Now I have the Table C created, all I need to do is create a query that will
populate this table with the data from Table A & Table B.

Hoping someone can help me out here.

So it ends up like this

Table_A_Id | Table_B_Id
------------------------
   100     |     200
   100     |     201
   100     |     202
   100     |     203
   101     |     204
   102     |     205
   103     |     206
   103     |     207

Appreciate any help anyone can give me on this:-)

 
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:6/messageid:2500
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6

Reply via email to