Need help in Join statements
Need to join these tables EKPO(Purchasing Doc Item), EKET(Scheduling Agreement Schedule line), MAKT(Material Desc), LIPS(SD Doc: Delivery Item data) tables.
The fields that EKPO has is ebeln,ebelp,matnr,menge, meins
The fields that EKET has is ebeln,ebelp,etenr,dat01.
The fields that MAKT has is matnr,spras,makts.
The fields that LIPS has is vbeln,posnr,matnr,vgpos,erdat,vrkme,lfimg.
The output needs to as
ebeln from table ekpo-ebeln
ebelp from table lips-vgpos
matnr from table ekpo-matnr
menge from table ekpo-menge
meins from table ekpo-meins
vrkme from table lips-vrkme
vbeln from table lips-vbeln
lfimg from table lips-lfimg
erdat from table lips-erdat
dat01 from table eket-dat01
maktx from table makt-maktx
The selection screen has ekpo-ebeln and eket-dat01 as select-options
and parameters as ekpo-bukrs and ekpo-werks.
Please suggest as to how to write this join with the above tables.
Hi,
I tried joining your tables using inner join. Here is sample code which I have written.
REPORT ZAM_TABLEJOIN.
tables: ekpo,eket,makt,lips.
select-options: s_ebeln for ekpo-ebeln,
s_dat01 for eket-dat01.
parameters: p_bukrs type ekpo-bukrs,
p_werks type ekpo-werks.
types: begin of itabtype,
ebeln type ekpo-ebeln,
ebelp type lips-vgpos,
matnr type ekpo-matnr,
menge type ekpo-menge,
meins type ekpo-meins,
vrkme type lips-vrkme,
vbeln type lips-vbeln,
lfimg type lips-lfimg,
erdat type lips-erdat,
dat01 type eket-dat01,
maktx type makt-maktx,
end of itabtype.
data: itab type standard table of itabtype,
wa like line of itab.
SELECT a~ebeln
d~vgpos
a~matnr
a~menge
a~meins
d~vrkme
d~vbeln
d~lfimg
d~erdat
b~dat01
c~maktx
FROM ekpo AS a
INNER JOIN eket AS b
ON aebeln EQ bebeln AND aebelp EQ bebelp
INNER JOIN makt AS c
ON amatnr EQ cmatnr
INNER JOIN lips AS d
ON amatnr EQ dmatnr
INTO TABLE itab
WHERE aebeln IN s_ebeln AND bdat01 IN s_dat01 AND a~bukrs EQ p_bukrs
AND a~werks EQ p_werks.
loop at itab into wa.
write: / wa-ebeln, wa-ebelp,wa-matnr,wa-menge, wa-meins, wa-vrkme,
wa-vbeln, wa-lfimg, wa-erdat, wa-dat01, wa-maktx.
endloop.
Hope this helps you. Please correct me if there is anything wrong in this code.
Reward All Helpful Answers!!!!
Sunny
Similar Messages
-
Need Help ASAP my State tax form is in a PDF file and the attachment in my email says Please wait
Need Help ASAP my State tax form is in a PDF file and the attachment in my email says Please wait...
I tried downloading updates like it said to but it still will not display the document. How do I print the PDF file ASAPCan you give us a LOT more info?
What email client? What version of Reader (I can only assume you even have Reader at this point)?
Please wait? I'm sure it says more than that, right?
Have you tried simply saving the PDF (it IS a PDF correct?) to your desktop and opening it from there?
Did you get this form from the IRS or did it come from somewhere else? If the IRS again, what version of Reader?
Help us help you. -
Hi All,
Please help me on the below join condition,
>SELECT * FROM ESTIMATE_LINE WHERE JOB_ID = '214582' AND ESTIMATE_ID = 2;
Output : Returns 1 row,
>SELECT * FROM ESTIMATE_ACCOUNTING_LINE WHERE JOB_ID = '214582' AND ESTIMATE_ID = 2;
Output : Returns 3 rows,
I would like to add these two outputs as on, Finally i've to get 4 rows in the output,
For that am writing the query like this,
SELECT EL.*,EAL.*
FROM ESTIMATE_LINE EL,
ESTIMATE_ACCOUNTING_LINE EAL
WHERE EL.JOB_ID = EAL.JOB_ID (+)
AND EL.ESTIMATE_ID = EAL.ESTIMATE_ID (+)
AND EAL.JOB_ID = '214582'
AND EL.ESTIMATE_ID = 2,
It is not giving the exact output, the common fields are there in the join condition,
Can some one please re write the query for expected output..
I am trying it but not getting the exact output,Unable to find out where the mistake is ...
Thanks,
graHi,
First, let me make sure I undersatnd the problem.
You have a query that lookas for information about a given job_id and estimate_id the estimate_line table. This query produces X rows.
You have another query that lookas for information about the same job_id and estimate_id the estimate_accounting__line table. This query produces Y rows.
You want to get the same results in one query that produces X+Y rows.
That sounds like a job for UNION, not a join.
If the two queries produces the same number of columns, and the data types of the columns are similiar, then you can just write the two queries together. Instead of a semicolon at the end of the first query, you'll say UNION (or UNION ALL):
SELECT * FROM ESTIMATE_LINE WHERE JOB_ID = '214582' AND ESTIMATE_ID = 2
UNION ALL
SELECT * FROM ESTIMATE_ACCOUNTING_LINE WHERE JOB_ID = '214582' AND ESTIMATE_ID = 2;If the columns are not the same, you'll need to call some conversion functions, or add literal columns (such as NULL) to the queries.
If you need help, post a little sampe data (CREATE TABLE and INSERT statements) and the results you want from that data. -
Need help on select statement in ABAP
Hi,
I have 2 table. in that I need to do join. But 2 fields of table A that I need to join with the 2 fields in table B.
But problem is that both the fields of table A can be NULL(either of them).
i.c.
Table A Table B
KONDA KUNNR PRICESHEET KONDA KUNNR
KA NULL A KA 1000
KA NULL B KA 1001
DZ NULL C DZ 1002
NULL 1000 D DZ 1003
NULL 1001 E DZ 1004
NULL 1002 F
NULL 1003 F
NULL 1004 G
After Joining I need for KONDA = 'KA'
KONDA KUNNR PRICESHEET
KA NULL A
KA NULL B
NULL 1000 D
NULL 1001 E
Could you plz help me...Plz reply soon. Thanks in advance
Regards
Anutoshselect a~konda a~kunnr a~pricesheet from table_a as a
join table_b as b on ( a~konda = b~konda or a~konda eq space ) and (a~kunnr = b~kunnr or a~kunnr eq space )
where b~konda = 'KA'.
Try that
Edited by: Ramiro Escamilla on Apr 3, 2008 11:48 PM -
Need help in joining the following tables!
send me the query for how to join the fields from the tables given.
Important thing is i need all the values of vbeln in output.
Whether its corresponding values in other fields present or not doesnt matter
VBELN LIKE VBAK-VBELN,
VKORG LIKE VBAK-VKORG,
ERDAT LIKE VBAK-ERDAT,
AUGRU LIKE VBAK-AUGRU,
BEZEI LIKE TVAUT-BEZEI,
BSTDK LIKE VBKD-BSTDK,
BSTDK_E LIKE VBKD-BSTDK_E,
BSTKD LIKE VBKD-BSTKD,
KDKG2 LIKE VBKD-KDKG2,
KONDA LIKE VBKD-KONDA,
MATNR LIKE VBAP-MATNR,
SPART LIKE VBAP-SPART,
KONDM LIKE VBAP-KONDM,
WAERK LIKE VBAP-WAERK,
NETWR LIKE VBAP-NETWR,
KWMENG LIKE VBAP-KWMENG,
VKAUS LIKE VBAP-VKAUS,
MVGR1 LIKE VBAP-MVGR1,
MVGR2 LIKE VBAP-MVGR2,
MVGR3 LIKE VBAP-MVGR3,
MVGR4 LIKE VBAP-MVGR4,
MVGR5 LIKE VBAP-MVGR5,
KUNNR LIKE VBPA-KUNNR,
POSTCODE1 LIKE ADRC-POST_CODE1,
POBOX LIKE ADRC-PO_BOX,
NAME1 LIKE ADRC-NAME1,
NAME2 LIKE ADRC-NAME2,
CITY1 LIKE ADRC-CITY1,
CITY2 LIKE ADRC-CITY2,
COUNTRY LIKE ADRC-COUNTRY,
STREET LIKE ADRC-STREET,
STRSUPPL1 LIKE ADRC-STR_SUPPL1,
STRSUPPL2 LIKE ADRC-STR_SUPPL2,
STRSUPPL3 LIKE ADRC-STR_SUPPL3,
NRART LIKE TPAR-NRART,
VTEXT1 LIKE TPART-VTEXT,
PARVW LIKE TPART-PARVW,
BEZE_I LIKE TVLVT-BEZEI,
VTEXT LIKE V_T178-VTEXT,
V_TEXT like V_T188-VTEXT,
BEZEI1 LIKE TVM1T-BEZEI,
BEZEI2 LIKE TVM2T-BEZEI,
BEZEI3 LIKE TVM3T-BEZEI,
BEZEI4 LIKE TVM4T-BEZEI,
BEZEI5 LIKE TVM5T-BEZEI,
VTEXT2 LIKE TVKGGT-VTEXT,
SMTP_ADDR LIKE ADR6-SMTP_ADDR,hi there,
i want to fetch data from all the fields i ahve given here .It will be a join statement.
the important thing is I need all the values of vbeln in leftside
as output. -
Need help on case statements to validate records
Hi Experts ,
My table :
seq_num
col2
col3
col4
1
A
12345
P
2
B
1
123%23
3
C
1
23AB
4
D
1
20131001
5
E
1
6
A
13245
Q
7
B
1
12345
8
C
2
1234*AB
9
D
5
20140112
10
E
1
00020
my output
seq_num
col2
col3
col4
Status
Reason
1
A
12345
P
Valid
2
B
1
123%23
invalid
Special Character for col4
3
C
1
23AB
Valid
4
D
1
20131001
Valid
5
E
1
invalid
null for col4
6
A
13245
Q
invalid
Invalid character col4 || invalid number for col3
7
B
1
12345
Valid
8
C
2
1234*AB
Invalid
Special Character col4 ||invalid col3
9
D
5
20140112
invalid
Future dates col4 ||invalid col3
10
E
1
00020
Valid
Sql :
with t as
( select 1 as seq_num,'A' as col2 ,12345 as col3 ,'P' as col4 from dual
union all
select 2 ,'B',1,'123%23' from dual
union all
select 3,'C',1,'23AB' from dual
union all
select 4,'D',1,'21-02-2013' from dual
union all
select 5,'E',1,null from dual
union all
select 6,'A,13245,'Q' from dual
union all
select 7,'B',1,12345 from dual
union all
select 8,'C',2,'1234*AB' from dual
union all
select 9,'D',5,'25-01-2014' from dual
union all
select 10,'E',1,20 from dual
I am applying rules on col3 and col4 for each records row-wise.
I need case statements to populate status and reason columns after applying below rules
Rules
Col3 :
For A record ,it should be 12345 always .
For B,C,D,E , record should be always 1
col4
For A record , it should be either P or R
No null values for all A, B,C,D,E records
for B record , it dont contain special charecters
for C RECORD , it dont contain special charecters
for D record ,it should not contain future dates (dates are in yyyymmdd format and less than sysdates are valid )
I have other columns as well ,as i not included here
.It would be great if you Could help on case statements
Thanks and Regards,
SumanthI've adjusted Gregs nice example a bit. This should work:
with w_base as (
select seq_num, col2, col3, col4,
case when (col2 = 'A' AND col3 = 12345 )
OR (col2 in ('B','C','D','E') AND col3 = 1)
then '' else '||invalid col3' end ||
case when (col2 = 'A' AND col4 not IN ( 'P', 'R' ) )
then '||invalid col4' else '' end ||
case when (col2 IN ( 'B', 'C' ) AND col4 != translate(col4, 'a!@#$%^*()','a') )
then '||special character for col4' else '' end ||
case when (col2 = 'D' AND col4 >= to_char(sysdate,'yyyymmdd') )
then '||future dates col4' else '' end
reason
from ( select 1 as seq_num, 'A' as col2, 12345 as col3, 'P' as col4 from dual union all
select 2, 'B', 1, '123%23' from dual union all
select 3, 'C', 1, '23AB' from dual union all
select 4, 'D', 1, '20130212' from dual union all
select 5, 'E', 1, null from dual union all
select 6, 'A', 13245, 'Q' from dual union all
select 7, 'B', 1, '12345' from dual union all
select 8, 'C', 2, '1234*AB' from dual union all
select 9, 'D', 5, '20140125' from dual union all
select 10, 'E', 1, '20' from dual )
Select seq_num, col2, col3, col4,
case when reason is null then 'Valid' else 'Invalid' end status,
substr(reason, 3 ) reason
from w_base
It returns
SEQ_NUM
COL2
COL3
COL4
STATUS
REASON
1
A
12345
P
Valid
2
B
1
123%23
Invalid
special character for col4
3
C
1
23AB
Valid
4
D
1
20130212
Valid
5
E
1
Valid
6
A
13245
Q
Invalid
invalid col3||invalid col4
7
B
1
12345
Valid
8
C
2
1234*AB
Invalid
invalid col3||special character for col4
9
D
5
20140125
Invalid
invalid col3||future dates col4
10
E
1
20
Valid
edited some bugs :) now it should be fine! really -
I am using Sybase as my back end database. I need help on my SQL statement regarding datetime. The datetime is store as a 9 digit integer in the database (...I believe it is a Decimal(30,6) format, let me know if I am wrong).
If I do this, "select * from mytable;" It works out fine (except I don't know what the date means e.g. 998919534)
If I do this, "select * from mytable where datetime_col < '9/5/2002' ; I got an error. I even tried '9/5/02 11:00 000 am' but it didn't help.
How do I specify a date or datetime in my query?
Thanks in advance.I execute the sql statement
select * from mytable where datetim_col < convert(datetime, '3/4/2002', 101) ;
I got mix result. I got an error message "cannot convert 10375584 to a date.
Yet, he statistics window of the I-sql says
"estimated 493 rows in query (I/O estimate 87)
PLan> mytable (seq)"
It looks like I my the SQL statement is correct and then the system can't display it in the Data window.
Any thought ? -
Need help regarding SELECT statement
Hello, first time here but need help badly.
I been using SQL syntax with another SQL server by the following statement doesnt seem to work in Oracle database.
SELECT firstname+" "+lastname AS fullname FROM customers
basicially, I just want to display date from two column as one column.
ThanksOracle has pipe sign for concate
SELECT firstname||' '||lastname AS fullname
FROM customers;Khurram -
Hi,
Need help to write sql statement.
create table t_dt ( dt_start date, dt_end date, amount number);
insert into t_dt values('1-Jan-10','10-Feb-10',12);
insert into t_dt values('11-Feb-10','10-Mar-10',10);
insert into t_dt values('11-Mar-10','20-Apr-10',8);
insert into t_dt values('21-Apr-10','28-Jun-10',10);
insert into t_dt values('29-Jun-10','20-Sep-10',10);
insert into t_dt values('21-Sep-10','10-Oct-10',10);
insert into t_dt values('11-Oct-10','31-Dec-10',8);
insert into t_dt values('1-Jan-11','10-Feb-11',8);
insert into t_dt values('11-Feb-11','10-Mar-11',7);
insert into t_dt values('11-Mar-11','20-Apr-11',6);
insert into t_dt values('21-Apr-11','28-Jun-11',6);
insert into t_dt values('29-Jun-11','20-Sep-11',6);
insert into t_dt values('21-Sep-11','10-Oct-11',4);
insert into t_dt values('11-Oct-11','31-Dec-11',8);
Result should be like below..
dt_start dt_end Amount
1-Jan-10 10-Feb-10 12
11-Feb-10 10-Mar-10 10
11-Mar-10 20-Apr-10 8
21-Apr-10 10-Oct-10 10
11-Oct-10 10-Feb-11 8
11-Feb-11 10-Mar-11 7
11-Mar-11 20-Sep-11 6
21-Sep-11 10-Oct-11 4
11-Oct-11 31-Dec-11 8
Just to explain the example, take a row with start date as 21-Apr-10 in the above insert statements, since it has the same amount for next two rows (i.e. with start date '29-Jun-10' and '21-Sep-10') these 3 rows should be converted to represent only 1 row in the result and the start date and end date should be changed per the result shown above.
Thanks.Hello
I think this gives yuo what you need....
SELECT
MIN(dt_start),
MAX(dt_end),
amount
FROM
( SELECT
dt_start,
dt_end,
MAX(marker) OVER(ORDER BY dt_start) marker,
amount
FROM
Select
dt_start,
dt_end,
amount,
CASE
WHEN LAG(amount) OVER(ORDER BY dt_start) <> amount THEN
ROW_NUMBER() OVER(ORDER BY dt_start)
END marker
from t_dt
GROUP BY
amount,
marker
order by
MIN(dt_start)
MIN(DT_START) MAX(DT_END) AMOUNT
01-JAN-2010 00:00:00 10-FEB-2010 00:00:00 12
11-FEB-2010 00:00:00 10-MAR-2010 00:00:00 10
11-MAR-2010 00:00:00 20-APR-2010 00:00:00 8
21-APR-2010 00:00:00 10-OCT-2010 00:00:00 10
11-OCT-2010 00:00:00 10-FEB-2011 00:00:00 8
11-FEB-2011 00:00:00 10-MAR-2011 00:00:00 7
11-MAR-2011 00:00:00 20-SEP-2011 00:00:00 6
21-SEP-2011 00:00:00 10-OCT-2011 00:00:00 4
11-OCT-2011 00:00:00 31-DEC-2011 00:00:00 8
9 rows selected.HTH
David
Edited by: Bravid on Feb 23, 2012 12:08 PM
Beaten to it by Frank! :-) -
Need help on SQL Statement for UDF
Hi,
as I am not so familiar with SQL statements on currently selected values, I urgently need help.
The scenario looks as follows:
I have defined two UDFs named Subgroup1 and Subgroup2 which represent the subgroups dependent on my article groups. So for example: When the user selects article group "pianos", he only sees the specific subgroups like "new pianos" and "used pianos" in field "Subgroup1". After he has selected one of these specific values, he sees only the specific sub-subgroups in field "Subgroup2", like "used grand pianos".
I have defined UDTs for both UDFs. The UDT for field "Subgroup1" has a UDF called "ArticleGroup" which represents the relation to the article group codes. The UDT for field "Subgroup2" has a UDF called "Subgroup1" which represents the relation to the subgroups one level higher.
The SQL statement for the formatted search in field "Subgroup1" looks as follows:
SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP1] T0 WHERE T0.[U_ArticleGroup] = (SELECT $[OITM.ItmsGrpCod])
It works fine.
However, I cannot find the right statement for the formatted search in field "Subgroup2".
Unfortunately this does NOT WORK:
SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP2] T0 WHERE T0.[U_Subgroup1] = (SELECT $[OITM.U_Subgroup1])
I tried a lot of others that didn't work either.
Then I tried the following one:
SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP2] T0 WHERE T0.[U_Subgroup1] = (SELECT T1.[Code] FROM [dbo].[@B_SUBGROUP1] T1 WHERE T1.[U_ArticleGroup] = (SELECT $[OITM.ItmsGrpCod]))
Unfortunately that only works as long as there is only one specific subgroup1 for the selected article group.
I would be sooooo happy if there is anyone who can tell me the correct statement for my second UDF!
Thanks so much in advance!!!!
Edited by: Corinna Hochheim on Jan 18, 2010 10:16 PM
Please ignore the "http://" in the above statements - it is certainly not part of my SQL.
Please also ignore the strikes.Hello Dear,
Use the below queries to get the values:
Item Sub Group on the basis of Item Group
SELECT T0.[Name] FROM [dbo].[@SUBGROUP] T0 WHERE T0.[U_GroupCod] =$[OITM.ItmsGrpCod]
Item Sub Group 1 on the basis of item sub group
SELECT T0.[Name] FROM [dbo].[@SUBGROUP1] T0 WHERE T0.[U_SubGrpCod]=(SELECT T0.[Code] FROM [dbo].[@SUBGROUP] T0 WHERE T0.[Name] =$[OITM.U_ItmsSubgrp])
Sub group 2 on the basis of sub group 1
SELECT T0.[Name] FROM [dbo].[@SUBGROUP2] T0 WHERE T0.[U_SubGrpCod1]=(SELECT T0.[Code] FROM [dbo].[@SUBGROUP1] T0 WHERE T0.[Name] =$[OITM.U_ItmsSubgrp1])
this will help you.
regards,
Neetu -
Need help with update statement with multiple joins
I've got the following select statement that is pulling 29 records:
SELECT
PPA.PROJECT_ID,
PPA.SEGMENT1,
peia.expenditure_item_id,
peia.expenditure_type,
pec.expenditure_comment
FROM PA.PA_PROJECTS_ALL PPA,
pa.pa_expenditure_items_all peia,
pa.pa_expenditure_comments pec
where PPA.segment1 < '2008' and
PPA.project_id = 52 and -- just run for project # 20077119 for testing
peia.expenditure_type = 'PAYROLL' and
peia.project_id = ppa.project_id and
PEC.EXPENDITURE_ITEM_ID = PEIA.EXPENDITURE_ITEM_ID;
I need to update the pec.expenditure_comments to a static field for those 29 records. I assume I should start with the following, but not sure how to complete the where:
update
pa.pa_expenditure_comments pec
set pec.expenditure_comment = 'REFERENCE HD#728'
where
First time that we've ever needed to update, so any and all help appreciated.Try using exists:
update pa.pa_expenditure_comments pec
set pec.expenditure_comment = 'REFERENCE HD#728'
where exists ( select null
from pa.pa_projects_all ppa
, pa.pa_expenditure_items_all peia
, pa.pa_expenditure_comments pec2
where ppa.segment1 < '' -- not sure what you posted here, so for next time:
-- please put your examples between the code tags.
and ppa.project_id = 52 -- just run for project # 20077119 for testing
and peia.expenditure_type = 'PAYROLL'
and peia.project_id = ppa.project_id
and pec2.expenditure_item_id = peia.expenditure_item_id
and pec2.expenditure_item_id = pec.expenditure_item_id
); -
Need help with If statement Please
Hi guys,
This is my first time posting and sorry if for some reason i post incorrectly.
I am having trouble figuring out what I am doing with my if Statement and why the compiler is giving me an error which says 'cannot find symbol';
Just incase you need to see the code here it is. And please any pointers would help me get back on track. And please dont laugh at the novice code i just started^^;
import java.util.*;
import java.text.*;
public class Student
public static void main(String[]args)
Scanner scan=new Scanner(System.in);
double std1, std2, std3, num1, num2, num3, num4;
String a, answer1, name1;
System.out.println("Welcome to _____ program, press any button to continue: ")
a=scan.nextLine();
System.out.println("Good, would you like to enter a grade for a student(y/n)?");
answer1=scan.nextLine();
if (answer1 == y)
System.out.println("Please enter the students name ");
name1=scan.nextLine();
System.out.println("Please label the test number ");
num1=scan.nextDouble();
System.out.println("Please enter the grade, "+name1+" recieved");
std1=scan.nextDouble();
if (answer1==n)
System.out.println("Thank you for trying my program ");
else
System.out.println("It's obvious you couldn't follow a simple direction good bye ");Thanks Flounder,
I'll keep in mind to edit the code the way you told me too.
As far as the code goes, what do you mean 'y' is not a string and should be a variable. All I'm trying to do is give a true false statement.
For example
if (input==y)
System.out.println("________");
And in my code it gives an error stating that y is a variable.
I dont understand why.
Thanks much for all your replies. -
Hi,
I need to combine many table only in one select statement.
This is my table name
- L20060101
- L20060102
- L20060103
- L20060104
- L20060105
- L20060131
- L20060201
I dont how to do select statement to select all this table
This is the wrong select statement.
Select * from like '%L200601%
Can i do like that?
Can any body help me on how to solve my problem?You could do something like
create or replace procedure sp_create_monthly_tabs
(p_month in varchar2) is
v_sql varchar2(32767);
v_cnt number:=0;
begin
v_sql := null;
for c1 in (select table_name from user_tables
--- put in the condition to select the tables by the month
--- passed in as the parameters
) loop
if v_cnt = 0 then
v_sql := 'Create or replace VIEW Mon_Tab'||p_month ||
'AS Select * from '||C1.Table_Name ||' ' ;
else
v_sql := v_sql||'Union All '||'Select * from '||C1.Table_Name ||' ' ;
end if;
v_cnt := v_cnt + 1;
end loop;
execute immediate(v_sql)
end; -
Need Help W/ Conditional Statement...
Hi guys,
I have a project uploaded at:
http://www.jasonfraziercreativedesign.com/client_sites/kimyarbrough2/
After everything has loaded into place, and you click on -- say MODELING -- the photos slide away, the separator bars disappear, and the particular (sample) content is loaded in. This works wonderfully for all the buttons (MODELING, ACTING, MUSIC, SCHEDULE and ABOUT KIM) -- but only when you click on them when the site first loads.
If you try to click on the buttons again, when you're IN a section -- it will cycle through the animation again.
I know I need some kind of conditional statement that says if you're ALREADY LOOKING AT A SECTION (i.e. the sourceLoader.source = a section) then don't cycle through the animation again -- just get rid of the current content and display the appropriate new content.
If you're IN the MODELING SECTION, for instance and you click MODELING again -- I don't want Flash to do ANYTHING (ie NULL). But if you're in MODELING, and you click on ACTING -- I just want the MODELING stuff to go away and present the ACTING stuff (no animation).
Here's the pertinent AS that I have currently -- any help about where to place the proper CONDITIONAL (if/else) statement would be so appreciated:
function swap_photos_place_content(theSection:String):void {
// ANIMATE THE 4 PANEL PHOTOS LEAVING THE CONTENT AREA
var photo1Tween:Tween = new Tween(kim_photo1_mc, "y", Regular.easeOut, kim_photo1_mc.y, 620, 2, true);
var photo2Tween:Tween = new Tween(kim_photo2_mc, "y", Regular.easeOut, kim_photo2_mc.y, -600, 2, true);
var photo3Tween:Tween = new Tween(kim_photo3_mc, "y", Regular.easeOut, kim_photo3_mc.y, 620, 2, true);
var photo4Tween:Tween = new Tween(kim_photo4_mc, "y", Regular.easeOut, kim_photo4_mc.y, -600, 2, true);
// AFTER THE LAST PHOTO HAS MOVED OUT, FADE UP THE CONTENT MASK
photo4Tween.addEventListener(TweenEvent.MOTION_FINISH, fadeup_content_mask);
function fadeup_content_mask(event:TweenEvent):void {
var main_mask_fadeoutTween:Tween = new Tween(main_mask_mc, "alpha", Regular.easeOut, 1, 0, 1, true );
var content_mask_fadeupTween:Tween = new Tween(content_mask_mc, "alpha", Regular.easeOut, 0, 1, 1, true);
// AFTER THE CONTENT MASK FADES UP, THE STAGE IS READY TO LOAD IN THE CONTENT
content_mask_fadeupTween.addEventListener(TweenEvent.MOTION_FINISH, load_in_content);
function load_in_content(event:TweenEvent):void {
// BEFORE LOADING IN THE NEW SECTION, TAKE AWAY THE OLD SECTION
sectionLoader.source=null;
trace("ready to load in content");
sectionLoader.source=theSection;
// ADD LISTENERS FOR THE SECTION-CONTENT CLICKS
inv_modeling_button.addEventListener(MouseEvent.CLICK, modeling_click);
function modeling_click(event:MouseEvent):void {
trace("modeling_click");
swap_photos_place_content("modeling.swf");
inv_acting_button.addEventListener(MouseEvent.CLICK, acting_click);
function acting_click(event:MouseEvent):void {
trace("acting_click");
swap_photos_place_content("acting.swf");
inv_music_button.addEventListener(MouseEvent.CLICK, music_click);
function music_click(event:MouseEvent):void {
trace("music_click");
swap_photos_place_content("music.swf");
inv_schedule_button.addEventListener(MouseEvent.CLICK, schedule_click);
function schedule_click(event:MouseEvent):void {
trace("schedule_click");
swap_photos_place_content("schedule.swf");
inv_aboutkim_button.addEventListener(MouseEvent.CLICK, aboutkim_click);
function aboutkim_click(event:MouseEvent):void {
trace("aboutkim_click");
swap_photos_place_content("aboutkim.swf");One thing you can do is create a function that removes all the event listeners for all the buttons. Then when you click a button run that function then add event listeners for all other buttons.
-
Need Help on Joining multiple tables in Golden Gate
Hi,
Can you please help me with some examples on joining multiple tables in Golden Gate. i.e, my requirement is to Join Table 1 & Table 2 in Source and Load it in Target with 10 fields from Table 1 & 5 fields from Table 2 based on the join condition between Table 1.key = Table2.key
I have been trying to do that using SQLEXEC command in Golden Gate. But, is there a way I can do this in the Extract parameter file?
Thanks for your time
Regards
SureshHi,
Thanks a lot for the prompt reply. I am able to do that for the below scenario
Source.T1.Field1
Source.T1.Field2
Source.T2.Field1
Source.T2.Field2
Target Table
T1.Field1, T1.Field2, T2.Field1, T2.Field2.
But, if I already have T2.Field1 in T1 table, then T1.Field1 takes the precendence and getting loaded. i.e., I wanted to join the table 1 & Table 2 and based on the matching condition, I will need to populate the data either from T1 or T2.
Hope you got my requirement.
Below the Data Dump file & Replicat File.
EXTRACT dpump
USERID ********, PASSWORD ********
RMTHOST *******, MGRPORT 7809
RMTTRAIL /oracle/gg/dirdat/rt
--PASSTHRU
TABLE TABLE1,
SQLEXEC (ID LOOKUP,
QUERY "SELECT FIELD1 FROM SOURCE.TABLE2 WHERE FIELD1 = :v_field1",
PARAMS ( v_field1 = field1 )),
TOKENS (tk_field_1 = @GETVAL (lookup.field1));
Replicat file
REPLICAT repjoin
ASSUMETARGETDEFS
HANDLECOLLISIONS
USERID *******, PASSWORD ********
MAP SOURCE.T1, TARGET TARGET.GG_TABLE_T1,
COLMAP ( USEDEFAULTS ,
field1 = @token ("tk_party_id"));
I eventually wanted to join like below.
select t1.field1, t1.field2, t2.field1 from t1, t2
where t1.field1 = t2.field1;
Thanks for your time again
Regards
Suresh
Maybe you are looking for
-
I just want to know how to sync my music from my apple id onto my new account on the family computer. Currently itunes warns that the computer is already linked to an account and if i proceed then no music can by auto downloaded or downloaded for 90
-
Xscreensaver daemon not starting on startup w/KDE
hope this is the place to post this! I have tried putting xscreensaver in my daemon list in rc.conf. I have put xscreensaver -no-splash & in my ~/.xinitrc before wm starts. but, I have to manually start the daemon. So, obviously I'm doing something
-
Space Designer Lost all Factory presets
Can anyone figure out how to get the factory presets back into Space Designer? Somehow something got corrupted. I find the factory presets in the library but only (18 Concerts & Halls) shows up in the slide out window on the plug in itself. I have tr
-
How to get Database information properly to JTable...
Hi! Sorry to bother with this kind of stupid question but I thought I'd ask someone for help in here... The case is that I'm trying to learn the use of Swing components at the moment, and I had this strange idea of trying to add my databases to this
-
How to record computer audio to within the Audition?
I use a musical instrument site. And use the Browser Google Chrome to access. So I want to record the computer (browser) audio track within the Audition and another track with microphone, I will sing. Windows 8.1 Google Chrome Audiiton CC 2014.2