Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 20 Sep 2005 @ 21:35:20 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   DW/ Query Man SQL Help with Max Version Please
 
From:   Rice, Roberta R

I think I need an inner join but not sure how to do it. Working with waybill versions, I need to match a waybill version in one table to the max waybill version in the next table.

Here is an example of what I'm trying to do:

     SELECT COUNT (*)

     FROM VMVMT_CYCLE A
     , EVENT_ B
     , VWBM C
     , VWBM_CITY_CUST D

     WHERE A.EQP_INIT = B.CAR_INIT
     AND A.EQP_NUMB = B.CAR_NUMB
     AND A.BGN_EVT_DT = B.EVT_DT
     AND A.BGN_EVT_CD = B.EVT_CD
     AND A.ORIG_STN_333 = B.STN_333
     AND B.WB_ID = C.WB_ID
     AND C.WB_VRSN =
     (SELECT MAX(D.WB_VRSN)
     FROM VWBM_CITY_CUST D
     WHERE D.WB_ID = C.WB_ID)

And here's the error msg:\

2646: No more spool space in USERID


Thanks for any help.

Roberta "Bert" Rice
RSS Common Key
Technology Services - Topeka



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023