DB Tool List Table: How to access tables which are in different SQL database ?

Hi, All,
I'm working on a database application (SQL server) and is evaluating the NI DB Tool kit for this project.
One of the requirement is that I need to access tables which are in two different database
(say Table A in DB 1 and Table B in DB 2).
Our IT guys has linked Table A in DB1 to DB 2 and I verfied this when I use the SQL server managment studio.
When DB 2 tables are populated, Table A from DB1 is also there. I can also do the same thing using MS Access.
Table A in DB1 is avalaible to me enven though I only connect to DB 2.
Here comes the problem.
When I use DB Tool List Table.vi to access DB2, it does NOT list Table A in DB1. It only list the tables in
the database (DB2) which I make connection to (using DB Tool Open Connection.vi with a file DSN)
So my work around right now is to open two seperate connection to DB1 and DB2. However, this approach
obviously creates a problem when I have to access seperate database constantly in my application.
What would be a solution to this ? I've search the forum but only see one post that's somewhat related to
my question. (And it was posted on 2004) Perhaps I need to alter the code in the orignial VI (DB Tool List Table.vi)??
My IT guy told me he has not encountered this scenario since he writes codes in other enviroment such as
VB and others, and he's always been successful by linking tables to different database. 
I hope my question is sound and clear since I really don't know much about database terminology.
Any comment/suggestion is much appreciated !!!
Go to Solution.

To josborne:
To answer your question:
- Are the two databases contained on the same SQL Server instance? 
Or are the databases on separate instances?  I assume they are on
separate servers, otherwise this wouldn't really be an issue.  But its
good to know because it will affect how you build your SQL statements.
Yes they are on separate instances. 
- Ask your IT people specifically how they "linked Table A in DB1 to
DB 2".  I assume they used "linked servers". 
Maybe I used the wrong terminology "linked." They created a "View of Table A (DB1)" in DB2 using the management studio.
Here is a screen shot of that. As you can see, dbo.VISUAL_WORK_ORDER is seen under LABVIEW database in the management studio.
I also see the same table when I make connection to database using MS Access.
Could you elaborate on "configure your SQL statement correctly" =) ? The purpose of using LabView's took kit is so that I can do
minimum SQL statements. Are you talking about modifying LabView's native VI (DB Tool List Table.vi) ?
Thanks for the information. SQL is just something new to me.

Similar Messages

  • How to get the list of database Views modifying the DB tools list tables.vi

    I have a problem, I just started using LabVIEW and in particular the LabVIEW connectivity toolkit and I am lookig fgor suggestion regarding how to get the list of database Views modifying the DB tools list tables.vi...
    Thanks in advance,

    Hi Michela,
    since the VI you want to modify is part of a Toolkit, I suggest you to copy the whole block diagram in a new VI and then save it in a new location.
    Place the DB List Tables.vi on a block diagram, double click on it and go to the tab "Window -> Show Block Diagram "
    Select "Edit -> Select All" to select the whole block diagram and select "Edit -> Copy"
    Open a new VI and select "Edit -> Paste"
    Save the new VI
    In this way you can modify everything you want without overwriting the Toolkits VIs.
    Hope this can help.
    Andrea N.
    Systems Engineer ATE & RF - Mediterranean Region
    National Instruments Italy

  • How i access file which stored at application server .? Is there any fm ?

    How i access file which stored at application server . Is there any function module which provide same funtinality.
    Gurprit Bhatia

    Hi ,
            U need to use datasets for reading data from application server.Do a f1 on dataset,u will get to know rest of the things.
      IF sy-subrc = 0.
          READ DATASET file INTO <wa_data> MAXIMUM LENGTH 200.
               move the data in to internal table
        close dataset
    Edited by: A kumar on Aug 21, 2008 1:37 PM

  • Join 2 tables which are not related with any primary-foriegn key constraint

    How to join 2 tables which are not related with any primary key foreign key constraint.
    Ex.Consider Table A has 5 columns->A_ID,A_Name,A_Address,A_City,A_Pin(Total 10 rows)
    Table B has 5 columns->B_ID,B_Name,B_Adress,B_City,B_City(Total 30 rows)
    From both the table i want the data,which i need to use in curosr to display finally as "Address Label".
    Both the table are entirely different,but there can be some names of Table A which may come in Table B also,if the name,address and city is also same.That means same person in both the table.
    So finally i want total number of distinct records(distinct data of Table A which is not in B+all the data of table B) to come under Address Label.
    How can i write the select query for this condition?

    Hi, Swapna,
    user11018268 wrote:
    How to join 2 tables which are not related with any primary key foreign key constraint.
    Ex.Consider Table A has 5 columns->A_ID,A_Name,A_Address,A_City,A_Pin(Total 10 rows)
    Table B has 5 columns->B_ID,B_Name,B_Adress,B_City,B_City(Total 30 rows)
    Both the table are entirely different,but there can be some names of Table A which may come in Table B also,if the name,address and city is also same.That means same person in both the table.I think you want a UNION, not a join.
    If you have 10 rows in table_a, and 30 rows in table_b, then
    SELECT       A_ID,          A_Name,     A_Address,     A_City,     A_Pin
    FROM      table_a
    SELECT       B_ID,          B_Name,     B_Adress,     B_City,     B_City
    FROM      table_b
    ORDER BY            2,               4          
    ;will produce up to 40 rows; 40 if there are no duplicates. (UNION implies DISTINCT.)
    The corresponding column types should be similar, if not exactly the same.
    There's no problem if A_Name is VARCHAR2 (50) and B_Name is CHAR (30).
    However, there will be a problem if A_ID is a NUMBER and B_ID is a TIMESTAMP.
    You must have the same number of columns in all branches of the UNION.
    If you want an ORDER BY clause, put it at the very end, after the last branch of the UNION.
    You can use positional notation (where 2 means the 2nd column) like I did, or you can use names from the first prong of the UNION (such as A_Name).
    From both the table i want the data,which i need to use in curosr to display finally as "Address Label".
    So finally i want total number of distinct records(distinct data of Table A which is not in B+all the data of table B) to come under Address Label.I'm not sure what your mean about "Address Label".
    Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables, and the exact results (formatted) that you want from that data.
    You can concatenate all 5 columns into one VARCHAR2 column, if you want to.
    You'll probably want to use RPAD (or simillar functions) to make the output line up nicely.
    If any of the columns are not strings, use TO_CHAR to make string versions of them.
    For example:
    SELECT  TO_CHAR (A_ID, '9999999')
         || '   '          -- leave a little space between the left-justified a_id and the right-justified a_name
         || RPAD (A_Name, 25)
         || RPAD (A_Address, 50)
         ...Edited by: Frank Kulash on Nov 14, 2009 10:11 AM

  • Delete records from tableA which are not in tableB

    Table A contains milions of records which is the best way to delete records from tableA which are not in tableB
    delete from tableA where empno not in (select empno from tableb)
    delete from tableA where empno not exists (select empno from tableb
    where b.empno=a.empno)
    any help

    If you can do this, do with this:
    create table tableC
    as select a.*
    from tableA a,
    (select empno from tableA
    select empno from tableB) b
    where a.empno = b.empno;
    drop table tableA;
    rename table tableC to tableA;
    Ott Karesz

  • How to list the files in a directory which are recently modififed few mins

    I need command to list the files in a directory which are modified few minutes ago in SunOS. like "find . -cmin 2 -print " which list files that are modified 2 mins ago in Linux platform.
    Thanks in advance.

    The find command that comes with solaris doesnt have the cmin operator. Only mtime whose option is days.
    So install gnu find from sunfreeware which is the same one that comes with linux.

  • How the system know which are Inventory cubes?while compres in ProcessChain

    When I create a Cube compress in ProcessChain ,under the page there is a checkbox called No Maker for Inventory Cube,and I also know the Non-cumulative key figure can not be compress,
    My question is how the system know which are Inventory cubes? and many cube create from ourself.

    I think,
    - in the sap tables there are no information.
    - the program reads the infocube definition and check: is there a non-***. value?

  • Access figures which are not part of iPhoto

    as a MAC rookie, I have a question which has been potentially asked already many times.
    I want to import a picture or a figure into keynote / numbers / pages and the figure is not part of iPhoto.
    When I open 'Media' I can only access pictures and figures which are in iPhoto. See screenshot below.
    How can I access files which are stored somewhere else?

    The Media browser is just one option. It collects all the info stored in iMovie, iTunes, iPhoto and displays it in one place.
    From the Insert menu (in Pages), select "Choose..." and navigate to the file. Or, do something really Mac-like and drag the picture from the Finder into the program.

  • How to get services which are running currently

    How to get services which are running currently in the system by a java program. And also how to write a service so that i can start/stop the service from the control panel -> services.

    triple post

  • How to get the data from a table which are availble in MD04

    Can you please let me know the tables in which the 'data available in MD04' are stored.
    I would like to have the data pertaining to the customer order/Item with requirements available in MD04.
    Thanks and Regards,

    Probably the easiest way in this case is to run the performance trace (System/Utilities/Performance trace). Start transaction MD04, put on the trace in another window, press enter to see the stock/requirements list, then stop the trace and list the results. Then you'll see which tables were accesses with which queries.

  • How to see the tables which are in the physical layer of SampleAppLite rpd

    Hi Everyone,
    I am new to OBIEE and I installed OBI Apps with Oracle 11g in my laptop. I tried to create reports using the OracleBIAnalyticsApps rpd. How can I know from which schema the tables are coming in the physical layer of the repository so that I can create a connection pool to the database. I got the default SampleAppLite rpd when I install the OBIEE but I am unable to see those tables in the database schema which are used in the SampleAppLite physical layer. Can anyone tell me how can I see the tables in the database which I see in the rpd. Actually my question may be wrong as I am new to this field, so please let me know if this is a wrong question. As I unable to express my question correctly. Thanks.

    For the OracleBIAnalyticsApps rpd - the tables are under "Catalog" then "dbo" in database "Oracle Data Warehouse" in the physical layer. The RPD comes out of the box with the required connection pools - you dont need to create any. The connection pools "Oracle Data Warehouse Repository Initblocks Connection Pool" and "Oracle Data Warehouse Connection Pool" in "Oracle Data Warehouse" read the data from the business analytics warehouse that you created in a schema name of your choosing with the DAC. All you need to do is edit the user name and password and the data source name with a connect string - which is the local net service name to your database for default call interface OCI 10g/11g assuming you used an Oracle database for your warehouse. One way to test the connection pool is to right click any table/alias then "Update Row Count".
    BTW Using the Admin Tool open the OracleBIAnalyticsApps rpd then do "Tools" then "Utilities" then "Repository Documentation" then "Execute". This will create a spreadsheet showing you all the mappings from the presentation to business to physical layers.

  • Identify tables which are not used in any access seq.

    Need to identify those tables (A500 - A999) which are NOT used in any access sequence (table T682I).
    Not sure how to do this.
    Thanks for the help

    Hi Karen,
    if you don't want to use SE11 and see it on one glance, you could use the following coding:
    DATA: it_t682i TYPE TABLE OF t682i,
          wa_t682i TYPE t682i,
          it_missing TYPE TABLE OF t682i,
          wa_count TYPE kotabnr VALUE 499.
    SELECT * FROM t682i INTO TABLE it_t682i
                  WHERE kvewe = 'A'
                  AND  kotabnr BETWEEN 500 AND 999.
      ADD 1 TO wa_count.
      READ TABLE it_t682i INTO wa_t682i
                 WITH KEY kotabnr = wa_count.
      IF sy-subrc <> 0.
        CLEAR wa_t682i.
        MOVE wa_count TO wa_t682i-kotabnr.
        APPEND wa_t682i TO it_missing.
      IF wa_count = 999.
    BREAK 'your user'.
    The table it_missing is just a quicky solution, you could use a table with just one field or use write to print the result.
    Hope that helps!

  • How to find reports which are using sales tables

    Hi Guys,
    we are using OBIEE 10g version.Here i need to identify the the reports which are using sales tables.
    Table names are given but how to find which report is using these tables.Is there any method to find
    or we have to check all reports manually?
    Could any one pls suggest me here!
    Edited by: 912736 on Jun 8, 2012 1:24 PM

    Hi SK,
    You can run a report from catalog manager that willl give you all answers requests and the subject area columns in use, you can map these back to the sales tables either manually or by linking (vlookup) to an RPD report that you can run from the Admin tool.
    The Usage Tracking method is pretty good but you will have to match up the reports using the Logical SQL.
    I'd do both methods and cross ref your results to ensure nothing slips the net.

  • [Urgent] List the tables which are in a mapping using OMB ?

    Does anyone know how I can list the table names which are contained in a mapping by using the OMB language ?
    After with this list I'll retrieve the properties of the extraction and loading hints (by using the OMBRETRIEVE command).
    Thanks in advance for your help !

    Hi Florent
    Something like the following will retrieve the table operators in a map:
    set table_ops [OMBRETRIEVE MAPPING '$mapname' GET TABLE OPERATORS]
    As an example of navigating the map using OMB the tcl below will traverse the map (change the mapname variable and run in the context of the module containing the map) - the results are written to a textfile in /tmp/map.txt. You can see how the operators are navigated and the connections queried, each operator is listed and the connected operators.
    set mapname EXAMPLE_17_21
    set fid [open "/tmp/map.txt" "w"]
    foreach op $ops {
    puts $fid ""
    puts $fid "Operator: $op"
    puts $fid "------------------------------------------------"
    foreach top $ops {
    if {$connected == 1} {
    puts $fid " $op -> $top"
    puts $fid " Attribute Mappings"
    puts $fid " ------------------"
    set tgrps [OMBRETRIEVE MAPPING '$mapname' OPERATOR '$top' GET GROUPS]
    foreach grp $grps {
    set atts [OMBRETRIEVE MAPPING '$mapname' OPERATOR '$op' GROUP '$grp' GET ATTRIBUTES]
    foreach att $atts {
    foreach tgrp $tgrps {
    foreach tatt $tatts {
    puts $fid " $grp.$att -> $tgrp.$tatt"
    close $fid

  • How to find the tables which are the candidates for gathering stats in 10g

    In 10g how can we find the tables, partitions which are the candidates for gathering the stats.
    I want to findo those tables, partitions and gather the stats on daily basis.

    The probem you describe has been posted about before. There are known issues with the default dbms_stats parameter settings for some environements.
    What you can do is just go ahead an manually submit dbms_stats commands with appropriate parameters for tables that have not been analyzed or modify the maintenance window to give it more time.
    I would rather just generate the missing statistics myself then the job can continue to run in the normal maintenance window. Since the job should be looking only for tables that meet the stale requirements then once everything is analyzed it is likely the job can keep the statistics updated in the default time allowed.
    Be warned that the default parameter settings do not work well for some tables in some environments and if that proves true for your shop you can generate workable statistics on a table and then lock them so the nightly job ships regenerating the statistics for that table. You would then manually unlock, generate, and lock that statistics for that table as necessary.
    HTH -- Mark D Powell --

Maybe you are looking for

  • External Hard Drive using MAC and PC

    I recently formatted my 250gb hard drive to MS-DOS (FAT32) so I can use the drive with Mac and PC. When I came to plug in my external hard drive in the other day with another mac PC it said I could only read only under get info. Why is this? I couldn

  • Open up ms word in JSP

    When I set the content type to msword and try to display the page as a Word document, the images are all broken. I'm certain the images location are correct, because it displays properly when it's set as a normal JSP page. Any ideas? Thanks

  • How to Sort Print Presets in IDCS3

    Hello I have a long list of print presets, and I would like to sort them. Is there a way??? I would hate to manually recreate like 30 of them. Thanks, Art

  • Hd 7790 2gb radeon on Vista - disaster

    My machine vista 32 bit home Previous card palit geforce 8400 gs 550w psu 4 gig ram I installed the card and driver and initially it worked. After 30 minutes while running game developers software and game my computer blue screened bsod for the first

  • Use of T-code OOAP

    Hello All, Could you kindly let me know why t-code OOAP is used and its essence in Org management. Best Regards, Kalyan