JDBC help needed

hi
i am connecting sql using jdbc...and i want to find the exact width of columns in a table.....e.g if a column with type datatime has width 8.........then using getPrecision() and getScale method() it do not return the exact width but it returns (23,3).....can anybody help me in finding exact width of a column
i shall be thankful
regards
muddsar

let me clear ur confusion.......when u open table in sql server 2000 in design view....it shows u the column length that is allowed......i just want to get that length......actually i m getting exceptionlike this...
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column or parameter #3: Cannot specify a column width
this error appear for datatype like smallint,int......i have also tried to manually create table using sql server query analyzer but it also gave same error if i try to specify column width for smallint or int.
now whats ur opinion

Similar Messages

  • [b]JDBC help needed[/b]

    Hello,
    I'm using Win2000 SP4 and J2SDK1.4.2_05 and I'm trying to connect to a remote server where Oracle9i ver. 9.2.0.1.0 is installed.
    I have simply downloaded ojdbc14.jar into [Java_HOME]\jre\lib\exp\ directory, without setting a CLASSPATH
    I've written this code:
    import java.sql.*;
    import oracle.jdbc.driver.*;
    class JDBCVersion
    public static void main (String args[])
    throws SQLException
    DriverManager.registerDriver
    (new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@HOST:1521:SID","user","passw");
    DatabaseMetaData meta = conn.getMetaData();
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    When I'm trying to compile everything is O.K.:
    c:\>javac JDBCVersion.java
    but when I'm trying to run it I get an error:
    c:\>java JDBCVersion
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver at JDBCVersion.main(JDBCVersion.java:10)
    And as soon as I set a CLASSPATH I'm getting this:
    c:\>java JDBCVersion
    Exception in thread "main" java.lang.NoClassDefFoundError: JDBCVersion
    Watta hell I'm doing wrong?
    Please someone HELP me, cause I'm losing my mind already.
    THANKS.

    I solved this problem myself
    No need to set any CLASSPATH
    just when run java program need to write
    java -cp .;[ORACLE_HOME]\jdbc\lib\ojdbc14.jar program_name

  • JDBC help needed ; java.lang.NoClassDefFoundError:test1

    hi, everyone, i had a problem when i run my own app to connect javadb in embedded mode
    i ve added the ~/javadb/lib/derby.jar to CLASSPATH
    and ~/javadb/lib/derby.jar:~/javadb/lib/derbytools.jar to DERBY_HOME
    but there is a problem said my own application class cannot be found.
    here is my code:
    import java.sql.*;
    class test1
      public static void main (String args [])
           throws SQLException
           try {
            Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
        } catch (Exception e) {
            System.out.println("ERROR: failed to load javadb JDBC driver.");
            e.printStackTrace();
            return;
          Connection conn = DriverManager.getConnection("jdbc:derby:testdb");
      try{
         Statement stmt1 = conn.createStatement();
            ResultSet rset1 = stmt1.executeQuery( "SELECT * FROM PART" );
         long counter1 = 0;
            double price1;
         while ( rset1.next() )
             price1 = rset1.getDouble(8);
             if (price1 == 1306.4)
              counter1++;
         System.out.println( counter1 );
         stmt1.executeQuery("SHUTDOWN");
         conn.close();
       catch (SQLException e )
         String errmsg = e.getMessage();
         System.out.println( errmsg );
    }and i ve followed one Derby JDBC tutorial on the internet,
    * AutoLoadJdbcDriver.java
    * Copyright (c) 2007 by Dr. Herong Yang. All rights reserved.
    import java.sql.*;
    import java.util.*;
    public class AutoLoadJdbcDriver {
      public static void main(String [] args) {
        Connection con = null;
        try {
          listDrivers();
    // Find the driver for a given URL
          Driver driverClass = (Driver) DriverManager.getDriver(
            "jdbc:derby://somehost/somedb");
          System.out.println("\nDriver for jdbc:derby://somehost/somedb");
          System.out.println("   "+driverClass.getClass().getName());
          listDrivers();
        } catch (Exception e) {
          System.err.println("Exception: "+e.getMessage());
      private static void listDrivers() {
        Enumeration driverList = DriverManager.getDrivers();
        System.out.println("\nList of drivers:");
        while (driverList.hasMoreElements()) {
          Driver driverClass = (Driver) driverList.nextElement();
          System.out.println("   "+driverClass.getClass().getName());
    The output below confirms that the DriverManager class is able to load any JDBC driver classes as long as their JAR files are included in the classpath.
    C:\>javac AutoLoadJdbcDriver.java
    C:\>java -cp .;\local\javadb\lib\derbyclient.jar AutoLoadJdbcDriver
    List of drivers:
    sun.jdbc.odbc.JdbcOdbcDriver
    org.apache.derby.jdbc.ClientDriver
    Driver for jdbc:derby://somehost/somedb
    org.apache.derby.jdbc.ClientDriver
    List of drivers:
    sun.jdbc.odbc.JdbcOdbcDriver
    org.apache.derby.jdbc.ClientDriver
    but on my machine , it keep telling me the massage
    Exception in thread "main" java.lang.NoClassDefFoundError: SimpleApp
    Exception in thread "main" java.lang.NoClassDefFoundError: test1
    Exception in thread "main" java.lang.NoClassDefFoundError: AutoLoadJdbcDriver
    the ij works well
    and the other java app(without jdbc) works well.
    anybody can help me to solve this problem?
    Edited by: Xiao on Jan 18, 2008 6:19 PM

    but on my machine , it keep telling me the massage
    Exception in thread "main" java.lang.NoClassDefFoundError: SimpleApp
    Exception in thread "main" java.lang.NoClassDefFoundError: test1
    Exception in thread "main" java.lang.NoClassDefFoundError: AutoLoadJdbcDriverI assume you get these messages when you try and run the three programs mentioned (SimpleApp, test1 and AutoLoadJdbcDriver).
    What commands do you use to do this? What does the command line report the CLASSPATH to be (using the echo command)?
    The simplest cause would be that you have the derby jar mentioned as part of CLASSPATH, but not the current directory.

  • URGENT JDBC help needed. Thanks a lot~

    Hi!
    I have 3 java files.
    1st : The INTERFACE which accepts users' input
    2nd : CHECK the input, check c = new check(input);
    3rd : QUERY the Database using the input, query q = new query(q);
    Basically, the INPUT is passed as a parameter from one file to another file.
    My question is, how to pass the query results back to the interface (i.e., the 1st java file)?
    Thanks a lot~

    Could you briefly write the modifications of the 3
    java files needed for me please?
    1st : The INTERFACE which accepts users' inputJust accepts or displays?
    If displays then....
    - Take ArrayList
    - Extract data from ArrayList
    - Put data into gui components.
    2nd : CHECK the input, check c = new check(input);No changes needed.
    3rd : QUERY the Database using the input, query q = new query(q);1. Create ArrayList, call it 'a'
    2. Create ArrayList for each record in ResultSet, call it 'r'
    3. Extract data from ResultSet row, put into 'r'
    4. Put 'r' into 'a'
    5. Loop back to 2 until ResultSet is empty.

  • Regex, jdbc help needed

    I need to write a program that extracts data from a website an inserts it into a oracle database. I use HTML or JTidy to pretty the html code of the site that I am going to extract. After prettying up the code us JTidy, I save file in a tempory directory. I then would like to use regex to find and extract data between two points and multiple lines.
    example:
    <table>
                   <!-- project title -->
                   <tr>
                        <td width="30%" align="right" valign="top">
                             <font size="-1">
                             <b>Project Title:</b>
                             </font>
                        </td>
                   <td width="70%" align="left" valign="top">
                             <font size="-1">
                             A Broad Spectrum Catalytic System for Removal of Toxic Organics from Water By Deep Oxidation
                             </font>
                        </td>
                   </tr>
    first I would like to find the place holder<b>Project Title:</b> then extract the data between
    <font size="-1">
                             A Broad Spectrum Catalytic System for Removal of Toxic Organics from Water By Deep Oxidation
    </font>m and insert it into the oracle db
    How do I do this? Once I am done with the webpage I can delete it from the temp directory. I have code that pretties the html code, and a java app that extracts data between two points. The only problem is that it has to have the same regex input. It will extract the data if the tags are identical like
    <b>data between these tags<b>, works but
    <b>data between these tags </b> does not. I then think I need to write a prepared or just statement to load the data into the db?
    orozcom

    That is not exactly what I need. This is a testing class that I have been playing with.
    import java.util.regex.*;
    public final class SplitTest
    private static String REGEX = "<";
    private static String INPUT = "<p>one two three four</p>five";
    public static void main(String[] argv)
    Pattern p = Pattern.compile(REGEX);
    String[] items = p.split(INPUT);
    System.out.println( "Length of array items: " + items.length);
    System.out.println( "Item 0 of array items: " + items[0]);
    System.out.println( "Item 1 of array items: " + items[1]);
    System.out.println( "Item 2 of array items: " + items[2]);
    System.out.println( "Item 3 of array items: " + items[3]);
    //for(int i=0;i<items.length;i++)
    for(int i=1;i<2;i++)
    System.out.println(items);
    items = null;
    The out put is :
    Length of array items: 3
    Item 0 of array items:
    Item 1 of array items: p>one two three four
    Item 2 of array items: /p>five
    why array item 0 empty? I would like to read between two html tags. I found some examples (sort of ) at http://www.regular-expressions.info/examples.html. It gave me the below information, but I still dont know how to implement.
    <TAG[^>]*>(.*?)</TAG> matches the opening and closing pair of a specific HTML tag. Anything between the tags is captured into the first backreference. The question mark in the regex makes the star lazy, to make sure it stops before the first closing tag rather than before the last, like a greedy star would do. This regex will not properly match tags nested inside themselves, like in <TAG>one<TAG>two</TAG>one</TAG>.
    any Ideas?

  • Help needed in HTTP to JDBC synchronous

    Hi,
    I am doing a interface which involves the HTTP and Database (JDBC), i need to send some two fields as request and based on the certain condition of these two fields i need to get some 4 fields as response.
    Can any one please help me out in this regard so that i can atleast frame an idea and start doing the interface?
    Thanks,
    PSV.

    Hi PSV,
    BPM Not Required.., just go through the blog and see how you can use JDBC Receiver adapter for Synchronous select...
    Information provided in the blog is sufficient to solve your problem.
    Regards,

  • Help needed for using BASIC authentication through JDBCRealm

    Help needed.
    Hello,
    I am doing a degree project, so far it works fine in my local machine, I need to try it on my virtual hosting (as it is a live server).
    My project requires JDBCRealm, that is BASIC authentication loading access data from mysql database. Normally this setup can be done in Server.xml file, because my Tomcat hosting is a virtual one, I only have permission to access the web.xml file.
    My question is: is it possible to get it done in an alternative way? In web.xml? Some properties file maybe?
    Thank you very much.

    You can set this up for your context using META-INF/context.xml instead of working with server.xml.
    Make a directory called META-INF under your webapp ( it'll be at the same level as WEB-INF ). Under this, add a context.xml with all your context specific configuration including the realm. A sample is below
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/myApp" reloadable="true">
        <Realm
            className="org.apache.catalina.realm.JDBCRealm"            
            driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"         
            connectionURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=myDB;SelectMethod=Cursor;"
            connectionName="username" connectionPassword="password"
            digest="MD5" userTable="users" userNameCol="userid" userCredCol="userpassword"
            userRoleTable="user_roles" roleNameCol="rolename"
        />
    </Context>Hope this helps.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • Help needed to run JSTL 1.1 in Tomcat 6.0.16

    Hi All,Help needed to run JSTL 1.1 in Tomcat 6.0.16. I am trying to run the example given in http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html The example tries to connect to MySQL database from JSP using JSTL and JNDI Datasource.I am running the example using Eclipse 3.4.2 using Sysdeo plugin to start and stop Tomcat server from Eclipse IDE.
    My web.xml file has <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    </web-app>
    and test.jsp has proper taglib directives
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    I have placed the jstl.jar and standard.jarof the jakarta-taglibs-standard-1.1.2.zip under E:\Deepa\workspace\DBTest\WebContent\WEB-INF\lib directory also placedcontext.xml file under E:\Deepa\workspace\DBTest\WebContent\META-INF and the content of context.xml is as below
    <Context path="/DBTest" docBase="DBTest"
    debug="5" reloadable="true" crossContext="true">
    <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="deepa" password="mysql" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>
    </Context>
    Now while running the example, Eclipse creates one DBTest.xml file under C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost
    which has the following line:
    <Context path="/DBTest" reloadable="true" docBase="E:\Deepa\workspace\DBTest" workDir="E:\Deepa\workspace\DBTest\work" />
    I am getting the following error when running http://localhost/DBTest/WebContent/test.jsp
    in Browser:
    <HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the jar files deployed with this application
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
    org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)
    org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:494)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
    org.apache.jasper.compiler.Parser.parse(Parser.java:138)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    In the Tomcat Server console, I am getting the following error:
    INFO: Server startup in 7295 ms
    May 20, 2009 6:36:48 AM org.apache.jasper.compiler.TldLocationsCache processWebDotXml
    WARNING: Internal Error: File /WEB-INF/web.xml not found
    May 20, 2009 6:36:48 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the jar files deployed with this application
    what is the problem with my code?
    When running the same example, by creating a local server in Eclipse(creating new Server connection pointing to same Tomcat 6.0 installation) it runs fine without any error.

    Hi evnafets,
    Wow, very helpful information, great insight into working of Eclipse. Thanks a lot.
    I have one more question. I have a context.xml file under {color:#0000ff}E:\Deepa\workspace\DBTest\WebContent\META-INF{color} folder and that has the Resource element to connect to MySQL database:
    {code{color:#000000}}{color}<Context path="/DBTest" docBase="DBTest" debug="5" reloadable="true" crossContext="true">
    <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="deepa" password="mysql" driverClassName="com.mysql.jdbc.Driver"
    {color:#0000ff}url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>{color}
    {color:#0000ff}</Context>{color}As usual when running application in local Tomcat server of Eclipse, this data source works fine. But when I run the application on Tomcat, by starting Sysdeo plugin from Eclipse, the DBTest.xml file created in C:\Tomcat 6.0\conf\Catalina\localhost has the context entry as<Context path="/DBTest" reloadable="true" docBase="E:\Deepa\workspace\DBTest\WebContent" workDir="E:\Deepa\workspace\DBTest\work">
    </Context>The<Resource> element I have specified in the context.xml of \WebContent\META-INF folder is not taken into account by Tomcat and it gives the following error:May 21, 2009 5:20:04 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException_: Cannot create JDBC driver of class '' for connect URL 'null'"
    _at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(_QueryTagSupport.java:276_)
    at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(_QueryTagSupport.java:159_)
    at org.apache.jsp.test_jsp._jspx_meth_sql_005fquery_005f0(_test_jsp.java:113_)
    at org.apache.jsp.test_jsp._jspService(_test_jsp.java:66_)
    at org.apache.jasper.runtime.HttpJspBase.service(_HttpJspBase.java:70_)
    at javax.servlet.http.HttpServlet.service(_HttpServlet.java:717_)
    at org.apache.jasper.servlet.JspServletWrapper.service(_JspServletWrapper.java:374_)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(_JspServlet.java:342_)
    at org.apache.jasper.servlet.JspServlet.service(_JspServlet.java:267_)
    at javax.servlet.http.HttpServlet.service(_HttpServlet.java:717_)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(_ApplicationFilterChain.java:290_)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(_ApplicationFilterChain.java:206_)
    at org.apache.catalina.core.StandardWrapperValve.invoke(_StandardWrapperValve.java:233_)
    at org.apache.catalina.core.StandardContextValve.invoke(_StandardContextValve.java:191_)
    at org.apache.catalina.core.StandardHostValve.invoke(_StandardHostValve.java:128_)
    at org.apache.catalina.valves.ErrorReportValve.invoke(_ErrorReportValve.java:102_)
    at org.apache.catalina.core.StandardEngineValve.invoke(_StandardEngineValve.java:109_)
    at org.apache.catalina.connector.CoyoteAdapter.service(_CoyoteAdapter.java:286_)
    at org.apache.coyote.http11.Http11Processor.process(_Http11Processor.java:845_)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(_Http11Protocol.java:583_)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(_JIoEndpoint.java:447_)
    at java.lang.Thread.run(_Thread.java:619_)
    {code}
    So to overcome this error I had to place the <Resource> element in DBTest.xml under C:\Tomcat 6.0\conf\Catalina\localhost {color:#000000}and then it works fine. {color}{color:#ff0000}*Why is the context.xml file in META-INF not considered by Tomcat server using Sysdeo Plugin?*
    *Thanks,*
    *Deepa*{color}
    {color}
    Edited by: Deepa76 on May 26, 2009 9:32 PM

  • JDBC Scenario need inputs

    hello friends,
    I have scenario, Proxy - XI - JDBC.
    i need to make a scheduled insert to the database. But i can make the insert only if the the status is yes in another table.
    briefly,
    table - status table -> contains status whether i can insert or not
    table - contact table -> need to insert data only if yes in the status table.
    can we achieve this without BPM. Can we use JDBC lookup to solve this. We are using PI 7.
    Please provide valuable inputs.
    Thanks,
    Raj

    Hello,
    can we achieve this without BPM. Can we use JDBC lookup to solve this. We are using PI 7.
    The answer to both questions is yes. Probably you might be using the lookup api for your requirement. See blog below:
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    It would also help if your scenario is synchronous (since you are doing inserts) and this would eliminate the retry mechanism in async messages.
    Hope this helps,
    Mark

  • JDBC Helper Service

    Hello,
    The SQL Server DB Configuration in WLP Deployment Guide says JDBC Helper
    Service needs to be configured for each application deployed. Do I need to
    do this for other applications that has been installed and deployed
    out-of-box (p13nApp, p13nConsoleApp, paymentWSApp, taxWSApp, wlcsApp,
    wlpDocsApp)? I only did it for portal app so far and just got me wondered...
    Thank you,
    Makoto

    Makoto Suzuki wrote:
    Hi,
    So am I correct in thinking that the other apps are still using cloudscape
    database, although the connection pools and data sources now point to SQL
    Server after configuration is changed?I don't mean that. Those apps won't work. So, if you plan to use all the
    apps, make this change in all the apps.
    Subbu
    >
    Thank you,
    Makoto
    "Subbu Allamaraju" <subbuATBeaDOTCom> wrote in message
    news:3d08a832$[email protected]..
    Makoto,
    You need not, if you're not using those apps.
    Subbu
    Makoto Suzuki wrote:
    Hello,
    The SQL Server DB Configuration in WLP Deployment Guide says JDBC Helper
    Service needs to be configured for each application deployed. Do I need
    to
    do this for other applications that has been installed and deployed
    out-of-box (p13nApp, p13nConsoleApp, paymentWSApp, taxWSApp, wlcsApp,
    wlpDocsApp)? I only did it for portal app so far and just got mewondered...
    Thank you,
    Makoto

  • Troubleshoting help needed:  My iMac keeps crashing and restarting with a report detail: "spinlock application timed out"  What can I do to fix this?timed out"

    Troubleshooting help needed:  My iMac keeps crashing and restarting with a notice: "Spinlock application timed out"  What can I do?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the page that opens.
    Select the most recent panic log under System Diagnostic Reports. Post the contents — the text, please, not a screenshot. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header and body of the report, if it’s present (it may not be.) Please don't post shutdownStall, spin, or hang reports.

  • Help needed for writing query

    help needed for writing query
    i have the following tables(with data) as mentioned below
    FK*-foregin key (SUBJECTS)
    FK**-foregin key (COMBINATION)
    1)SUBJECTS(table name)     
    SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
    2           02           Computer Science
    3           03           Physics
    4           04           Chemistry
    5           05           Mathematics
    7           07           Commerce
    8           08           Computer Applications
    9           09           Biology
    2)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
    383           S1      9           4           2           3
    384           S2      4           2           5           3
    ---------I actually designed the ABOVE table also like this
    3) a)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
    383           S1
    384           S2
    b)COMBINATION_DET
    COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
    1               383          9
    2               383          4
    3               383          2
    4               383          3
    5               384          4
    6               384          2          
    7               384          5
    8               384          3
    Business rule: a combination consists of a maximum of 4 subjects (must contain)
    and the user is less relevant to a COMB_NAME(name of combinations) but user need
    the subjects contained in combinations
    i need the following output
    COMB_ID COMB_NAME SUBJECT1 SUBJECT2      SUBJECT3      SUBJECT4
    383     S1     Biology Chemistry      Computer Science Physics
    384     S2     Chemistry Computer Science Mathematics Physics
    or even this is enough(what i actually needed)
    COMB_ID     subjects
    383           Biology,Chemistry,Computer Science,Physics
    384           Chemistry,Computer Science,Mathematics,Physics
    you can use any of the COMBINATION table(either (2) or (3))
    and i want to know
    1)which design is good in this case
    (i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
    good method to link with same table but if 4 subjects only(and must) comes
    detail table is not neccessary )
    now i am achieving the result by program-coding in C# after getting the rows from oracle
    i am using oracle 9i (also ODP.NET)
    i want to know how can i get the result in the stored procedure itsef.
    2)how it could be designed in any other way.
    any help/suggestion is welcome
    thanks for your time --Pradeesh

    Well I forgot the table-alias, here now with:
    SELECT C.COMB_ID
    , C.COMB_NAME
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
    FROM COMBINATION C;
    As you need exactly 4 subjects, the columns-solution is just fine I would say.

  • Help needed I have a canon 40D. I am thinking of buying a canon 6D.But not sure that my len

    Hi all help needed I have a canon 40D. I am thinking of buying a canon 6D.
    But not sure that my lenses will work.
    I have a 170mm/ 500mm APO Sigma.
    A 10/20 ex  Sigma   HSM  IF.
    And a 180 APO Sigma Macro or do I have to scrap them and buy others.
    ALL Help will be greatly received. Yours  BRODIE

    In short, I love it. I was going to buy the 5DMark III. After playing with it for a while at my local Fry's store where they put 5DMII, 5DMIII and 6D next to each other, using the same 24-105L lens, I decided to get the 6D and pocket the different for lens later.
    I'm upgrading from the 30D. So I think you'll love it. It's a great camera. I have used 5DMII extensively before (borrowing from a close friend).
    Funny thing is at first I don't really care about the GPS and Wifi much. I thought they're just marketing-gimmick. But once you have it, it is actually really fun and helpful. For example, I can place the 6D on a long "monopod", then use the app on the phone to control the camera to get some unique perspective on some scenes. It's fun and great. GPS is also nice for travel guy like me.
    Weekend Travelers Blog | Eastern Sierra Fall Color Guide

  • Help needed! Raid degraded again!

    Hi!
    Help needed! I hava made bootable RAID with two S-ATAII 250Gb HDD and its not working! Every now and then at bootup I get a message RAID -> DEGRADED... Must be seventh time! Rebuild takes its own time!
    What am I doing wrong!
    T: Ekku
    K8N Neo4 Ultra
    AMD 64 4200+
    2 Gb RAM
    2 x 250 Gb HDD (Maxtor)
    nVidia RAID (in mb)
    P.S. I wery SORRY with my poor language!

    I'm going to blame the nVRAID because I've seen issues with it in the past. If your motherboard has another non-nVidia RAID solution, use that instead. Using the nVidia SATA ports as BASE or JBOD is fine and dandy but RAIDing always had issues. It's not even a driver issue I think it's just instability. Latest drivers and even boxed drivers never helped. Granted, some will report success with their rig. But on a professional level I've seen nForce issues on different motherboards and different hard drives that had RAID disaster stories.
    Good luck and if you don't have another RAID solution, my suggestion would be to buy a dedicated RAID controller card.
    LPB

  • HELP NEEDED WITH ADDAPTER-DVI TO VGA.

    PLEASE ...HELP NEEDED WITH WIRING CROSS OVER....CAN YOU HELP WITH BACK OF PLUG CONNECTIONS...I SORTA UNDERSTAND THE PINOUTS BUT CANT MAKE AN EXACT MACH...WOULD LIKE TO BE 100% SURE...
    ......THIS ENSURES NO SMOKE!!!                                                                                           
    THE CARD IS AN ATI RADEON RX9250-DUAL HEAD-.........ADDAPTER IS DVI(ANALOG)MALE TO VGA(ANALOG)FEMALE.
    ANY HELP VERY MUCH APPRECIATED........ SEEMS YOU NEED TO BE ROCKET SCI TO ATTACH A BLOODY PICTURE...SO THIS HAS BEEN BIG WASTE OF FING TIME!

    Quote from: BOBHIGH on 17-December-05, 09:21:31
    Get over it mate !
    I find it easy t read CAPS...and if you dont like it ...DONT READ IT!
    And why bother to reply...some people have nothing better to do.
    Yes there chep and easy to come by...Ive already got a new one.
    All I wanted was to make a diagram of whats inside the bloody thing...it was a simple question and required a simple answer.
    NO NEED TO A WANKA !!
    I feel a bann comming up.
    Have you tryed Google ? really.. your question is inrelevant. No need to reply indeed.
    Why do you come here asking this question anyway ? is it becouse you have a MSI gfx card ? and the adapter has nothing to do with this ?
    You think you can come in here yelling.. thinking we have to put up with it and accept your style of posting. This is not a MSI tech center.. it's a user to user center.. Your question has nothing to do with MSI relavant things anyway's.
    Google = your friend.
    Quote from: BOBHIGH on 17-December-05, 09:21:31
    it was a simple question and required a simple answer
    Simple for who ? you (buying a new one) ? me ? we ?   .really...........
    Quote from: Dynamike on 16-December-05, 04:11:48
    1: There are allot of diffrent types of those adapters.
    If any of the mods have a problem about my reply.. please pm me.

Maybe you are looking for