To reference three different tables automatically
I have three tables with different structure. but each of these three tables have one field in common, which is idx. I have a final table in which i have data from all these tables (final).
Emp
Sal
INcome
final
idx source
1 Emp
1 sal
2 income
2 emp
3 sal
i wnat to check
select a.idx from final a, emp b where a.idx=b.idx and source='Emp'
for second table i have to change table name, each time
Is there anyway to write a query which should pick the next table automatcially.
Best Regards,
Abida
Just remember that this is a SQL*Plus solution.. and not SQL. Something that the OP may confuse with each other.
Simply put - no it cannot be done in SQL.
If need to be done, then another tool/language needs to be used to create and control the SQL generated. Such as PL/SQL or Java or C# or SQL*Plus - though the latter is so primitive you would have a problem "to pick up" the next table name. SQL*Plus does not support and conditional and loop statements with its primitive macro language.
Similar Messages
-
How to join THREE different tables into internal table using one select statement .
How to join THREE different tables into internal table using one select statement .
Hi experts,
I would like to request your guidance in solving the problem of joining the data from three different database tables into one internal table
Scenario:
Database tables:
SPFLI
SFLIGHT
SBOOK.
Table Fields:
SPFLI - CARRID CONNID COUNTRYFR CITYFRM COUNTRYTO CITYTO
SFLIGHT - CARRID CONNID FLDATE SEATSMAX SEATSOCC SEATSMAX_C
SEATSOCC_C SEATSMAX_F SEATSOCC_F
SBOOK - CARRID CONNID CLASS
MY INTERNAL TABLE IS IT_XX.
Your help much appreciated.
Thanks in advance.
Pawan.Hi Pawan,
please check below codes. hope it can help you.
TYPES: BEGIN OF ty_xx,
carrid TYPE spfli-carrid ,
connid TYPE spfli-connid ,
countryfr TYPE spfli-countryfr,
cityfrom TYPE spfli-cityfrom ,
countryto TYPE spfli-countryto,
cityto TYPE spfli-cityto ,
fldate TYPE sflight-fldate ,
seatsmax TYPE sflight-seatsmax ,
seatsocc TYPE sflight-seatsocc ,
seatsmax_b TYPE sflight-seatsmax_b,
seatsocc_b TYPE sflight-seatsocc_b,
seatsmax_f TYPE sflight-seatsmax_f,
seatsocc_f TYPE sflight-seatsocc_f,
class TYPE sbook-class,
END OF ty_xx,
t_xx TYPE STANDARD TABLE OF ty_xx.
DATA: it_xx TYPE t_xx.
SELECT spfli~carrid
spfli~connid
spfli~countryfr
spfli~cityfrom
spfli~countryto
spfli~cityto
sflight~fldate
sflight~seatsmax
sflight~seatsocc
sflight~seatsmax_b
sflight~seatsocc_b
sflight~seatsmax_f
sflight~seatsocc_f
sbook~class
INTO TABLE it_xx
FROM spfli INNER JOIN sflight
ON spfli~carrid = sflight~carrid
AND spfli~connid = sflight~connid
INNER JOIN sbook
ON spfli~carrid = sbook~carrid
AND spfli~connid = sbook~connid.
Thanks,
Yawa -
How to populate an internal table from three different tables
My requirement is to populate an itab by retrieving data from three diff db tables,
ekko,ekpo and Ekbe.
below is the code for data retrieval .
SELECT EBELN INTO TABLE IT_EKKO FROM EKKO WHERE EBELN IN S_EBELN.
IF NOT IT_EKKO[] IS INITIAL.
SELECT EBELP TXZ01 NETWR BUKRS INTO CORRESPONDING FIELDS OF TABLE IT_EKPO FROM EKPO FOR ALL ENTRIES IN IT_EKKO
WHERE EBELN EQ IT_EKKO-EBELN.
IF NOT IT_EKPO[] IS INITIAL.
SELECT EMATN WAERS WERKS GJAHR BEWTP INTO CORRESPONDING FIELDS OF TABLE IT_EKBE FROM EKBE FOR ALL ENTRIES IN IT_EKPO
WHERE EBELN EQ IT_EKPO-EBELN
AND EBELP EQ IT_EKPO-EBELP
AND BEWTP EQ 'E' OR BEWTP EQ 'Q'.
ENDIF.
ENDIF.
please tell me how to populate data from it_ekko,it_ekpo and it_ekbe into an internal table ITAB.Hi Mayana,
You take one final structure & final internal table, & within that structure take all the fields which is required to be displayed as a final output.
for data fetching from different table, you take three different structures & three internal table for that, because into corresponding fields of table is not good for performance wise. Use into table syntax.
follow the below example:(similarly)
sort it_klah by key fields.
LOOP AT IT_KSSK INTO WA_KSSK.
READ TABLE IT_KLAH INTO WA_KLAH WITH KEY CLINT = WA_KSSK-CLINT
KLART = WA_KSSK-KLART.
IF SY-SUBRC EQ 0.
MOVE: WA_KLAH-OBJEK to WA_final-OBJEK.
Read another table........(2nd one)
IF SY-SUBRC EQ 0.
MOVE: ....................................
APPEND WA_final TO IT_final.
ENDIF.
clear wa_final.
ENDLOOP.
finally display it_final records.
Hope this can solve your problems.
Regards,
Tutun -
Replicating names to three different tables
Hi
Hoping someone can help
I have a table with names.
I then have three other tables (for terms 1, 2 and 3 at school).
The term tables cross ref to the names table to obtain student names. In each term table, I have school marks going horizontally for assignments against each name.
If a new student arrives, I add him/her to the names table and then resort the names in the names table.
The problem is that this resort is not replicated in the 3 term tables.
Is there anyway around this? ie ensuring that the term tables mirror the resorted names table, but without of course losing track of the data for each student's assignments?
Any suggestions welcome..
ThanksHi
I don't think this works.
I have table 1 as a master list of names. Table 2 replicated the names via INDIRECT, and next to each name in table 2, I have a column showing against each name a mark (ie mark is in same row as a particular name). Thus name A, B, C align with mark 1,2,3.
If I resort in master list (eg descending), the resorted names appear in table 2 OK but the marks do not follow. So I get name C,B,A with marks 1,2,3 (ie not 3,2,1)
Maybe it is not possible.....
Any other suggestions? -
Hi Experts,
what has to be done if you have three different output tables which you would like
display by the ALV. How can you change between those three tables .
If possible I wold like to use the same alv reference.
data ref_alv TYPE REF TO cl_gui_alv_grid.
If this is not possible
please tell me the other way ?
Regards
sashi,
maybe it helps to understand me better!
<outtab2>
<outtab3>
might be also dislayed as like as <outtab>
PROCESS BEFORE OUTPUT.
MODULE alvgrid_out.
PROCESS AFTER INPUT.
MODULE user_command_0600.
MODULE alvgrid_out OUTPUT.
PERFORM init.
ENDMODULE. " ALVGRID_OUT OUTPUT
FORM init.
IF NOT r_nsize IS INITIAL AND NOT r_normes IS INITIAL AND gv_flag IS INITIAL.
PERFORM alv_size.
gv_flag = 'X'.
ENDIF.
IF NOT r_slim IS INITIAL AND NOT r_slimes IS INITIAL AND gv_flag IS INITIAL.
PERFORM alv_slimsize.
gv_flag = 'X'.
ENDIF.
IF NOT r_stocky IS INITIAL AND NOT r_stomes IS INITIAL AND gv_flag IS INITIAL.
PERFORM alv_stockysize.
gv_flag = 'X'.
ENDIF.
IF NOT r_nsize IS INITIAL AND NOT r_normes IS INITIAL AND gv_paiflag EQ 'NO'.
PERFORM alv_size.
ENDIF.
IF NOT r_slim IS INITIAL AND NOT r_slimes IS INITIAL AND gv_paiflag EQ 'SL'.
PERFORM alv_slimsize.
ENDIF.
IF NOT r_stocky IS INITIAL AND NOT r_stomes IS INITIAL AND gv_paiflag EQ 'ST'.
PERFORM alv_stockysize.
ENDIF.
ENDFORM. "init
MODULE user_command_0600 INPUT.
IF NOT r_nsize IS INITIAL AND NOT r_normes IS INITIAL AND sy-ucomm EQ 'NO'.
gv_paiflag = 'NO'.
ENDIF.
IF NOT r_slim IS INITIAL AND NOT r_slimes IS INITIAL AND sy-ucomm EQ 'SL'.
gv_paiflag = 'SL'.
ENDIF.
IF NOT r_stocky IS INITIAL AND NOT r_stomes IS INITIAL AND sy-ucomm EQ 'ST'.
gv_paiflag = 'ST'.
ENDIF.
FREE: ref_alv, ref_container.
ENDMODULE. " USER_COMMAND_0600 INPUT
FORM alv_size .
CHECK ref_alv IS INITIAL.
CREATE OBJECT ref_container
EXPORTING
container_name = 'ALV'.
gv_layout-no_toolbar = 'X'.
CLEAR: gs_fcat, gs_zpd.
READ TABLE lt_sgroup INTO ls_sgr INDEX 1.
gs_fcat-fieldname = 'ORG_SIGN'.
gs_fcat-coltext = ''.
gs_fcat-outputlen = 2.
APPEND gs_fcat TO gt_fcat.
CLEAR gs_fcat.
gs_fcat-fieldname = 'DESCRIPTION'.
gs_fcat-coltext = ls_sgr-sizegroup_name.
gs_fcat-outputlen = 30.
APPEND gs_fcat TO gt_fcat.
CLEAR gs_fcat.
SORT r_nsize BY low.
DELETE ADJACENT DUPLICATES FROM r_nsize.
LOOP AT r_nsize.
CONDENSE r_nsize-low NO-GAPS.
gs_fcat-fieldname = r_nsize-low.
gs_fcat-coltext = r_nsize-low.
gs_fcat-outputlen = 5.
APPEND gs_fcat TO gt_fcat.
ENDLOOP.
CLEAR gs_fcat.
LOOP AT gt_fcat INTO gs_fcat WHERE fieldname NE refer.
gs_fcat-edit = 'X'.
MODIFY gt_fcat FROM gs_fcat TRANSPORTING edit.
ENDLOOP.
CLEAR gs_fcat.
LOOP AT gt_fcat INTO gs_fcat WHERE fieldname EQ 'DESCRIPTION'.
gs_fcat-edit = ' '.
MODIFY gt_fcat FROM gs_fcat TRANSPORTING edit.
ENDLOOP.
CLEAR gs_fcat.
LOOP AT gt_fcat INTO gs_fcat WHERE fieldname EQ 'ORG_SIGN'.
gs_fcat-edit = ' '.
MODIFY gt_fcat FROM gs_fcat TRANSPORTING edit.
ENDLOOP.
FIELD-SYMBOLS: <lt_ss> TYPE table,
<test> TYPE ANY.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = gt_fcat
IMPORTING
ep_table = new_table.
ASSIGN new_table->* TO <outtab>.
CREATE DATA new_line LIKE LINE OF <outtab>.
ASSIGN new_line->* TO <l_line> .
SORT r_normes BY low.
DELETE ADJACENT DUPLICATES FROM r_normes.
LOOP AT r_normes.
ASSIGN COMPONENT 2 OF STRUCTURE <l_line> TO <test>.
<test> = r_normes-low.
APPEND <l_line> TO <outtab>.
ENDLOOP.
CLEAR gs_cpmpon.
REFRESH: gt_compon, gv_comp
PERFORM read_comp
TABLES gv_comp
USING
'zpd'
<l_line>.
CREATE OBJECT ref_alv
EXPORTING
i_parent = ref_container
i_appl_events = 'X'
EXCEPTIONS
OTHERS = 5.
CALL METHOD ref_alv->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
CREATE OBJECT ref_alv_events.
SET HANDLER ref_alv_events->handle_data_changed FOR ref_alv.
* <outtab2>
* <outtab3>
* might be also dislayed
CALL METHOD ref_alv->set_table_for_first_display
EXPORTING
is_layout = gv_layout
it_toolbar_excluding = it_toolbar_excluding " TYPE UI_FUNCTIONS
CHANGING
it_fieldcatalog = gt_fcat
it_outtab = <outtab>
EXCEPTIONS
OTHERS = 4.
CALL METHOD cl_gui_cfw=>flush.
ENDFORM. " ALV_SIZE -
How do I reference cells from a different table/ sheet in the same document
Say I have a Sheet that contains two Tables: [A] and . Is it possible to cross-reference the content of a cell in Table [A] from Table and use it to create a function in Table ?
Eg: =SUM[TableA(K20)]+[TableB(F20:F50)]
Could I similarly cross-reference the content of cells in Tables in different Sheets?
Thanks,
SebSeb,
Yes, you can. With the cursor in the location where you want to place the external reference, navigate to your Sheet and Table of choice and click the cell that you wish to reference. The external reference will appear in the formula.
Note however that we are talking about different sheets in the same Numbers file. We can't reference sheets or tables in other files.
Jerry
Message was edited by: Jerrold Green1 -
Page having PL/SQL process and Automatic Row Process for 2 different tables
Hi,
I have a page containing 2 regions A & B.
Region-A content would be updated to table T1(PK : Ticket#).
Region-B content would be inserted into table T2(PK: Attachment# ; FK: Ticket#).
Region-B is used for uploading a file content into T2.
Since I cannot use 2 DML processes on the page for 2 different tables with a common column, so I have a PL/SQL process to update the record into T1 and an Automatic Row Process(DML) for inserting into T2.
Now the issue is in Region-B when I select a file using 'Browse' button and click on Upload button to fire the Automatic Row Process, the success message is displayed but the file is not uploaded into the table. But when I moved the entire Region-B and the Automatic Row Process to a different page and clicking Upload is working fine and inserting the record into the table along with the file content.
An item P10_TICKET_NUMBER with source type as Database column with source value as TICKET_NUMBER is used in Region-A.
I have gone through the forums and found some of the threads below
Re: 2 Automated Row Processes for one page?
Re: Error when trying to create 2 Forms on same page on 2 tables with ID as
where people facing similar issues but here I have followed the solution provided(with one PL/SQL process and other Automatic process) in the threads but still issue persists.
Can anyone throw some light on this please.
Thanks,
Raj.Hi Teku,
You just have a look at this thread, where u can find a solution for your problem.
INSERTING Records into Second table based on First table Primary Key
hope this helps.
Bye,
Srikavi -
Crystal XI.2 creating Three-Part Table References using Progress 10.1B ODBC Drivers
Post Author: Lauren
CA Forum: Migration to XI R2
I create reports using Crystal XI.2. Some of my users run them using 9 or 10.
I am accessing data in a Progress database using 10.1b ODBC Driver.
When the user tries to run the report, they get the following error window:
Failed to open a rowset .....[Progress]Table/View/Synonym not found
The SQL query (as accessed via SQL query(Database\ShowQuery from the main report window)
has a three part table qualifier, a portion of which is shown below.
"FOUND"."FOUND"."sql_Profile" rather than
"Found"."sql_Profile".
Progress Support says:
It is a Crystal issue. That most likely Crystal will have a registry entry or similar work-around.
Any help would be appreciated. ThanksHi Kelly
Are you using 64 bit OS? If yes, would you try using the following key:
“HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP
BusinessObjects\Suite XI 4.0\Crystal Reports\Database\ODBC”
"UseTableNameAsAlias"="PGPRO1022.DLL, PGOE1023.DLL"
Thanks
Tony -
How to create a foreign key for the table from two different tables?
Hi All,
I have a three table like below. In the below table SAMPLE_CONS_CHECK and SAMPLE_CONS2_CHECK will be having the primary key for NAME column. The same SAMPLE_CONS3_CHECK table also having the primary key for NAME column and forieign key for SAMPLE_CONS_CHECK and SAMPLE_CONS2_CHECK tables. See the below code 2
code 1:
CREATE TABLE SAMPLE_CONS_CHECK
(NAME VARCHAR2(10),
SERIES VARCHAR2(5)
CREATE TABLE SAMPLE_CONS2_CHECK
(NAME VARCHAR2(5),
MODEL NUMBER
CREATE TABLE SAMPLE_CONS3_CHECK
(NAME VARCHAR2(5),
MODEL_NO NUMBER
)code 2
alter table SAMPLE_CONS_CHECK
add constraint SAMPLE_CONS_CHECK_pk primary key (NAME)
alter table SAMPLE_CONS2_CHECK
add constraint SAMPLE_CONS2_CHECK_pk primary key (NAME)
alter table SAMPLE_CONS3_CHECK
add constraint SAMPLE_CONS3_CHECK_pk primary key (NAME)
ALTER TABLE SAMPLE_CONS3_CHECK ADD
CONSTRAINT SAMPLE_CONS3_CHECK_FK1 FOREIGN KEY
NAME
) REFERENCES SAMPLE_CONS_CHECK
NAME
) ON DELETE CASCADE;
ALTER TABLE SAMPLE_CONS3_CHECK ADD
CONSTRAINT SAMPLE_CONS3_CHECK_FK2 FOREIGN KEY
NAME
) REFERENCES SAMPLE_CONS2_CHECK
NAME
) ON DELETE CASCADE;From the above schenario i am able to insert the data to SAMPLE_CONS3_CHECK table. But the parent data is already available in the parent table. The problem is here two different constarints from two different tables. While inserting, it is checking from both the tables whether the parent is exist or not.
How can i solve this problem? Can anyone halp me about this?
Thanks
Edited by: orasuriya on Aug 8, 2009 2:02 AMActually the design is completely incorrect.
What you say is
I have
'foo', 'foo series'
'foo','foo model'
'foo',666
By virtue of table3 referring to both table1 and table2.
This means you actually need to have 1 (one) table:
'foo','foo series','foo model', 666
And the 'problem' disappears.
Sybrand Bakker
Senior Oracle DBA -
different tables in sap
Hi,
see the links
http://www.erpgenie.com/abap/tables.htm
PA* - PA infotype tables
PCL* - HR clusters
PB* - recruitment tables
PCERT - payroll posting runs
Another useful table is CATSDB for CATS, and PTEX2000 for the CATS transfer table for infotype 2001/2002.
The rest of the HR Tables are as follows:
DD01L Domains
DD02L SAP tables
DD03L Table Fields
DD03T DD: Texts for fields (language dependent)
DD04L Data elements
DD04T R/3 DD: Data element texts
DD05S Foreign key fields
DD06L Pool/cluster structures
DD20L Matchcode Ids
DD24S Fields of a matchcode ID
T000 Clients
T001 Company Codes
T001E Company code-dependent address data
T001P Personnel Areas/Subareas
T012 House banks
T012K House bank accounts
T012T House bank account names
T500L Personnel Country Grouping
T500P Personnel Areas
T500T Personnel Country Groupings
T501 Employee Group
T501T Employee Group Names
T502T Marital Status Designators
T503 Employee Groups / Subgroups
T503K Employee subgroup
T503T Employee Subgroup Names
T504A Benefits - Default Values (NA)
T504B Benefit Option Texts (North America)
T504C Benefit Type (NA)
T504D Benefit Credit Group Amount
T504E Benefit Amount
T504F Benefit Costs
T508A Work Schedule Rules
T508T Texts for Employee Subgroup Groupings for Work Schedules
T510 Pay Scale Groups
T510A Pay Scale Types
T510F Assign Pay Scale > Time Unit, Currency
T510G Pay Scale Areas
T510H Payroll Constants with Regard to Time Unit
T510I Standard Working Hours
T510J Constant Valuations
T510L Levels
T510M Valuation of pay scale groups acc. to hiring date
T510N Pay Scales for Annual Salaries (NA)
T510S Time Wage Type Selection Rule
T510U Pay Scale Groups
T510Y Special Rules for Wage Type Generation
T511 Wage Types
T512R Cumulation Wage Types in Forms
T512S Texts for Cumulation Wage Types in Forms
T512T Wage Type Texts
T512W Wage Type Valuation
T512Z Permissibility of Wage Types per Infotype
T513 Jobs
T514S Table Name Texts
T514T Field Name Texts
T51D2 Wage Type Classes
T51D3 Reduction Rules
T51D4 Cumulation Rules
T527X Organizational Units
T528B Positions - Work Centers
T528C Wage Type Catalog
T528T Position Texts
T529A Personnel Event
T529F Fast Data Entry for Events
T529T Personnel Event Texts
T52BT Texts For HR Objects
T52C0 Payroll Schemas
T52C1 Payroll Schemas
T52C2 Texts for Personnel Calculation Schemas
T52C3 Texts for Personnel Calculation Schemas
T52C5 Personnel Calculation Rules
T52CC Schema Directory
T52CD Schema Directory
T52CE Directory of Personnel Calculation Rules
T52CT Text Elements
T52CX Cross References via Generated Schemas
T52D1 Valid Processing Classes
T52D2 Valid Values for Processing Classes
T52D3 Valid Evaluation Classes
T52D4 Permitted Values for Evaluation Classes
T52D5 Wage Type Groups
T52D6 Wage Type Group Texts
T52D7 Assign Wage Types to Wage Type Groups
T52D8 Valid Processing Classes - Texts
T52D9 Valid Values for Processing Classes - Texts
T530 Reasons for Events
T530E Reasons for Changes
T530F Reasons for Changes
T530L Wage Types for Special Payments
T530T Event Reason Texts
T531 Deadline Types
T531S Deadline Type Texts
T533 Leave Types
T533T Leave Type Texts
T539A Default Wage Types for Basic Pay
T539J Base Wage Type Valuation
T539R Events for Standard Wage Maintenance
T539S Wage Types for Standard Wage Maintenance
T548 Date Types
T548S Date Conversion
T548T Date Types
T548Y Date Types
T549A Payroll Areas
T549B Company Features
T549C Decision Trees for Features (Customers)
T549D Feature Directory
T549L Date modifiers
T549M Monthly Assignment: Payroll Period
T549N Period Modifiers
T549O Text for date modifier
T549P Valid Time Units for Payroll Accounting
T549Q Payroll Periods
T549R Period Parameters
T549S Payroll date types
T549T Payroll Areas
T549M Monthly Assignment: Payroll Period
T549N Period Modifiers
T549O Text for date modifier
T549P Valid Time Units for Payroll Accounting
T549Q Payroll Periods
T549R Period Parameters
T549S Payroll date types
T549T Payroll Areas
T554S Absence and Attendance Types
T554T Absence and Attendance Texts
T554V Defaults for Absence Types
T554Y Time Constraints in HR TIME
T555A Time Types
T555B Time Type Designations
T559A Working Weeks
T559B Name of Working Week
T572F Event Texts
T572G Allowed Values for Events
T572H Event Value Texts
T582A Infotypes
T582B Infotypes Which Are Created Automatically
T582S Infotype Texts
T582V Assignment of Infotypes to Views
T582W Assigns Infotype View to Primary Infotype
T582Z Control Table for PA Time Management
T584A Checking Procedures - Infotype Assignment
T588A Transaction Codes
T588B Infotype Menus
T588C Infotype Menus/Info Groups
T588D Infogroups for Events
T588J Screen Header Definition
T588M Infotype Screen Control
T588N Screen Modification for Account Assignment Block
T588O Screen Modification for Assignment Data
T588Q Screen types for fast entry
T588R Selection Reports for Fast Data Entry
T588S Screen Types for Fast Entry
T588T Menu and Infogroup Designations
T588V Business object type
T588W Event types for infotype operations
T588X Cust. composite definition of event types for IT operations
T588Z Dynamic Events
T591A Subtype Characteristics
T591B Time Constraints for Wage Types
T591S Subtype Texts
T596F HR Subroutines
T596G Cumulation wage types
T596H _Cumulation wage type texts
T596I Calculation rule for cumulation wage types
T596U Conversion Table
T599B Report Classes
T599C Report Classes
T599D Report Categories
T599F Report Classes - Select Options
T777A Building Addresses
T777T Infotypes
T777Z Infotype Time Constraints
T778T Infotypes
T778U Subtypes
Error Messages tables
T100 Messages
T100A Message IDs for T100
T100C Control of messages by the user
T100O Assignment of message to object
T100S Configurable system messages
T100T Table T100A text
T100V Assignment of messages to tables/views
T100W Assign Messages to Workflow
T100X Error Messages: Supplements
pankaj -
Cell references to other tables, keep from changing
Here's what I am trying to do. I have two tables, in two sheets. Sheet 1::Table 1 and Sheet 2::Table 2.
The cells in Table 2 are all referenced to cells in Table 1 (with a formula that looks like =Table 1::X7).
I want to be able to move the rows in Table 1 around but have the formulas in Table 2 not change their reference. Now it seems they follow along. So the reference in Table 2 is =Table 1::X7 and I move row 7 in Table 1 so that it becomes row 6, my reference in Table 2 changes to =Table 1::X6. I don't want it to change. Changing the reference from relative to absolute doesn't seem to change this.
Any suggestions?
Thanks! Brian"I looked at INDEX and OFFSET but from what I can tell they don't accept a parameter for a different table."
OFFSET's base can be set as a cell on a different table. If that cell is in a Header row, it will not be included in sorts of the table, so in many cases cell A1 is chosen as 'base' (with row 1 set as a Header row), and offsets are calculated from that cell.
The example below shows results using OFFSET in columns B and C, and INDEX and OFFSET in column D, all of Table 2, to retrieve values from column X of Table 1. The yellow-filled row on Table 2 retrieves the values from the same cell as your =Table 1::X7 formula above. X7 is in the green filled row of Table 1.
The second pair of tables shows duplicates of the same pair of tables. Table 1 in this row has been sorted on the values in column B. Note that what was Row 7 of Table 1 is now Row 4 (although it is still labeled Row 7 in column A). Table 2 has not been sorted. The yellow-filled row is still in the same position and the formula in each of the three cells remains the same as it was in the first version of the table. The value retrieved is from cell X7 on the sorted Table 1.
Formulas (all in Table 2, entered in row 2, then filled down to row 10):
B2: =OFFSET(Table 1 :: $A$1,ROW()-1,23)
C2: =OFFSET(Table 1 :: $X$1,ROW()-1,0)
These two are pretty much the same.
The first uses A1 as the base, and requires a column offset of 23 steps to arrive at column X.
The second uses X1 as the base, and requires a column offset of 0 to remain in column X.
The row offset for both is set by the row in which the formula resides. ROW() returns the row number, from which 1 is subtracted to give an offset from row 1 of one step less than the row number of the formula's position.
D2: =INDEX(OFFSET(Table 1 :: $X$1,0,0,ROWS(Table 1 :: $X)),ROW())
This one uses OFFSET's ability to capture several values in an internal array, triggered here by adding a fourth argument to the function ( ROWS(Table 1::$X) ), to define the row-range as 'all of the rows in column X'. The values are extracted using INDEX.
Although INDEX has its uses, here I think it is redundant, and would use either of the two previous examples.
Regards,
Barry -
Selecting Cells in Different Tables
I've created three tables on a Numbers 09 spreadsheet - let's call them tables "A", "B" and "C".
I want to select a cell on Table A and another cell on Table B then Sum them in another cell on Table C.
The problem is, I cannot figure out how to select the cells on tables A and B simultaneously so that I can drag the Sum function for them to a cell on table C.Marty,
In the English mode, the range identifier is the colon, not the comma. So, to SUM cells A1, B1 and C1, one would write: =SUM(A1:C1).
This may be what is tripping you up. The comma delimits multiple ranges, so if you wanted the sum of A1, B1, C1 including as well X1, Y1 and Z1, one would write: =SUM(A1:C1, X1:Z1). Of course, the comma can also be used to delimit single-cell ranges, as in: =SUM(A1, X2, Z3)
Further, and more to the point of your original question; to select multiple arguments for the SUM function, one at a time from different tables, type =SUM() in the cell where the result goes, and place the cursor between the parentheses, then hold down the Command key while you click in any Table, any cell, for as many tables and cells as you like, and the references will all appear in your expression properly formatted.
Hope this helps.
Jerry
Additional comment about Command Key -
Performance Management in three Different Languages
Hello Gurus,
My client wants to implement Performance appraisals in three different languages, English, German and Japanies. As for as I know we can set blank in JCO language setting so employees in German and Japan can use their own languages. What else I need to be aware of? Please advice.
Regards
Francis.these language should be available ! What you can do is login as the german user and verify if they get in german or not
Note that languages are picked from users portal settings or browser, read the note
First of all, please distinguish between template name and document
name.What you see in T:cd PHAP_ADMIN is appraisal document name, once it
will be created it will be defaulted by the template name of the
current logon language (see BADI 'HRHAP00_DOC_DEF_DN') This means that
in general you'll see the template name as the document name. But
changes/translating template names won't have any effect to the shown
document name.
Documents are user/appraise specific and therefore each document could
have its own document name which can be changed e.g. via PHAP_ADMIN,
but it could not translated automatically, this is our standard design
which has been confirmed with our development team.
For a more automatic way for getting the translated template names as
documents names you may use the SAVE-BAdI 'HRHAP00_DOC_SAVE'. Within
this BAdI you could read the different translations of your template and
write them all except of the logon-language into the HRHAP_T (table with
names of the document) if mode='N' (New/Create document). So next time
you login in a different language the system will find the corresponding
document (template) name in the right language. -
I have three different data base regions
Help is Greatly appreciated.
I have three different databases - development, QA and Production.
my requirement --I have to insert 20 new records into "scott.PERMANENT" table
2)In the Developemnt,QA both regions in the "scott.PERMANENT" table , 3 records are already presnet in the above new 20 records. 3)In the Production database , i dont have any data and have to insert all of the records.
So inorder to insert the data i have to use the same script in all the regions meaning i have to iclude all the 20 new records in the insert script ,but based on the region name it should check and insert those records .
could anyone please kindly give me an idea how to check the region name and insert.
Your help is kindly appreciated.Hi,
975482 wrote:
Help is Greatly appreciated.
I have three different databases - development, QA and Production.
my requirement --I have to insert 20 new records into "scott.PERMANENT" table Don't create your own tables in Oracle-supplied schemas, such as SCOTT. Why not create your own schema?
2)In the Developemnt,QA both regions in the "scott.PERMANENT" table , 3 records are already presnet in the above new 20 records. 3)In the Production database , i dont have any data and have to insert all of the records.
So inorder to insert the data i have to use the same script in all the regions meaning i have to iclude all the 20 new records in the insert script ,but based on the region name it should check and insert those records .Use MERGE instead of INSERT. If you're using Oracle 10 or higher, then you don't even need a WHEN MATCHED clause; if you only have a WHEN NOT MATCHED clause, it will simply ignore the rows that you said to add but already exist.
If the columns have unique constraints, you can also INSERT all the data, and use an error logging clause
I hope this answers your question.
If not, post a complete test script that people can run to re-create the problem and test their ideas.
For example:
-- In all 3 databases, the permanent table looks like this:
CREATE TABLE permanent ...
-- In Production, where it has no rows, I could populate it like this:
INSERT INTO permanent ...
-- This is how I want the table to look in all 3 databases when everything is finished.
-- But in Development and QA, the table does have some rows already, like this:
TRUNCATE TABLE permanent;
INSERT INTO permanent ...
-- What statement(s) would get the table to the finished state regardless of how it starts?Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ {message:id=9360002} -
Hello Community
Using Visual Studio 2008 I have created a Windows Forms Application in which I created
Embedded Reports (rdlc).
The embedded reports (rdlc) uses Matrix(s).
Now on this one rdlc I have dragged 2 Matrix(s) onto the body.
One of the Matrix datasource dataset name and table name is "DataSet1_Table1.
A cells in the Matrix has a total column on the end as follows:
=FormatNumber(Sum(Fields!fld1.Value)+Sum(Fields!fld2.Value)+Sum(Fields!fld3.Value)+Sum(Fields!fld4.Value)+Sum(Fields!fld5.Value),"0")
The other Matrix datasource dataset name and table name is "DataSet2_Table2.
The cell in this Matrix has a total column on the end as follows:
=Sum(Fields!fld1.Value)+Sum(Fields!fld2.Value)+Sum(Fields!fld3.Value)+Sum(Fields!fld4.Value)+Sum(Fields!fld5.Value)
As you can see each Matrix has a different table.
I would like to add the total columns from each table in each Matrix but I haven't been
able to do it successfully. If I have to drag another Matrix or a Textbox on the
body to do it that is okay and/or add another/different formula to a cell onto the body that is
okay too.
So my question is how can I add the contents of the total in cell from each table in each matrix
which will create the "grand total"?
Thank you
ShabeautIt is possible to reference SSRS elements directly using the ReportItems collection. If your total tablix cell is outside of yoour matrix groups, you can use this collection to accomplish what you want:
=ReportItems!Matrix1Total.Value + ReportItems!Matrix2Total.Value
where Matrix1Total and Matrix2Total is the name of the cell that contains your totals. Note that for this to work, the cell name must be unique. If the total cell is inside a group, it will be repeated once for each instance of the group and will not be
unique.
You may be able to do it using the Sum aggregate and specifying the dataset for the scope variable:
=Sum(Fields!fld1.Value, "DataSet1")+Sum(Fields!fld2.Value,
"DataSet1")+Sum(Fields!fld3.Value,
"DataSet1")+Sum(Fields!fld4.Value,
"DataSet1")+Sum(Fields!fld5.Value,
"DataSet1")+Sum(Fields!fld1.Value,
"DataSet2")+Sum(Fields!fld2.Value,
"DataSet2")+Sum(Fields!fld3.Value,
"DataSet2")+Sum(Fields!fld4.Value,
"DataSet2")+Sum(Fields!fld5.Value,
"DataSet2")
This will work as long as you are not filtering the dataset in your Matrix properties. If you are, those
filters will not apply to this expression and the numbers will not total correctly.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek.
Maybe you are looking for
-
I dont want to sync my apps on itunes
I don't want to sync my apps on itunes because it takes a long time to sync the whole phone. I have a iphone 4 with all latest updates and for some reason the have taken away my option where I don't need to sync my iphone. Some help please!
-
Incoming and outgoing excise invoice
I want to enter records in incoming and outgoing excise invoice through DI API.But I can not find object related to excise.There is no help provided for excise in help center.
-
hi all, can somebody tell me how to forward the request from one context to another. thanks in adv. ritu
-
where shall i find the MDM PI adapter in marketplace? per the link http://help.sap.com/saphelp_nwmdm71/helpdata/en/48/97401a55493987e10000000a421937/content.htm I could not find the SAM MDM under SAP netweaver in <SAPNetWeaver u2192 SAP MDMu2192 SAPN
-
I am randomly getting this error. This is the second day in the past week that I have gotten this error. Been using iTunes reguarly the past several weeks. Nothing different. Would expect to get this message everyday I used it, but only get it random