How to combine 2 different database value...

Hi there!
Good Day
Can you help me with this?
See image below.
Your reply will be much appreciated.
Thanks,
Joe

Hi Joe,
Small correction in the formula :
If {Flow_column} IN ['PRIMARY SLUDGE1', 'PRIMARY SLUDGE2'] then
"PRIMARY SLUDGE"
else
{Flow_column}
Thanks,
Sastry

Similar Messages

  • How to compare 2 different database to get table name which are not present in second database

    How to compare 2 different database to get table name which are not present in second database

    Sorry cannot test it right now
    use db1
    go
    select * from sys.tables t where not exists
    (select * from db2.sys.tables s where t.object_id=s.object_id)
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to add two different database connections on Model

    Hi,
    In my application, I need to create View Objects on different databases. So I need to add two different database connections on the Model.
    But it seems like Model can be connected to only one database. I tried adding another project to add the second db connection. But after I created a read-only View Object in the second project, it didn't generate corresponding data control in the Data Controls panel.
    Could anyone help me on this?
    Thanks!

    Do you mean adding the second project folder in ViewController->Project Properties->Libraries and Classpath?Yes, either that or: ViewController -> Project Properties -> Dependencies
    And I didn't see the first Model project in the ViewController classpath. Otherwise it wouldn't work. The first model project IS in 'classpath'. Here's how:
    ViewController -> Project Properties -> Dependencies
    I tried this and recreated the View Object. Still didn't generate the datacontrol. No idea why you had to recreate the VO.
    Is your VO in an application module inside the SECOND project?
    After you are sure that everything is in the ViewController's classpath, just try restarting JDeveloper.
    This is very basic. has to work.

  • How to upload two different asset values for Book & Tax Depre in FA

    Hello all
    kindly let me know how to resolve a situation where we have different methods of calculating Depreciation. For Example SLM for Book Depreciation and Diminishing method for Tax Depreciation.
    To calculate depreciation we use straight line method for book depreciation and diminishing value method for Tax depreciation. In this case, we have 2 different asset values to calculate book and tax depreciation.
    Since SAP allows to upload only one asset value (Gross book value), I get correct book depreciation value but incorrect value for tax depreciation as the tax depreciation is calculated based on gross book value instead of net book value (gross book value less accumulated depreciation value).
    For Eg
    FOR THE FIRST YEAR 
    BOOK DEPRECIATION:
    Asset Value = 1000
    Depreciation Method : SLM
    Depreciation rate is 10%
    Depreciation Amount = 100
    TAX DEPRECIATION:
    Asset Value = 1000
    Depreciation Method : DIMINISHING METHOD
    Depreciation rate is 15%
    Depreciation Amount = 150
    FOR THE SECOND YEAR
    BOOK DEPRECIATION:
    Asset Value = 1000
    Depreciation Method : SLM
    Depreciation rate is 10%
    Depreciation Amount = 100
    TAX DEPRECIATION:
    Asset Value = 850
    Depreciation Method : DIMINISHING METHOD
    Depreciation rate is 15%
    Depreciation Amount = 127.5
    KINDLY LET ME KNOW HOW TO UPLOAD THE PAST DATA WITH TWO DIFFERENT ASSET VALUES (IE 1000 & 850)  FOR THE ABOVE.
    Regards
    Sushil Yadav

    Hi K,
    I'm having the same problem...did you find a solution yet?
    Greets,
    Martin.

  • How to use two different database Drivers in one application ????

    I want to select datas in a result set of a query on a ms access database table and insert these into a mysql table of a mysql database in one application.
    Now my problem is that only on database driver is acceptet in the same application even it`s instanciatet in a completely different class !!!
    Here's the structure of my program:
    class one:
    String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
    database += filename.trim() + ";DriverID=22;READONLY=false}";
    java.sql.Driver driver0=new sun.jdbc.odbc.JdbcOdbcDriver();
    DriverManager.registerDriver(driver0);
    DriverManager.getDriver(database);
    con2=DriverManager.getConnection(database,"","");
    DatabaseMetaData dmd2;
    dmd2=con2.getMetaData();
    stmt2=con2.createStatement();
    rs2=("SELECT (.........
    until here all values can be selected correctly from ms access
    class2.get_gas_id(fla_gas);
    Now I want to insert these values into mysql.
    By despair i created a second class with another jdbc-method:
    class2:
    public class gas_select{
    public static int fla_gas_id;
    public static void get_gas_id(String fla_gas)
    java.sql.Statement stmt3;
    java.sql.Connection con3;
    java.sql.ResultSet rs3;
    FileWriter fout1;
    try
    java.sql.Driver driver1=new org.gjt.mm.mysql.Driver();
    DriverManager.registerDriver(driver1);
    DriverManager.getDriver(config.db_rge_stoffe); ==>
    config.rge_stoffe="jdbc:mysql://192.168.10.101:3306/rge_stoffe?user=<user>";
    con3=DriverManager.getConnection(config.db_rge_stoffe);
    java.sql.DatabaseMetaData dmd3;
    dmd3=con3.getMetaData();
    stmt3=con3.createStatement();
    rs3=stmt3.executeQuery("SELECT (Nr) from tblgaseliste where Gasart like "+"\'"+fla_gas+"\'");
    while(rs3.next())
    fla_gas_id=rs3.getInt("Nr");
    fout1.write(fla_gas_id);
    stmt3.close();
    con3.close();
    fout1.close();
    There's no result and no error message. Idon't know what to do !
    Has anyone an idea ???
    Edited by: goberger on Mar 27, 2008 3:35 PM

    Hi!
    If I understand your problem correctly, you can create connections to as many databases as you want in one class. In one of my programs I have connection to 3 separate databases, but here is an example:
    Connection mysql_con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbmysql", "root", "12345");
    Connection pg_con    = DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5433/dbpgsql", "postgres", "12345");Then from mysql_con and pg_con create PreparedStatement or Statement then load selections into ResultSet and then use getString() to get a basic String type result that you want and so update table from each database.
    HTH
    Victor.
    BTW Here I use port 5433 for PostgreSQL connection because I SSH tunnel it from 5432 to 5433
    Edited by: vic_sk on Mar 27, 2008 4:23 PM

  • How to integrate 2 different database

    hi..
    how to integrate between 2 difference database?
    between oracle 10g and sql server.
    also in different pc.
    thanx.

    Ok ,
    In topology create connection to ORACLE as well as SQL SERVER by Inserting dataserver .
    Create physical schema , logical schema for Oracle and Sql Server and catalog for Sql Server .
    In Designer create models by reversing using the logical schema defined in topology .
    Create interface , you will be able to use Oracle and Sql Server as source as well as target .
    Thanks,
    Sutirtha

  • How to run two different databases on different ports?

    I just created a second database on my machine with SID=B on which there was already a database with SID=A.
    Currently, the listeners for both DB instances work on the same default port 1521. How can i configure my Oracle instances so that the listener for A remains on port 1521 and listener for B listens on port 1531? I am new to database stuff so this might be a dumb question. Apologies in advance!
    Jimit

    Jimit wrote:
    I want it because when i am trying to create an informatica repository on database B, i am getting the error
    TNS 12154 - could not resolve the connect identifier specified.
    And what research led you to believe that creating another listener was the solution?  With a 12154, the request never left the client process .. it never got to the listener for the listener configuration to even matter.
    see: http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/ (ora-12154 TNS:could not resolve the connect identifier specified)
    The Listener service for database B is up and running, i am able to connect to database B through cmd and the tnsnames.ora file also has the TNS entry for database B.
    See the many previous comments regarding multiple listeners or listeners "dedicated" to a specific database.
    When i try to create my Informatica repository on database A which i installed earlier, it succeeds, however i cannot use database A because of certain restrictions.
    And what are those "certain restrictions"?  How can someone help if you hide the parameters under which you are working?
    Since there is no difference in database A and B except the SID, and the user ids i am using to create the repository have same privileges, i could not think of any other option.
    I can think of another option.  "Work the error message".   If you would research ora-12154 (tns-12154) you would find it has nothing whatsoever to do with listeners.
    Hence, do you think i should go for different ports for both listeners? Maybe it can help.
    It won't help.  It will just make matters worse.

  • How to Combine 2 Different Libraries

    About 6 months ago, our Powerbook was starting to fill up with photos and music, so I decided to back up our current iPhoto library to an external drive and on dvd, and then deleted the old library off the computer and started a new one. A couple weeks ago, we decided to just start storing all our photos on an external drive.
    How do I combine the original library with all the new photos we've taken since then into one new master library?

    I got the iPhoto Library Manager, and the merge function seems like it would be great, but I'm getting error messages:
    "An error has occurred while attempting to import the roll "Roll 109". (* -[NSNull length]: selector not recognized [self = 0xa07bb218]) If you would like to continue and try to import the roll "Roll 109" again, click "Continue". If you would like to continue, but skip the roll "Roll 109", click "Skip". If you would like to stop the merge, click "Cancel".
    How do I fix this? Thoughts?
    And the program seems great, but is there no "drag & drop" way to get the files I need all in one master folder? The merge function seems like it creates a lot of unecessary duplicates that would have to be deleted later.

  • How to connect to different databases in hibernate and mysql

    I have a question maybe someone can help me, I need to MAKE A java Enforcement (Desktop) Using Hibernate Where can create a Database, and then allow me to open or connect to the database I want, let's say I have two databases schedules1 one call and another call Horarios2, if I give open Horario1 ps I load the records that database, if anyone can give me ideas, or some articles where I will be grateful I can hayar information, I am using Mysql

    http://hibernate.org/docs

  • How to link 2 different database

    Hi,
    I'm having a problem. I have two databases name FLARE and MP5PROD. When I execute the triggers from FLARE DB, error displayed.
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA--12203: ":TNS unable to connect to destination
    TNSNAMES
    MP5PROD.WORLD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.2.222)(PORT = 1521))
    (CONNECT_DATA = (SID = MP5P))
    FLARE_PROD.WORLD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.222)(PORT = 1521))
    (CONNECT_DATA = (SID = PROD))
    Here are the script for database links:
    FLARE_PROD
    Link Owner: MP5PROD
    Link Name: MP5PRODTOFIN.WORLD
    Host: PROD
    Username: MP5BAIM
    Link Owner: MP5BAIM
    Link Name: FINTOMP5.WORLD
    Host: MP5P
    Username: MP5PROD
    SCRIPT
    create database link "FINTOMP5.WORLD"
    connect to MP5PROD
    identified by "<pwd>"
    using 'MP5P';
    MP5PROD
    Link Owner: MP5PROD
    Link Name: MP5PRODTOFIN.WORLD
    Host: PROD
    Username: MP5BAIM
    SCRIPT
    create database link "MP5PRODTOFIN.WORLD"
    connect to MP5BAIM
    identified by "<pwd>"
    using 'PROD';
    Please help.
    Thanks,
    Regards,
    Diane

    I guess you should use
    using ' MP5PROD.WORLD' instead of using 'MP5P';and
    using 'FLARE_PROD.WORLD' instead of using 'PROD';during dblink creation.
    Edited by: viconstg on 26.04.2012 13:33

  • How to access a Cloudscpae database?

    I have problems setting up and accessing the J2EE RI built-in database Cloudscape.
    In the EJB tutorial (EJBIntro) some EJB are created during the exercises. There's
    also a file named MusicStoreDB.jar which contains a prepared Cloudscape database.
    In the turorial it's been told:
    "Sun's J2EE Reference Implementation comes with a built-in version of the
    Cloudscape RDBMS. If you are using J2EE RI, you should initially use Cloudscape as
    your database to avoid configuration problems. You can learn how to substitute a
    different database after you become comfortable with creating and deploying
    applications using Cloudscape."
    and:
    "For Cloudscape, simply copy the MusicStoreDB.jar archive into the directory
    %J2EE_HOME%\cloudscape and then unjar the database. (All files unjar into the
    directory MusicStoreDB within the current working directory.)
    One last step is needed when running with J2EE RI: You need to modify the
    %J2EE_HOME%\config\default.properties file to define the datasources available
    to J2EE RI. This is done by changing the line that reads:
    jdbc.datasources=jdbc/Cloudscape|
    jdbc:cloudscape:rmi:CloudscapeDB;create=true
    (with everything on one line)
    to be:
    jdbc.datasources=jdbc/Cloudscape|
    jdbc:cloudscape:rmi:CloudscapeDB;create=true|
    jdbc/MusicStore|jdbc:cloudscape:rmi:MusicStoreDB;create=false
    (with everything on one line)
    and then restarting both Cloudscape and J2EE RI."
    Rather than doing the changes in "default.properties" I did in "resources.properties"
    but it dooesn't work.
    What am I doing wrong? Can anybody help me to get the database run? How do I have to
    register the MusicStoreDB within resources.properties and how can I access this database
    using the DatabaseTool provided with the EJB tutorial?
    Thank you.
    Dirk Ulrich
    Berlin, Germany
    [email protected]

    I'm having the same problem with even the same
    MusicStore demo .
    I'm trying to solve it.
    please let me know if you have any solution.
    Joseph.

  • Different database connections at runtime

    How can I change different database connections at runtime on the same Application Module ?
    I use BC4J as business layer and uiXml as presentation layer.

    Does anyone know how to do this?
    I need the same, but i couldn't find any documentation about it.
    Looking forward to hearing good news.....

  • How to create a view consisting of data from tables in2 different databases

    Using Oracle 10.2g
    I have 2 databases Gus and haggis on Comqdhb schema.
    glink indicates a databse link between Haggis and Gus
    In Gus there are tables student,subject,grade,school containing columns like upn...
    STUDENT
    upn
    academicYear
    SUBJECT
    subject
    GRADE
    examlevel
    grade
    SCHOOL
    sn
    In HAGGIS there are tables student,grade,teacher containing columns upn...desc below.
    STUDENT
    upn
    GRADE
    grade
    upn
    academicyear
    level
    Create view in your HAGGIS database which will join all of the exam grades together. You should have one view which will produce the following relation :
    examGrade(upn, subject, examlevel, sn, grade,academicYear)
    so I need to create a view which gets the data from both the tables in both the databases.
    create view as examGrade(upn, subject, examlevel, sn, grade,academicYear) as select s.upn
    But i am not getting how to select a column from 2 tables in different databases
    I mean if i said
    select upn from comqdhb.student@glink,comqdhb.student;
    select upn from comqdhb.student@glink,comqdhb.student
    ERROR at line 1:
    ORA-00918: column ambiguously defined
    help me out,Thank you.

    Thank you for the reply will follow up the code format
    Create views in your HAGGIS schema database which will join all of the exam grades together. You should have one view which will produce the following relation :
    examGrade(upn, subject, examlevel, sn, grade,academicYear)
    I understand that there wont be duplication when we use conditions
    If i query
    select count(upn)
    from   comqdhb.student@glink I get 9000
    but after the union
    create view examGrade(upn, subject, examlevel, sn, grade,academicYear)
    as
    select distinct s.upn as upn
    ,                  g.subject as subject
    ,                  g."LEVEL" as examlevel
    ,                  g.grade as grades
    ,                  '9364097'
    ,                  to_number(g.academicyear) as academicyear
    from             comqdhb.student s
    ,                   comqdhb.grade g
    where           s.upn=g.upn
    union
    select            s.upn
    ,                   sb.subject
    ,                   g.elevel
    ,                   g.grade
    ,                   s.acyr
    ,                   sc.sn
    from              comqdhb.subject@glink sb
    ,                   comqdhb.student@glink s
    ,                    comqdhb.gradevalues@glink g
    ,                    comqdhb.school@glink sc,
    ,                    comqdhb.studentingroup@glink sg
    ,                    comqdhb.teachinggroup@glink tg
    where            sb.sid=tg.sid
    and                tg.gid=sg.gid
    and                sg.upn=s.upn
    and                g."LEVEL"=tg.elevel
    and                s.school=sc.id
    and                sc.id=tg.id; returns
    count(upn) from exam gradeIt gets stuck actually sometimes it returns
    932002 some results.
    2:
    Another problem i am having which i am trying to solve and written up my ideas but haven't been getting the expected results.Hope you can help.Thank you.
    Information:
    =======
    All children take exams at the age of 16 called a General Certificate of SecondaryEducation (GCSE).
    They have to study and take exams in Mathematics, English and Science, and can take other subjects such as History, French, Art etc. Most students will study between 5 and 10 different subjects before taking their GCSEs.
    For each exam, a student is awarded a grade from A*, A, B,C,D,E,F,G,U,X An A* grade is the best grade achievable and an X is the worst grade.
    In order to analyze how students have performed, each grade is mapped to a numeric value as follows:
    Grade Numerical score
    A* 8
    A 7
    B 6
    C 5
    D 4
    E 3
    F 2
    G 1
    U 0
    X 0
    Now why i need this avgGCSE is because i have to create a view containing avgGCSE of the students it is used in the next question where a condition is avgGCSE is between 6.5 and 7
    In order to calculate the avgGCSE the idea is to calculate the grades of the students and map the grades to their corresponding scores/values
    add them all up and div by the total no of grades to get the avg.
    desc comqdhb.STUDENT@glink;
    STUDENT
    =======
    UPN
    FNAME
    CNAME
    DOB
    GENDER
    PREVIOUSSCHOOL
    XGCSE
    SCHOOL
    ACYR
    STUDENTINGROUP
    =============
    UPN
    GID
    STARTDATE
    ENDDATE
    GRADE
    GRADEVALUES
    ===========
    GRADE
    LEVEL
    VALUE
    I have a opinion that xgcse in STUDENT table refers to the avgGCSE which i want to calculate as when i asked my professor as to what xgcse he said that he forgot to take it out of the table and it is not necessary while creating avggcse.
    select *
    from comqdhb.student@glink
    where xgcse<6.5; Displaying a result
    returns:
    UPN FAMILYNAME COMMONNAME DATEOFBIR GENDER PREVIOUSSCHOOL XGCSE SCHOOL ACYR
    ===========================================================================
    1011 KIMBERLY ABBOT 07-JUL-79 f none 3.93500948 2 2
    select *
    from comqdhb.student@glink
    where xgcse between 6.5 and 7 and upn = 1386; Displaying a result
    returns:
    UPN FAMILYNAME COMMONNAME DATEOFBIR GENDER PREVIOUSSCHOOL XGCSE SCHOOL ACYR
    ===========================================================================
    1386 STEPHANIE AANNESSON 15-JAN-79 f none 6.88873 2 2 so if xgcse is the avgGCSE then upn 1011 has avggcse<6.5 and 1386 has avggcse >6.5
    my idea was backward strategy like so now if we find out upn 1368 has suppose xgcse(avggcse)>6.5 how to extract the avggcse for the particular upn We need to map grades from GRADEVALUES to grade in STUDENTINGROUP and map upn from studentingroup to upn in student to output the values for the corresponding grades from GRADEVALUES
    select grade
    from comqdhb.studentingroup@glink
    where upn = 1011;
    Result:
    GRADE
    =====
    D
    F
    B
    E
    C
    E
    E
    B
    8 rows selected. Mapping each grade to the corresponding value and calculating we get
    32/8=4 total(values to corresponding grades)/no of grades.
    But the xgcse for upn 1011 is 3.935 and i am getting 4!! maybe xgcse isn't avggrade but ? is the procedure by me correct for calculating avggcse
    select grade
    from comqdhb.studentingroup@glink
    where upn = 1386;
    Result:
    GRADE
    ======
    A*
    A*
    A*
    A*
    B
    A*
    A*
    A
    B
    B
    B
    11 rows selected. grade to the corresponding value and calculating we get
    79/11=7.12 total(values to corresponding grades)/no of grades.
    But the xgcse for upn 1011 is 6.88... and i am getting 7.12!!
    But another problem
    when i say
    select   g.value,g.grade
    from     comqdhb.gradevalues@glink g
    ,        comqdhb.studentingroup@glink sg
    where    g.grade=sg.grade
    and      sg.upn=1011;
    result:
    ======
    VALUE GRADE
    ===========
      100 B
      100 B
       80 C
       60 D
       40 E
       40 E
       40 E
       20 F
        6 B
        6 B
        5 C
    VALUE GRADE
    =============
        4 D
        3 E
        3 E
        3 E
        2 F
    16 rows selected.
    select   distinct g.value,g.grade
    from     comqdhb.gradevalues@glink g
    ,        comqdhb.studentingroup@glink sg
    where    g.grade=sg.grade
    and      sg.upn=1011;
    result:
    ======
    VALUE GRADE
    ============
         2 F
       100 B
         6 B
         3 E
        60 D
         5 C
         4 D
        80 C
        40 E
        20 F
    10 rows selected. I am getting only 8 for the query
    select grade
    from comqdhb.studentingroup@glink
    where upn = 1386; here its becomming 10 and also its displaying values as 100 and ...
    select distinct *
    from   comqdhb.gradevalues@glink;
    GRADEVALUES
    ===========
    LEVEL      GRADE           VALUE
    ================================
    a          A                 120
    a          B                 100
    a          C                  80
    a          D                  60
    a          E                  40
    a          F                  20
    a          U                   0
    a          X                   0
    g          A                   7
    g          A*                  8
    g          B                   6
    LEVEL      GRADE           VALUE
    ================================
    g          C                   5
    g          D                   4
    g          E                   3
    g          F                   2
    g          G                   1
    g          U                   0
    g          X                   0
    18 rows selected. I was hoping if i could map the grades and get the values and calculate avggrade by total(values)/count(values)that would be it but here there are values like 100...
    select  sum(g.value)/count(g.grade) as avggrade
    from    comqdhb.gradevalues@glink g
    ,         comqdhb.studentingroup@glink sg
    where  g.grade=sg.grade
    and     sg.upn=1386;
    avggrade
    ========
    37.4375 the avggrade cant be this big and when i map each grade i obtained for 1368 like a to 7+b to 6 so on i get avggrade 7.12
    kindly help.
    Edited by: Trooper on Dec 15, 2008 4:49 AM

  • How to access sysobjects and syscolumns on a different database?

    I'm attempting to write a script that iterates over all tables and their columns in all databases resident to a SQL Server connection. I can do either of these but cannot figure out how to merge the two together. The problem is that at the time that the
    table/column information is collected, it comes out of the system tables of the current default database and I can't quite figure out how to change default databases in a way that is acceptable under the current conditions. I can't create and write to the
    many database new stored procedures to handle the changing of default database and I don't want to use undocumented functions.
     but am having trouble prizing the information out of sysobjects, syscolumns and systypes on databases that are not currently the current database in use in order to find all occurrences of some string in all databases, no matter what table or
    column that string resides. One of the things making it harder is that I do not want to generate stored procedures on the fly and add them to the databases being probed so everything has to be accomplished either directly or by executing a sql string.
    There are two obvious approaches to the problem -
    1) Change the current database (Like 'use @DBNameVar' only something that actually works)
    2) Directly access sysobjects, syscolumns and systypes in a different database
    Here's what I have so far - I have figured out how to make a cursor that will list all of the databases and can load that database name into a string variable and I know how to get a listing of all of the tables and columns within a database. I have another
    piece of script that does a great job of probing all of the columns in all of the tables for a string.
    Will the systables allow access if their database is not the current database? If so, what is the syntax? Can you show me what I need to do in my table/column iteration script? Assume, for example, that @DBNameVar contains the name of the database that needs
    to be probed. What is the syntax that will combine that database name with the following script which lists all of the tables/column?
    DECLARE cCursor CURSOR LOCAL FAST_FORWARD FOR
    SELECT
    '[' + usr.name + '].[' + tbl.name + ']' AS tblName,
    '[' + col.name + ']' AS colName,
    LOWER(typ.name) AS typName
    FROM
    -- How can a sysobjects from another database be specified????
    sysobjects tbl
    INNER JOIN(
    syscolumns col
    INNER JOIN systypes typ
    ON typ.xtype = col.xtype
    ON col.id = tbl.id
    LEFT OUTER JOIN sysusers usr
    ON usr.uid = tbl.uid
    WHERE tbl.xtype = 'U'
    AND LOWER(typ.name) IN(
    'char', 'nchar',
    'varchar', 'nvarchar',
    'text', 'ntext'
    ORDER BY tbl.name, col.colorder
    Richard Lewis Haggard

    In addition to Latheesh and Tom solutions, I modified your code to use dynamic sql. It's just a different solution:
    --first create table
    CREATE TABLE tbl ( tblName sysname, colName sysname, typName sysname ) ;
    GO
    --now populate it with dynamic sql
    DECLARE @sql NVARCHAR(max) = N'';
    ; WITH db AS (
    SELECT name
    FROM sys.databases
    SELECT @sql = @sql +
    N' INSERT dbo.tbl ( tblName, colName, typName )
    SELECT
    QUOTENAME(usr.name) + ''.'' + QUOTENAME(tbl.name) AS tblName,
    QUOTENAME(col.name) AS colName,
    LOWER(typ.name) AS typName
    FROM
    -- How can a sysobjects from another database be specified????
    ' + QUOTENAME(db.NAME) + N'.sys.sysobjects tbl
    INNER JOIN(
    ' + QUOTENAME(db.NAME) + N'.sys.syscolumns col
    INNER JOIN ' + QUOTENAME(db.NAME) + N'.sys.systypes typ
    ON typ.xtype = col.xtype
    ON col.id = tbl.id
    LEFT OUTER JOIN ' + QUOTENAME(db.NAME) + N'.sys.sysusers usr
    ON usr.uid = tbl.uid
    WHERE tbl.xtype = ''U''
    AND LOWER(typ.name) IN(
    ''char'', ''nchar'',
    ''varchar'', ''nvarchar'',
    ''text'', ''ntext''
    ORDER BY tbl.name, col.colorder ;
    ' + NCHAR(13)
    FROM db ;
    PRINT @sql ;
    EXEC ( @sql );
    SELECT *
    FROM tbl ;
    sqldevelop.wordpress.com

  • How can I connect to a different database schema,other than adobe?

    I'm building an application where I want to use a different database for it,for storing additional data for the users(different from "edcprincipaluserentity" table in "adobe" database stores)..How I can connect to my database schema created in MySQL from Workbench,to assign tasks to my users,using the Process Management/Assign Task service?

    You can only assign task to user that are known by the LiveCycle User Manager.
    When you configure LiveCycle, you can tell it where you want to get the users from. They can be created them locally in the local database, or synchronized from an LDAP directory in which case it'll read the users from LDAP and make a copy of some of the properties to the internal LiveCycle database.
    Bottom line, all users have an id (in the edcprincipalentity table) in the adobe database.
    If you need your users to come from a different database, then you need to customize the SPI (security provider interface) so that you can synchronize the users coming from your external database. Again, this is a customization since out of the box, we don't synchronize against external database. But it is possible, the API is there and other customers have done it.
    I hope this clarifies things a bit.
    Jasmin

Maybe you are looking for