473,411 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

I need a help in TERADATA

I have 2 tables baseline and weekly, baseline is master table andi update baseline by weekly but comparing the new records in the weekly tablle
can somebody help me i have ban number in both the tables and end_date in the baseline table , once the ban is out from the weekly table it get end date in teh baseline table saying that ban is out , now if the ban come back in weekly table with new strat date how do i insert the record in baseline
My query don't work , i donno whats wrong ??

INSERT Into cc.Baseline
(Strt_dt,BALANCE,BAN,FIRST_NM)
Select b.Sys_dt,b.BALANCE,b.BAN,b.FIRST_NM
From cc.Baseline a
Right OUTER JOIN cc.Weekly b
On a.BAN=b.BAN
Where a.BAN is NULL
And a.End_dt is Null
Feb 26 '07 #1
3 2053
vijaydiwakar
579 512MB
I have 2 tables baseline and weekly, baseline is master table andi update baseline by weekly but comparing the new records in the weekly tablle
can somebody help me i have ban number in both the tables and end_date in the baseline table , once the ban is out from the weekly table it get end date in teh baseline table saying that ban is out , now if the ban come back in weekly table with new strat date how do i insert the record in baseline
My query don't work , i donno whats wrong ??

INSERT Into cc.Baseline
(Strt_dt,BALANCE,BAN,FIRST_NM)
Select b.Sys_dt,b.BALANCE,b.BAN,b.FIRST_NM
From cc.Baseline a
Right OUTER JOIN cc.Weekly b
On a.BAN=b.BAN
Where a.BAN is NULL
And a.End_dt is Null
where is the values clause
Feb 27 '07 #2
where is the values clause
well u don't need value clause when u are using select statment
Feb 27 '07 #3
vijaydiwakar
579 512MB
I have 2 tables baseline and weekly, baseline is master table andi update baseline by weekly but comparing the new records in the weekly tablle
can somebody help me i have ban number in both the tables and end_date in the baseline table , once the ban is out from the weekly table it get end date in teh baseline table saying that ban is out , now if the ban come back in weekly table with new strat date how do i insert the record in baseline
My query don't work , i donno whats wrong ??

INSERT Into cc.Baseline
(Strt_dt,BALANCE,BAN,FIRST_NM)
Select b.Sys_dt,b.BALANCE,b.BAN,b.FIRST_NM
From cc.Baseline a
Right OUTER JOIN cc.Weekly b
On a.BAN=b.BAN
Where a.BAN is NULL
And a.End_dt is Null
Expand|Select|Wrap|Line Numbers
  1.  
  2. INSERT    Into cc.Baseline 
  3. (Strt_dt,BALANCE,BAN,FIRST_NM)
  4. Select    b.Sys_dt,b.BALANCE,b.BAN,b.FIRST_NM
  5. From    cc.Baseline a,
  6.  cc.Weekly b,
  7.  
  8. Where    
  9. a.BAN=b.BAN(+) and 
  10. a.BAN is NULL
  11. And a.End_dt is Null
  12.  
try this
Feb 28 '07 #4

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

Similar topics

0
by: Paul Watson | last post by:
Is there a DB-API for Teradata? Is there any access to Teradata?
0
by: mgnmsoft | last post by:
Looking for experienced Teradata DBA with experience in conversion from Oracle to Teradata. US. Citizens needed for this position. Client will apply for Top Secret clearance. Please email resume at...
1
by: Michael L. | last post by:
hi everyone, It is relatively easy to translate RANK() from teradata to DB2, but I get to a glitch when I realize what Qualify RANK does. I know that there are a lot of experienced DB2...
12
by: jdokos | last post by:
Does anyone know of any good sources (white papers, etc.) regarding migrating from Teradata to DB2 UDB EEE? We are in the very beginning stages of investigating this as an option for some of the...
3
by: nolanmadson | last post by:
I'm creating a front-end for some Teradata user maintenance tables in MS Access. I've started having problems in occasionally not being able to insert or update records in these tables. I've been...
1
by: terrordata | last post by:
Hey... i have a major doubt. is it possible to use an insert command in a loop while inserting data into a teradata table from java? if so can someone please give me the syntax?
0
by: sgueder | last post by:
Hi there, hope anybody can help me: I want to create a temporary table, want to fill that table with data and finally I want to use that table as my base-table for running some selects on it...
4
by: KMEscherich | last post by:
Version of Access = 2003 Hi there, is there a way to capture data using TERADATA SQL Assistant and import a portion of this database table into a Microsoft Access database table??? I currently...
2
by: iceman23 | last post by:
Hello, Any suggestion in the way I used CAST in TERADATA SQL: AND CAST (EXCEPTION_EVENT_TS AS TIMESTAMP(0) FORMAT 'MM/DD/YYYY HH:MI:SS') = EXCEPTION_EVENT_TS AND EXCEPTION_EVENT_TS BETWEEN...
1
by: iceman23 | last post by:
Hello, My question in teradata would be, will it be possible to get the time difference of 2 given date/time, given that the first value of the would be the 1st row of 2nd column then the second...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.