Working with data from two separate tables

In a report I'm building, I have two tables: "Registration" and "SpecialDates".
In the Registration table has client info specific to an account number. Each account number has a different billing cycle.. either Cycle 1, Cycle 2, or Cycle 3.  This is listed for the account number as {Registration.Cyle}. In the SpecialDates table I have three different dates listed for each cycle. So this table looks something like this:
fldCycle          fldPastDueDate
1                     01/11/2010
2                     12/15/2009
3                     1/20/2010
The problem I'm having is I can't link {SpecialDates.fldCycle} to {Registration.Cycle}.  I have to somehow make the date from the SpecialDates table show up on the report depending on the value of {Registration.Cycle}.  Does anyone have any ideas on how to do this?
Edited by: MarcieHennessy on Jan 27, 2010 7:26 PM

Then I would create a custom table with the Add Command in Data Expert with the following query:
SELECT Field1, Field2, Field3, cast (fldCycle as char(10)) as fldCycle, Field4, Field5, etc
FROM SPECIALDATES
Where you list all the fields from the table you will need in the report, with the link field converted to a string.  Then replace the SPECIALDATES table in your linking with the new custom table .  Now when you link from REGISTRATION to the new custom table.
Fuskie
Who notes you can rename the custom table to a more recognizable name...

Similar Messages

  • Work with data from a table of another SAP R/3 system

    Hi,
    I want to work with data from a table of another system. I know there's a function called 'RFC_READ_TABLE' but I don't know really how it works. What I want to do is to get data from that system and pass it to the one where I'm working in order I can continue working with this data in the report.
    Besides, I'd like to select only the records that have some conditions.
    I'd appreciate if someone could tell how to do it, whether with FM 'RFC_READ_TABLE' or in another way.
    Thanks in advance,
    Gerard
    P.S: The systems are already connected in SM59

    Yes, you can use RFC_read_table .You can pass the number of columns but I recommend you to  bring all results in your internal table after that you can filter the records. Most of the time I have notice when you make RFC call with this FM to another system it works but it may also happen that other system controlling authorization and then it might give you nothing. As I face this problem on my last Project.
    Hope this’ll give you idea!!
    <b>P.S award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • Can I transfer Time Machine data from two separate hard drives into one new one?

    I'm using a MacBook Pro as my primary computer.  My 500 gig Time Capsule filled up a year or so ago, so I stopped using it with Time Machine for awhile so I could keep the data from those old back-ups.  There were a number of things I deleted from my computer's very limited hard drive after they were backed up to the Time Capsule.  I got a 1T external USB drive last year to use as my "filing Cabinet" to store files I didn't necessarily need all the time or that were filling up my small laptop hard drive--including my iTunes library--all organized in a way that made it relatively easy for me to find what I needed, even if I didn't remember exactly when I'd filed it or what I'd called it.  I got another 1 terabyte external (portable) drive last July and dedicated it to TimeMachine backups and labeled it "TimeMachine".
    Over the last couple of weeks, my friend has been helping me upgrade to Yosemite and clean up my laptop hard drive.  Last week he cloned my laptop hard drive to a new 1T hard drive and I exchanged it for my old drive in my computer today. All good.
    Here's the issue.  We replaced my Time Capsule hard drive with a 1 terabyte drive with the idea of transferring the data from the old Time Capsule (500G) drive and the newer USB 1T "TimeMachine" compact drive to the new 1T Time Capsule drive and beginning using the latter for my Time Machine backups going forward.  Originally he thought we could copy everything from each of my external drives (the old 500gig drive from my Time Capsule, the USB "TimeMachine" drive I've been using since July, and the "file cabinet" files) to my computer in their own folders and then start regular TimeMachine backups to the new Time Capsule drive, thus preserving all my old data and making regular backups going forward.  The "file cabinet" data was no problem at all, but when I tried to copy my USB "TimeMachine" data to my computer, I was unable to.  My friend found instructions for transferring old TimeMachine data to a new TimeCapsule, but I don't know if I can transfer the data from two separate disks to the new TimeCapsule drive. I'm afraid that one set of data will supersede the other and either my newer backups or my old ones will be lost if I try to transfer both. 
    Are my fears justified or is there a way to insure that no such problem will occur?  Of course, my data will still be on those two older drives, but that won't do me a lot of good if I can't access it when I need to. Also, the 1T drive now belongs to my friend; he used a brand new drive he'd bought for himself for my new internal hard drive and plans to take my 1T "TimeCapsule" drive in exchange, once the data has been transferred, so he will, of course, erase that drive. 

    Should we be able to bring up the old (500G) Time Capsule Drive to rename it using a SATA to FireWire harness and then copy the whole thing to the new Time Capsule drive?
    You can copy a whole sparsebundle from one drive to another. That is not a problem. Whether you can access the sparsebundle is something you should test before you even start though.
    If it's on the Desktop and I don't tell Time Machine to exclude it from backups, will it just automatically back it up?
    All drives you plug into the Mac are excluded by default.. you must include them. So no problems there.. but I hope I am understanding the question.
    Will both volumes or directories (which is the right term?) show up when I open Time Machine?
    No, Time Machine will only open what it is told to open... or its backup default location.
    You can force Time Machine to open alternative/old/no longer used backups by (now I have a problem as things have changed somewhat in Yosemite and I consider it alpha release software at this point in time). The old method was to right click on the TM icon and select a different TM backup. easy. Yosemite seems to have made easy stuff harder.
    Here it is on my current computer.. clearly not Yosemite.. Right click on the TM icon in the dock.. select Browse Other Time Machine Disks.. And supply the info of where that is located. Easy. If you cannot figure it out one of the other posters here (with more patience than me for Yosemite) will help you.
    Or will we have to partition the new drive somehow--is that even possible?
    I am getting more lost as I go down the list.. but the TC disk cannot be partitioned.
    If you have included all those USB drives in the new backup on a Time a Time Capsule.. you have made life rather hard because now your files are stored another layer deeper than they were.
    So to open a file from a disk you need to open the sparsebundle.. then dig down to the drive in question and then dig down to the backup.. and all of this means Time Machine has to work perfectly which is Yosemite is a very big ask.
    I thought you wanted to just backup your old drives to central location.. which means copying the files to a separate folder on the Time Capsule.
    One correction I need to make to my post, which will make my strategy make a bit more sense: my new Time Capsule drive is 4T
    It makes it much harder.. and I have to pose a real question of long term .. if you have put a 4TB drive in a Gen1 TC.. did you also replace its power supply because I can assure you the drive might be ok but the TC itself will not last forever.. and what happens when it dies. The Gen1 power supply is already well beyond its normal life span and the vast majority are dead. When the backup device is unreliable and the backups on it are made that much harder to get access to.. is this a great plan??
    If you are going to consolidate all your old files on one disk.. a task I find understandable. I have done much the same albeit the usefulness of files made on emac running OS9 may be questioned. A disk lying in the bottom of a draw is a more appropriate place for them.
    You want those files as easily accessible as possible (at the point of recovery) and not buried inside a sparsebundle.. particularly not a sparsebundle from the old TC disk buried inside a new sparsebundle.. keep files as accessible as possible as you can run searches.. and that is best done on a USB 3 (or faster ie thunderbolt) drive plugged into a new(ish) computer.. not network. And since the files are not being accessed on a daily/weekly or even monthly or yearly basis.. keeping them in actively running TC network storage.. I would say is a waste of space. That is only my opinion of course.. you might consider it highly important that files you will never look at are available any time of day or night when the urge comes to track down that elusive pimpernel email you sent 10 years ago... but I find it hard to justify. What the case.. the problem with TM and things like Mail is you cannot search it.. you must restore the whole library/files/program even before you can access it.. that makes file recovery out of a sparsebundle double step process.
    So.. summary.
    If you want to store files on the 4TB drive in the TC.. that is not a great strategy but it can work.. simply create a folder named.. OldFilesEMac for instance.. and do a simple copy and paste of all the file to that location. Do not use TM.. Since you have already used TM.. and from what I am reading you have already done the backup with the external drives included.. then you are going to end up needing to erase the TC and start over.. which you may not be prepared to do.. which is fair enough. (I am coming across as overbearing school master.. apologies).
    TM is to backup your main OS and current files.. not files from 10-20years ago.
    Please do read the issues involved in Pondini..
    See his FAQ. I recommend you read through Q14-17 so you understand what is involved in recovery.
    http://pondini.org/TM/FAQ.html
    I also recommend you read the first couple of articles here. http://pondini.org/TM/Home.html
    Particularly so you understand the complexity of Time Machine.
    And the articles here. http://pondini.org/TM/Time_Capsule.html
    Particularly Q3 on mixing data and backups on a TC.
    I wish I could spend an hour or two face to face and work it out.. the whole strategy to do this.. !!

  • OBIEE 11g - Combine data from two Oracle tables

    Good day!
    I tried to combine data from two Oracle tables as fact data, but it doesn't work.
    My steps: I created SCOTT.EMP2 table from SCOTT.EMP table, update EMPNO and ENAME values of EMP2 table to distinguish data of my tables. Then I imported physical tables DEPT, EMP and EMP2 to BIEE 11g, created joins DEPT-EMP and DEPT-EMP2 in physical diagram. Then I dragged DEPT and EMP tables to BMM, and EMP2 table to EMP as second LTS. In Content tab for EMP and EMP2 I checked "This source should be combined with other sources at this level" checkboxes. Then I renamed logical tables EMP and DEPT to Employees and Departments and dragged them to Presentation area. In Answers I created Analysis with columns DNAME and ENAME.
    The problem is that data on results tab is only from one physical table EMP or EMP2 (depending on the order of sources EMP and EMP2 of LT Employees) and not from both.
    Can anybody help? Am I missed something?
    Al.

    Hi Al,
    I think you have to define the content of the LTS.
    http://download.oracle.com/docs/cd/E12096_01/books/admintool/admintool_BusModSetup16.html
    You have to specify the content of the different fragments.
    http://download.oracle.com/docs/cd/E12096_01/books/admintool/admintool_SetUpAggNav3.html#wp1005333
    Maybe you have to add an additional column 'Source' ('EMP1', 'EMP2')
    Good Luck,
    Daan Bakboord
    http://obibb.wordpress.com

  • Selecting data from two different tables.

    Do we need to use join two tables with primary/foreign key while trying to use select statement for getting data from those to table.? If no who can i go about do it.

    872959 wrote:
    If i am using From clause to get data from two different tables, is it necessary that both tables have column of identical data in them.In general, they ought to (or you need to join in a third table that tells you how to map rows from one table to rows of the other table).
    It is not strictly necessary that there be any join condition between tables. If you don't provide a join condition, Oracle has to do a Cartesian product. That means that if there are n rows in one table and m rows in the other, the result set will have n * m rows. It is very rarely a good idea to write queries that do Cartesian products but it does occasionally happen.
    Justin

  • Filling dynamic internal table with data from other internal table

    Hi Friends,
    My problem is that i have already built a dynamic internal table
    (class int_table->create) but now i want to fill it with data from other internal table.
    The dynamic table column name and the field value of the data filled internal table are same, but how to access that column name, since i cant hard code it anyway.
    Like if my werks field value is '8001'. I want to place it under the column 8001 of dynamic table, Can anybody help me in this regard?
    Awarding points is not a problem for even giving a slight hint.
    Best Regards

    Hi
    See this
    Dynamic internal table is internal table that we create on the fly with flexible column numbers.
    For sample code, please look at this code tutorial. Hopefully it can help you
    Check this link:
    http://www.****************/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
    Sample code:
    DATA: l_cnt(2) TYPE n,
    l_cnt1(3) TYPE n,
    l_nam(12),
    l_con(18) TYPE c,
    l_con1(18) TYPE c,
    lf_mat TYPE matnr.
    SORT it_bom_expl BY bom_comp bom_mat level.
    CLEAR: l_cnt1, <fs_dyn_wa>.
    Looping the component internal table
    LOOP AT it_bom_expl INTO gf_it_bom_expl.
    CLEAR: l_cnt1.
    AT NEW bom_comp.
    CLEAR: l_cnt, <fs_dyn_wa>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
    it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
    ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa> TO
    <fs_check>.
    <fs_check> = gf_it_bom_expl-bom_comp.
    ENDAT.
    AT NEW bom_mat.
    CLEAR l_con.
    ENDAT.
    lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
    LOOP AT it_mat_temp.
    l_nam = c_mat.
    l_cnt1 = l_cnt1 + 1.
    CONCATENATE l_nam l_cnt1 INTO l_nam.
    LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
    ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
    ENDLOOP.
    IF <fs_xy> = lf_mat.
    CLEAR lf_mat.
    l_con1 = l_con.
    ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
    IF <fs_xy> = gf_it_bom_expl-bom_mat.
    ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
    CLEAR l_con.
    MOVE gf_it_bom_expl-level TO l_con.
    CONCATENATE c_val_l l_con INTO l_con.
    CONDENSE l_con NO-GAPS.
    IF l_con1 NE space.
    CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
    CLEAR l_con1.
    l_cnt = l_cnt - 1.
    ENDIF.
    <fs_check> = l_con.
    l_cnt = l_cnt + 1.
    ENDIF.
    ENDLOOP.
    AT END OF bom_comp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
    ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
    <fs_check> = l_cnt.
    INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
    ENDAT.
    ENDLOOP.
    Reward if useful
    Anji

  • AWM dimension mapping - is it possible to load data from two input tables ?

    Hello All
    I have two tables ProductFamily (parent level) and Products (child level).
    I want to load a dimension from these two tables where the parent-child relationships are maintained (I am using AWM).
    I created a mapping with these two tables as input, but the data loaded does not maintain the relationships.
    So how do I do that? Is it possible to load dimensions where different levels get data from multiple tables?
    Is there any type of joiner available in AWM?
    thanks
    Few Notes:
    - I do not want to use OWB here as my data is clean
    - In AWM, When I loaded the data from a single view which contained data from both input tables, it worked fine. But this is my worst case option.

    You should use the Snowflake Dimension option in the Dimension mapping screen for the Product Dimension (as opposed to the default dimension mapping style - star schema).
    This will modify the mapping inputs to include a separate parent level key for each hierarchy/level i.e. for each hierarchy/level (unless topmost level of hierarchy), you need to specify the parent level key in addition to the current level key, code/name/description/other attributes etc.
    You can do the mapping in either .... use icons at the top of the mapping screen.
    the drag/drop mode by dragging the relational column onto dimension model - hierarchy/level/attribute
    -or-
    the table expression mapping mode which gives the same effect.. dragging a column onto an attribute sets the expression in <schema>.<table>.<column> format.
    HTH
    Shankar
    Note1: Complete the mapping in one go.. Switching b/w the mapping modes cause the mappings to be reset.
    Note2: Assume your data is correct, foreign key to parent level table: ProductFamily exists in child level table: Products.

  • How to get common datas from two int.tables

    hi,
    please tell me , how to i will get the common datas between two int. tables
    & place them in third int. table.
    give me syntax.
    regards
    subhasis.

    Hi Subhasis,
    <b>SORT :</b></u>
    SORT itab.
    Extras:
    1. ... BY f1 f2 ... fn
    2. ... ASCENDING
    3. ... DESCENDING
    4. ... AS TEXT
    5. ... STABLE
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Field symbols not allowed as sort criterion.
    Effect
    The entries in the internal table are sorted in ascending order using the key from the table definition (DATA, TYPES).
    Addition 1
    ... BY f1 f2 ... fn
    Effect
    Uses the sort key defined by the sub-fields f1, f2, ..., fn of the table itab instead of the table key. The fields can be of any type; even number fields and tables are allowed.
    You can also specify the sort fields dynamically in the form (name). If name is blank at runtime, the sort field is ignored. If itab is a table with a header line, you can also use a field symbol pointing to the header line of itab as a dynamic sort criterion. A field symbol that is not assigned is ignored. If a field symbol is assigned, but does not point to the header line of the internal table, a runtime error occurs.
    If the line type of the internal table contains object reference variables as components, or the entire line type is a reference variable, you can use the attributes of the object to which a reference is pointing in a line as sort criteria (see Attributes of Objects as the Key of an Internal Table.
    You can address the entire line of an internal table as the key using the pseudocomponent TABLE_LINE. This is particularly relevant for tables with a non-structured line type when you want to address the whole line as the key of the table (see also Pseudocomponent TABLE_LINE With Internal Tables).
    If you use one of the additions 2 to 5 before BY, it applies to all fields of the sort key by default. You can also specify these additions after each individual sort field f1, f2, ..., fn. For each key field, this defines an individual sort rule which overrides the default.
    Addition 2
    ... ASCENDING
    Effect
    Sorts in ascending order. This is also the default if no sort order is specified directly after SORT. For this reason, it is not necessary to specify ASCENDING explicitly as the default sort order.
    With the addition BY, you can also specify ASCENDING directly after a sort field to define ascending order explicitly as the sort sequence for this field.
    Addition 3
    ... DESCENDING
    Effect
    Sorts in descending order. If the addition comes right after SORT, DESCENDING is taken as the default for all fields of the sort key.
    With the addition BY, you can also specify DESCENDING directly after a sort field.
    Addition 4
    ... AS TEXT
    Effect
    Text fields are sorted appropriate to the locale. This means that the relative order of characters is defined according to the text environment being used.
    When an internal mode is opened (in other words, when a roll area is opened), the text environment is automatically set to the logon language specified in the user master record. If necessary, however, you can change the text environment explicitly in your program by using a SET-LOCALE statement.
    If the addition comes directly after itab, locale-specific rules are used for all fields of the sort key where the type of these fields is C or W. After the sort, the sequence of entries usually does not match the sequence which results otherwise, without using the addition AS TEXT, i.e. with binary sorting.
    With the addition BY, you can also specify AS TEXT directly after a sort field, provided it is of type C or W, or a structured type. Otherwise, a runtime error occurs. In sort fields with a structured type, AS TEXT only affects subcomponents with type C or W.
    In case of an invalid character, a SYSLOG message is written, and the respective record is inserted at the end.
    Note
    Please keep the rules for site-specific sorting in mind.
    Example
    Sort a name table with different keys:
    TYPES: BEGIN OF PERSON_TYPE,
             NAME(10)   TYPE C,
             AGE        TYPE I,
             COUNTRY(3) TYPE C,
           END OF PERSON_TYPE.
    DATA: PERSON TYPE STANDARD TABLE OF PERSON_TYPE WITH
                      NON-UNIQUE DEFAULT KEY INITIAL SIZE 5,
          WA_PERSON TYPE PERSON_TYPE.
    WA_PERSON-NAME    = 'Muller'. WA_PERSON-AGE = 22.
    WA_PERSON-COUNTRY = 'USA'.
    APPEND WA_PERSON TO PERSON.
    WA_PERSON-NAME    = 'Moller'. WA_PERSON-AGE = 25.
    WA_PERSON-COUNTRY = 'FRG'.
    APPEND WA_PERSON TO PERSON.
    WA_PERSON-NAME    = 'Möller'. WA_PERSON-AGE = 22.
    WA_PERSON-COUNTRY = 'USA'.
    APPEND WA_PERSON TO PERSON.
    WA_PERSON-NAME    = 'Miller'. WA_PERSON-AGE = 23.
    WA_PERSON-COUNTRY = 'USA'.
    APPEND WA_PERSON TO PERSON.
    SORT PERSON.
    Now, the sequence of the table entries is as follows:
    Miller  23  USA
    Moller  25  FRG
    Muller  22  USA
    Möller  22  USA
    If, for example, you apply German sort rules where the umlaut comes directly after the letter 'o' in the sort, the data record beginning with 'Möller' would not be in the right place in this sequence. It should come second.
    Provided a German-language locale is set (e.g. sorting is according to German grammatical rules, see also SET LOCALE), you can sort the names according to German rules as follows:
    SORT PERSON BY NAME AS TEXT.
    Now, the sequence of table entries is as follows:
    Miller  23  USA
    Moller  25  FRG
    Möller  22  USA
    Muller  22  USA
    Further examples:
    SORT PERSON DESCENDING BY COUNTRY AGE NAME.
    Now, the sequence of table entries is as follows:
    Miller  23  USA
    Möller  22  USA
    Muller  22  USA
    Moller  25  FRG
    SORT PERSON DESCENDING BY AGE ASCENDING NAME AS TEXT.
    Now, the sequence of table entries is as follows:
    Muller  22  USA
    Möller  22  USA
    Miller  23  USA
    Moller  25  FRG
    Addition 5
    ... STABLE
    Effect
    Uses a stable sort, that is, the relative sequence of entries that have the same sort key remains unchanged.
    Unlike additions 2 to 4, you cannot use this addition directly after a sort field.
    Notes
    General:
    The number of sort fields is restricted to 250.
    The sort process is only stable if you use the STABLE addition. Otherwise, a predefined sequence of fields used to sort a list is not usually retained.
    It does not make sense to use the SORT command for a SORTED TABLE. If the table type is statically declared, the system returns a syntax error if you try to SORT the table. If the table type is not statically declared (for example, because the table was passed to a FORM routine as an INDEX TABLE in a parameter), and the system can interpret the SORT statement as an empty operation, it ignores the statement. This is the case when the key in the BY clause corresponds to the beginning of the table key. Otherwise, a runtime error occurs.
    To delete all duplicate entries from a sorted internal table (e.g. just after SORT), you can use the DELETE ADJACENT DUPLICATES FROM itab statement.
    When using the addition AS TEXT, the sequence of entries after the sort does not usually match the sequence resulting from a binary sort, i.e. if the addition AS TEXT is not specified. The consequence of this is that after the SORT, you are not allowed to access with the READ TABLE itab ... BINARY SEARCH statement.
    If you still want to access data sorted apppropriate to the locale with a binary search, you can do this by including an additional component in the table where you can explictly store the data formatted using the CONVERT TEXT ... INTO SORTABLE CODE statement. This is also recommended for performance reasons if you have to re-sort the table several times according to locale-specific criteria.
    If the internal table has more than 2^19 lines or is larger than 12 MB, the system sorts it physically using an external auxiliary file. You can specify the directory in which the file should be created using the SAP profile parameter DIR_SORTTMP. By default, the system uses the SAP data directory (SAP profile parameter DIR_DATA).
    Notes
    Performance:
    The runtime required to sort an internal table increases with the number of entries and the length of the sort key.
    Sorting an internal table with 100 entries with a 50 byte key requires about 1300 msn (standardized microseconds). Using a 30-byte key, the runtime is about 950 msn.
    If one of the specified sort criteria is itself an internal table, SORT may sometimes take much longer.
    The runtime increases if you use a stable sort.
    Physical sorting reduces the runtime required for subsequent sequential processing.
    Reward If Useful.
    Regards,
    Chitra

  • Having total brain fart - pulling data from two differnt tables

    Good morning,
    I am completely having a blonde moment here.
    My main select statement can pull all the data I need from one table however I need to define my result set by date range and the date data is held in another table. I am trying to remember how to write my statement to pull data from two tables in the same database.
    I haven't written query in a couple of years and was self taught previously - I need data our report management program cannot produce.
    Any help would be fantastic! Thank you :-)
    Dez
    Edited by: user10773439 on Jan 8, 2009 8:12 AM

    Here is the pseudo sql.
    select columns_from_table_a, columns_from table_b
    from table_a a,
    table_b
    where a.common_column = b.common_column
    and b.date_column > = <startdate>
    and b.date_column < <end_date>+1;
    --Dont forget to_date your date values                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Can we get the data from two internal tables in ALV.

    hi friends i would like to display the data using two internal tables using alv grid.please guide me.

    Hi,
    ALV would be having a specific layout say :
    MATNR
    MAKTX
    QTY
    Now, if you have two internal tables, then do they have a different structure. If they have different structures, then what kind of ALV layout you expect. The ALV output should be as per the structure of 1st or 2nd internal table.
    If both internal table have same layout, then populate the data from 2nd internal table into 1st internal table and pass the 1st internal table ( it will have data of both internal tables) to ALV.
    Best regards,
    Prashant

  • How to Copy complete structure of a table with data from one database table to another databse table

    I need a sql query to copy structure of table with data from production table of ONLINEBTREKDB database to production table of Archive database.
    I tried this query
    select * into Archive.dbo.Production from ONLINEBTREKDB.dbo.Production p
    but problem is I am able to copy the table schema and data but not able to copy constraints(PK)
    Any Help?
    seema

    You've multiple options
    1. Use generate scripts wizard available in SQL management studio. This is particularly helpful when you want to script out lot of objects. You can also choose to script data as well inside this. This can be launched by right clicking the db, choosing tasks
    -> generate scripts and then selecting required options inside the wizard
    2. Use object explorer and right click and script out table. You can also use search functionality to find object you want inside object explorer
    http://visakhm.blogspot.in/2013/02/object-filtering-using-ssms-object.html
    3. Use query based on INFORMATION_SCHEMA views like TABLES,COLUMNS,CONSTRAINT_COLUMN_USAGE etc to generate the script
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Odd/Even pages with data from two tables

    Hi Forum,
    Can you please extend help/suggest with the following scenario:
    I have two data tables and one table records needs to be printed on odd pages (Front page) and the other table records need to be printed on even pages (Back page). I need alternating front and back pages based on data records in the tables. Also second table will be having lesser records when compared with first table.
    I'm able to get the alternating Odd/Even master pages. But the first table is being printed in both the odd/even pages first and then the second table is being printed in both the odd/even pages. How can I restrict the printing of the first table on odd page and second table on even page?
    Thanks for your help/suggestions.
    ~Madan

    You can play with pagination tab in your LCD tab, but I have never learnt enough to be able to use it effectively.
    If I were in your shoes, I would alter the DDIC structures in the backend so you will only display it in the form, without any suicidal actions through the pagination, scripting or similar stuff.
    How: If you need to alter pages, you can do that in your backend, right?
    Like you can have a structure page with attributes:
    - up/ front: data for the front page
    - down/back: data for the back page
    and you will alter the data in the table with this structure as a line in your ABAP program and will use to form to display the trnaformated data only.
    Well... I don´t tell it is clear/right/ proper solution and cannot tell if there are any obstacles which will not let you use this scenario in your case, but you could consider this as an option...
    Regards Otto

  • How to create a bc model for sharepoint 2013 that consume data from two Sql tables?

    Hi everyone!!!
    I have created several external contents using SQL Server databases as datasource. The thing is every time I created one, only consume one table and define operations for that table. I would need to create an external content that can contain the
    information of two tables. I tried to export the bdc model and type the query using left joins but nothing happens...I did it in that way for sharepoint 2007 and works!!!
    I know if a create a view in the database I can have the data that I want and I can create the external content using the view. But the thing is I don't have access to the database for creating anything, just read it.
    can anybody can help me, please?
    Thanks.

    Please follow this article to write SSRS reports with data source as SharePoint list/calendars etc. All document libraries, list and calendars are derived from base list class so you can use any of this type as a data source
    http://www.mssqltips.com/sqlservertip/2068/using-a-sharepoint-list-as-a-data-source-in-sql-server-reporting-services-2008-r2/
    Once your SSRS report is developed, you have multiple ways to show it in SharePoint
    - upload to SSRS server and show in sharepoint in a page viewer web part or simply open it as a link in new window
    - configure SharePoint environment with integration to SSRS and upload report to SharePoint library. Display report in a web part page using SSRS web part.
    Moonis Tahir MVP SharePoint,MCTS SharePoint 2010/2007, MCPD.net, MCSD.net, MCTS BizTalk 2006,SQL 2005

  • Data from two fact tables??

    I have a report in which I am comparing two fact tables at month level. I have columns calculated at this level.
    One fact has all month entries and other does not have all.
    I need to show all the month values and measures in the report even if some months donot exist in one fact and exists in the other.
    Currently, my report shows only those months which two facts have in common.
    Please suggest.

    Left join didnot work for me..Still getting the same result.
    I created two identical reports from two identical facts.... using "combine with similar request"
    Dummied columns from 2nd fact (placed 0s) for 1st report
    and dummied columns from 1st fact (placed 0s) for 2nd report.
    In the fnal report..
    I am getting two rows for each month..
    I need to club those two rows into single row by summing up the values..is that possible?
    January ..................10 .........0
    January...................0............15
    February..................3.............0
    February ..................0...........-1
    I need the out put as..
    January.....................10............15
    February.....................3............-1

  • Unexpected results getting data from two fact tables through conformed dim

    Hi all,
    We are getting an unexpected behaviour in our OBIEE 10.1.3.3.3. We have this scenario:
    We have {color:#0000ff}2 fact tables{color}{color:#000000} called F1 and F2. F1 has one measure, f1m1 and F2 has another one, f2m1.
    We have {color:#0000ff}4 conformed dimensions{color}, called D1, D2, D3, Date.
    When we are requesting for individual fact tables, we are getting:
    date d1 d2 d3 f1m1
    dt1 - x - y - z - m1
    dt1 - x - y - z' - m2
    date d1 d2 d3 f2m1
    dt1 - x - y - z - m3
    dt1 - x - y - z'' - m4
    But, trying to obtain a compare scenario, we are getting
    date d1 d2 d3 f1m1 f2m1
    dt1 x y z m1 m4
    Instead of
    date d1 d2 d3 f1m1 f2m1
    dt1 x y z m1 m3
    Looking at query log, we have catched the reason. That's why BI Server is using to solve this request using ROW_COUNT() to join SAWITH0 and SAWITH1 in SAWITH2 result set. So, the order may not be the same in the results sets in every fact table. More or less, generated query is like:
    WITH
    SAWITH0 AS
    (select ....
    from F1),
    SAWITH1 AS
    (select ...
    from F2),
    SAWITH2 AS
    select from (select ...
    ROW_NUMBER() OVER PARTITION (....) c10
    from SAWITH0.d1 full outer join SAWITH1.d1 ....) D1
    {color:#ff0000}where (D1.c10 = 1){color}
    select SAWITH2. ....
    from SAWITH2
    order by c1..c10
    The problems seems to be that BI server is ordering the result sets SAWITH0 and SAWITH1 and getting row number to join this results sets, but this is not getting the correct result.
    Any ideas?
    TIA
    Javier
    {color}
    Edited by: jirazazábal on Mar 13, 2009 2:46 PM

    I have done a logical fact table with two fact table source on it.
    The Sql performed against the database was this one.
    -------------------- Sending query to database named PRODS_AIX (id: <<153418>>):
    WITH
    SAWITH0 AS (select sum(T21296.CONSUMERS_SALES_EURO) as c1,
         T21309.DIVISION_CODE as c2
    from
         DIVISION T21309,
         C_CONSUMERS_SALES T21296
    where  ( T21296.DIVISION = T21309.DIMENSION_KEY )
    group by T21309.DIVISION_CODE),
    SAWITH1 AS (select sum(T21356.ORDER_VALUE) as c1,
         T21309.DIVISION_CODE as c2
    from
         DIVISION T21309,
         DWH_SALES_ORDER_OVERVIEW T21356
    where  ( T21309.DIMENSION_KEY = T21356.DIVISION_KEY )
    group by T21309.DIVISION_CODE)
    select distinct case  when SAWITH0.c2 is not null then SAWITH0.c2 when SAWITH1.c2 is not null then SAWITH1.c2 end  as c1,
         SAWITH0.c1 as c2,
         SAWITH1.c1 as c3
    from
         SAWITH0 full outer join SAWITH1 On nvl(SAWITH0.c2 , 'q') = nvl(SAWITH1.c2 , 'q') and nvl(SAWITH0.c2 , 'z') = nvl(SAWITH1.c2 , 'z')
    order by c1As you can see one select (SAWITH0) for the first fact table C_CONSUMERS_SALES and one select for the second fact table DWH_SALES_ORDER_OVERVIEW (SAWITH1 ) and the two statement are joined with a full outer join.
    I ask me why you have the three select (SAWITH0,SAWITH1 and SAWITH2). Can you please paste the complete SQL performed ?
    Can you tell us also which SQL is performed if you select only the columns from one fact table and not for the other ?
    Regards
    Nico
    http://gerardnico.com

Maybe you are looking for

  • Old hard drive crashed, cannot get iTunes to find files

    Hi, Please help. Been working on this for weeks and can't get it right. Am at my wit's end: Old hard drive crashed; had new one installed. Tech person was able to find my iTunes on old drive and saved to thumbdrive. Downloaded most recent software an

  • Can I temporarily use the Mac Book Power Adaptor on MBP?

    Hi-- I'm on vacation and forgot my adaptor. But I have access to the Mac Book one. I looked up and they have different wattages--85 vs. 60 for the Mac Book. Can I use the 60 Wattage on my MBP meant for 85? Thanks for you help--Elise

  • Template and format printing problem

    Hello I have pages 08 in French installed on my Intel Imac; the problem I am experiencing is when using a pre-defined template, I open a template such as elegant letter (which has borders) I format all my text and graphics I then do a print preview w

  • Changing of iBase in Change Requests and Corrections being processed

    Good day! After going SP18 with Solution Manager our iBase component system has gone "mad": number for productive ERP-system has changed several times. Because of this change, a number of already approved change requests and corrections in processing

  • Is there a way to use a bookmark from Maps as the home/work address of a contact?

    I'm trying to use location-based reminders. But the Home and Work addresses I have in my own contact card are not recognized by Apple Maps. Is there a way to use Apple Maps to set the Home and Work addresses in my contact card to something that it wi