i like to in designer create the temp table, then unload the structure and copy 
that into my code then run..

insert into {temptable} (UnitPart, UnitType) select distinct UnitPart, UnitType 
from {the live table}
  ----- Original Message ----- 
  From: Brad Davidson 
  To: RBASE-L Mailing List 
  Sent: Wednesday, May 12, 2010 11:14 AM
  Subject: [RBASE-L] - SQL Question


  Hello List!

   

  I'm Looking for an alternative to a series of SSUB extracts within a WHILE 
loop.

   

  I have 2 variable text strings resulting from a couple of SELECT INTO 
statements, which lists UnitPart and UnitType, such as:

   

  UnitPart:              vpn  =  ('Unit1,Unit2,Unit3')

  UnitType:            vtype = ('F,NDT,SM,C,PL')

   

  I want to populate a temporary table/view with unique unit & type 
combinations, such as:

   

  UnitPart               UnitType

  unit1                      F

  unit1                      NDT

  unit1                      SM

  unit1                      C

  unit1                      PL

  unit2                      F

  unit2                      NDT

  unit2                      SM

  unit2                      C

  unit2                      PL

  unit3 . . . . etc...

   

  What method would you employ to build this temporary table? The resultant 
table values will be used to replace via UPDATE or INSERT values in the 
permanent table...

   

  Thank you for your thoughts on this!

                                  

  Brad Davidson

Reply via email to