Help getting data from a DataTable

Hi:
How can I get the information of a DataTable that I Get from
a WebService?
The response from the WebService is:
<OBTENERUSUARIOResponse xmlns="
http://(IP)/(WebService)/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/">
<OBTENERUSUARIOResult>
<xsd:schema id="NewDataSet"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:xs="
http://www.w3.org/2001/XMLSchema">
<xsd:element name="NewDataSet"
msdata:MainDataTable="tblTemporal"
msdata:UseCurrentLocale="true"
msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded"
minOccurs="0">
<xsd:element
name="tblTemporal">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CodigoUsuario"
minOccurs="0"
type="xs:long"/>
<xsd:element name="Condicion"
minOccurs="0"
type="xs:string"/>
<xsd:element name="Nivel"
minOccurs="0"
type="xs:unsignedByte"/>
<xsd:element name="Nombre"
minOccurs="0"
type="xs:string"/>
<xsd:element name="Usuario"
minOccurs="0"
type="xs:string"/>
<xsd:element name="Clave"
minOccurs="0"
type="xs:string"/>
<xsd:element name="CodigoServicio"
minOccurs="0"
type="xs:long"/>
<xsd:element name="NroDocumento"
minOccurs="0"
type="xs:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<diffgr:diffgram
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet>
<tblTemporal
diffgr:id="tblTemporal1"
msdata:rowOrder="0">
<CodigoUsuario>1</CodigoUsuario>
<Condicion>Sr.</Condicion>
<Nivel>1</Nivel>
<Nombre>NN001</Nombre>
<Usuario>***</Usuario>
<Clave>***</Clave>
<CodigoServicio>1</CodigoServicio>
<NroDocumento>***</NroDocumento>
</tblTemporal>
<tblTemporal
diffgr:id="tblTemporal2"
msdata:rowOrder="1">
<CodigoUsuario>2</CodigoUsuario>
<Condicion>Dr.</Condicion>
<Nivel>1</Nivel>
<Nombre>NN002</Nombre>
<Usuario>***</Usuario>
<Clave>****</Clave>
<CodigoServicio>1</CodigoServicio>
<NroDocumento>***</NroDocumento>
</tblTemporal>
<tblTemporal
diffgr:id="tblTemporal3"
msdata:rowOrder="2">
<CodigoUsuario>3</CodigoUsuario>
<Condicion>Pac.</Condicion>
<Nivel>3</Nivel>
<Nombre>NN003</Nombre>
<Usuario>***</Usuario>
<Clave>***</Clave>
<CodigoServicio>1</CodigoServicio>
<NroDocumento>***</NroDocumento>
</tblTemporal>
<tblTemporal
diffgr:id="tblTemporal4"
msdata:rowOrder="3">
<CodigoUsuario>4</CodigoUsuario>
<Condicion>Pac.</Condicion>
<Nivel>3</Nivel>
<Nombre>NN004</Nombre>
<Usuario>***</Usuario>
<Clave>***</Clave>
<CodigoServicio>1</CodigoServicio>
<NroDocumento>***</NroDocumento>
</tblTemporal>
<tblTemporal
diffgr:id="tblTemporal5"
msdata:rowOrder="4">
<CodigoUsuario>8</CodigoUsuario>
<Condicion>Pac.</Condicion>
<Nivel>3</Nivel>
<Nombre>NN005</Nombre>
<Usuario>***</Usuario>
<Clave>***</Clave>
<CodigoServicio>1</CodigoServicio>
<NroDocumento>***</NroDocumento>
</tblTemporal>
</NewDataSet>
</diffgr:diffgram>
</OBTENERUSUARIOResult>
</OBTENERUSUARIOResponse>
FLEX 2 Code:
public function resultHandler(event:ResultEvent):void {
if (event.result.diffgram == "")
////nothing
else
lblNombre.text =
event.result.diffgram.NewDataset.tblTemporal[1].Nombre;
If I use lblNombre.text =
event.result.diffgram.NewDataset.tblTemporal.Nombre; returns an
empty string and if I use lblNombre.text =
event.result.diffgram.NewDataset.tblTemporal[1].Nombre; the code
stops there and nothing happens.
Can you tell me if this code is correct?
I made the WebService with Visual Basic 2005 and returns a
DataTable Variable not a DataSet.

hi,
sorry for a poorly framed question.
this is what i m trying to do.
i call google with a header generated.
now i want to read back the content in the google search result page onto my jsp page.
possible?
first.jsp calls google. i m using redirect (url)
the url is modified based on user input
now i want the links in the google page to be put up in my page itself. so i want to read the links there...
Message was edited by:
on_track

Similar Messages

  • Help: getting data from a web page

    i have a jsp page which generates some strings. i pass these strings in to a login page on some server. the web page displays my login status. is it possible to read or get data from the web page?
    i have captured the header of a web page and modifying the header based on my generated strings.
    or jus say is it possible to read whats in a web page into a jsp page?
    thanks in advance for any help , assistance or redirection to a source where i can find help.

    hi,
    sorry for a poorly framed question.
    this is what i m trying to do.
    i call google with a header generated.
    now i want to read back the content in the google search result page onto my jsp page.
    possible?
    first.jsp calls google. i m using redirect (url)
    the url is modified based on user input
    now i want the links in the google page to be put up in my page itself. so i want to read the links there...
    Message was edited by:
    on_track

  • Help get data from socket

    hi all
    i am trying to get data from socket www.yahoo.com site and try to write in file with following code
    NOTE:here netClient is the soccket object accepted by server
    File f=new File(finalpath);
    BufferedReader fromClient = new BufferedReader(new InputStreamReader(netClient.getInputStream()));
    OutputStream fo=new FileOutputStream(f);
    String str;
    try{
    while((str=fromClient.readLine())!=null){
    byte buf[]=str.getBytes();
    fo.write(buf);
    }catch(Exception e){}
    finally{fo.close();}
    But i am not getiing data from socket
    please help
    regards krunal

    GeneralYerevan is absolutely right. Use URLConnection and you will get what you want. It seems to me that you do not know deeply how http works. The fact that you opened a connection to www.google.com doesn't mean that you will get data. The web server, after it accepts the socket object, waits for your request. In you case it is something like "GET / HTTP1.1", which you have to write to the stream. URLConnection does all this for you and all you have is to read the InputStream.

  • Help getting data from iTunes onto my New iPad from iPhone backup

    Hi for 2 days now I have been trying to sync my New iPad2 with my iPhone 3GS, I have followed lots of threads & advice which has been helpful but its not quite happening for me!
    I set up iCloud and iTunes as advised, my iPhone & iPad share the same Apple ID. I backed up my iPhone to iTunes successfully, and restored the iPad via iTunes using the iPhone backup, it went thru the motions OK so I assume completed but I can't see any change.
    Under "Purchases" in my iTunes account it has two tabs one for the iPhone and the other iPad listing all my Apps so clearly it recognises my Apps but the Apps only feature on my iPhone I can't get them onto my iPad. I even deleted some apps and reloaded them since the sync & backups but it still doesn't work. Strangely under my "Account" in iTunes it says only 1 Device is recognosed by iTunes and thats my New iPad, yet it still shows a Tab under Purchases for my iPhone so I don't understand why this is not listed as a recognised Device under the Accounts tab.
    My contacts, calendars etc are in sync between the two devices wihtout any trouble at all.
    I did think it was because some of the apps were downloaded before the sync / backup but some threads lead me to beleive you can sync the content no matter when it was purchased. Under the "Purchases" tab for my iPad I can view my "Apps" which has a "Download all" option so Ibeing at a loss what to do next I proceeded to Download All and it was clearly doing this for some time but still nothing on my iPad.
    I was advised to turn iCloud off whilst I do the backup and restore on iTunes, and then turn it back on after. I have turned my iPad off/on after these updates but still the apps do not transfer across.
    I feel like I am so close now but for some reason something is still not working! Please Help - thankyou.
    (Just to add both devices are using the latest software update & iTunes working with Vista Windows on PC.)

    Connect and select iPhone in computer iTunes sidebar, in Music tab,
    select
         Sync Music,
         Selected Playlists, artists, albums....
         Select the music you want on iPhone.
         Click Sync button (bottom right)
    Here's the iPhone user manual
    iPhone User Guide (For iOS 6.1 Software)
    Message was edited by: ckuan

  • Need to Get Data From Siebel On Demand ( I am new to Siebel Please Help)

    Hi All,
    I have a project in which i need to get data from Siebel On Demand and Automate this process.
    I have downloaded the Custom WSDL file and the Schema file from Oracle Siebel On Demand. I am using IDE WSAD and when i import these files into WSAD i am getting an error stating the schema definitions are wrong. Can anyone help me.....
    I need to complete it asap....
    Edited by: user491578 on Nov 11, 2008 6:50 PM

    You should probably ask Advantech. This question really has nothing to do with LabVIEW SE or NI-ELVIS. You could try posting to the LabVIEW board but there have only ever been two posts regarding 'advantech 4716'.

  • Need help about RRD4J, get data from rrdb

    i need more help about roundrobin database, especially using RRD4J library.
    i want to know, if i have one file database data1.rrd and i specific want to get data from startTime to endTime.
    how i can get that data from that database, and move them to another database file data2.rrd.
    can i do this?

    thx jschell
    javadoc from rrd4j not clearly enough for me to understanding about prosesing add, update and get data in there, so i ask in this forum may be anyone can give me solution.
    i think it's simple problem but i don't know how to implement with this API.
    with rrd4j we can create roundrobin database (rrd), the output in example: data1.rrd
    i just want to get data that i had put in data1.rrd to move them to another rrd, example: data2.rrd.
    data1.rrd and data2.rrd, they have same lastupdate time.

  • Help needed with variable - trying to get data from Oracle using linked svr

    Sorry if I posted this in the wrong forum - I just didn't know where to post it.
    I'm trying to write a simple stored procedure to get data from an oracle database via a linked server in SQL Enterprise manager. I have no idea how to pass a variable to oracle.
    Here's how I would get the variable in SQL:
    declare @maxkey INTEGER
    select @maxkey= MAX(keyfield) from [server].Data_Warehouse.dbo.mytable
    select * from [server].Data_Warehouse.dbo.mydetailtable where keyfield=@maxkey
    the select statement I need to do in oracle would use that variable like this:
    select * from OPENQUERY(OracleLinkedServer,'select
    * from ORACLEDB.TABLE where keyfield > @maxkey')
    and I get this message: OLE DB provider "OraOLEDB.Oracle" for linked server "OracleLinkedServer" returned message "ORA-00936: missing expression".
    I realize that I can't pass the @maxkey variable to oracle - so how do I accomplish this?

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • Any helpful materials or sample on how to get data from lotus in SAP?

    I have some experience on get data from Biztalk (Microsoft Middleware). In that case, i could using "call FMxxxx DESTINATION rfc". the destination with type TCP/IP is created via SM59.
          and how about lotus ?
       ths

    I have some experience on get data from Biztalk (Microsoft Middleware). In that case, i could using "call FMxxxx DESTINATION rfc". the destination with type TCP/IP is created via SM59.
          and how about lotus ?
       ths

  • Getting data from mysql!!  please could someone help me?

    Hello people!!
    I can't get data from a Mysql database through a jsp page, there's a error message of conversion,
    here's my classes:
    package teste;
    public class GetDB {
        String str;
        Connection con;
        ObjectPage ob;
        public GetDB()throws Exception {       
            try {
                Class.forName("org.gjt.mm.mysql.Driver");
                con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/Loja?user=root&password=131283");            
            } catch (Exception ex) {
                throw new Exception("Banco de dados n�o encontrado" +
                    ex.getMessage());
        public ObjectPage getOb(){
            try {
                String selectStatement = "select * from teste";
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                ResultSet rs = prepStmt.executeQuery();
                while (rs.next()) {
                   str = rs.getString(1)+" "+rs.getInt(2);
                prepStmt.close();
                ob = new ObjectPage(str);
            }catch (SQLException ex) {           
            return ob;
        public void setOb(ObjectPage ob){
            this.ob = ob;
    }    and this:
    package teste;
    public class ObjectPage {
       String name;
       public ObjectPage(String nome) {
           name = nome;
       public String getName(){
           return name;
    }and this is myjsp page:
    <jsp:useBean id="dado" class="teste.GetDB" scope="page" >
      <jsp:setProperty name="dado" property="ob" value="{$name}"/>
    </jsp:useBean>
    <%--<jsp:getProperty name="dado" property="propName"/> --%>
    <p><b><h1><font color="orange">${dado.ob.name}</font></h1></b></p>so what's wrong? could you give me some tips? what should i do ?
    Thanks a lot!!!

    If there's an error message of conversion, are you sure that the 1st and 2nd columns returned in the result set are of type string & integer respectively (try getObject, then see what it's an instanceof)? Just guessing, maybe the actual database fields don't match the types you're expecting.
    And why don't you try ex.printStackTrace() to see what the actual error is in the getOb method?

  • How to get data from hard drive in dead iMac?

    I have an old slot-loading iMac (350Mhz G3 blueberry) that just died, probably a dead power supply or something. Won't turn on at all. I don't care about restoring it, I just want to take the hard drive out and grab data from it. I've found instructions for removing the HD ... but any tips on the best/cheapest way to hook it up to get data from it? It's EIDE I believe from what I've read so far. Thanks for any help.

    Hey Richard.....Thanks for the reply to my question about my wife's dead iMac.....
    Her iMac had been acting up lately, mostly to do with her Outlook Express freezing up in OS9. I dunno if OS9 was freezing or if the application was failing. Regardless, I would have to quit OS9, restart Outlook which at the same time restarted OS9. All would be fine for a while, a day or two and then the scene would repeat itself. But I think that issue is separate from the iMac being "dead". Often we have power outages in the area, more than we should. I had the iMac plugged into a battery backup, some APS product I think it is. I believe it is only good for less than an hour as we have other devices drawing on it too. Most of our power outages are of short duration, just enough to be aggravating, sometimes having to reset clocks, etc...And a couple times, I would have to reset the time and date on the iMac so this told me that the PRAM battery was below minimum voltage. But the iMac would ALWAYS restart, even with the low battery. But the most recent outage, about one hour duration, did in the iMac, somehow or other. I do believe the battery backup basically fully discharged. So I removed the battery, could not find a new battery locally so I drove to the big city and paid the local Apple service dealer a visit. I got ripped big time price wise, embarrassed to say. So I get home, put the battery in the holder, depressed the CMU reset, the powerbutton illuminated as did a green LED by the memory modules for less than three seconds and then quit. I also heard the HD trying to spin up and a high voltage THUMP which I assume is the CRT trying to ignite. If I unplugged the iMac, removed the battery, plug in the power again and hit the power button, the iMac would repeat the same short on period and then quit. So it did not seem to make any difference if there was a battery in place. I read somewhere to pull the battery, pull the AC cord, hold down the power button to dump any current (?) and let the unit sit for 24hrs. After that length of time, I was supposed to replace the battery, depress the CMU reset, wait ten seconds and then feed it AC. Well, when I pressed the power button, I heard life for maybe five seconds, maybe a second longer, then a beep and then it shut down. I pulled the AC cord, pulled the battery, re-inserted the battery, depressed the CMU reset, waited a few seconds, plugged in the AC cord, depressed the power button and I am back at the under three seconds of "power-up" and then nothing, dead, no beep, nothing. I think maybe it is a waste of time trying to mess with this unit, looking for a newer iMac on eBay, the snowball series with the 17" LCD, might be time better spent. Hate throwing stuff away, that's why I am up to my ears in junk, maybe u know that scenario. The wife likes my 19" ACER LCD screen, hooked up to this old dual 800mhz, though she dislikes the noise and the tower. But we both agree the large LCD screen is much easier on our aging eyes than the old iMac CRT. Anyway, I appreciate your help, always GREAT to correspond with an Apple fan.....John Bauer

  • Powerpivot Error on Refresh -- "We couldn't get data from the data model..."

    I'm using Excel 2013 and Windows 8.1.  I have a spreadsheet I've been using for over a year, and I've just started getting this error message when I try to refresh the data.
    "We couldn't get data from the Data Model.  Here's the error message we got:
    The 'attributeRelationship' with 'AttributeID' - 'PuttDistCat9' doesn't exist in the collection"
    Any idea how I can fix this problem?  I haven't changed anything related to that particular attribute.  All the data is contained in separate sheets in the workbook, so there are no external sources of data.
    Thanks.
    Jean

    Thanks for all the suggestions.
    I found a slightly older version of the spreadsheet that still refreshes properly, so I don't think I have any issues with the version of Excel or Power Query.  (I've had this same error before, and I believe I applied the hotfix at that time.)
    I think this problem started after I updated a number of the date filters in the pivot tables.  I haven't made any changes to the data model, and the only updates I've made were to add data (which I do all the time), and to change the date filters on
    the pivot tables.
    As suggested, I added a new pivot table querying one table (the table with the attribute that shows up in the error message), and it worked fine.  I can also refresh this pivot table.
    Then I tried adding a pivot table which went against several tables in the data model (including the table in question).  The pivot table seemed to return that data properly.  However, when I tried to refresh it, I got the same error message ("we
    couldn't get data from the data model..."). 
    Dany also suggested running the queries one at a time to see which one is in error.  Without checking all the pivot tables, it appears that any which use the table "HolePlayedStrokes" generate the error (this is the table with the attribute
    mentioned in the error message).  Pivot Tables without that particular table seem to refresh OK.  Unfortunately, that is the main table in my data model, so most of the pivot tables use it.
    Any other suggestions?  I'd be happy to send a copy of the spreadsheet.
    Thanks for all the help.
    Jean

  • How to get data from subsites list of SharePoint 2010 in ssrs

    Hi,
    Can someone help me on this issue.
    I want to create a report using ssrs, I have some of the data in SQL and some of the data in sharepoint list.
    First I need to go to SQL and get the data from the table which contains URL for the subsite in sharepoint.
    after that I need to go to all the subsites and go to perticulat list in the subsites and get data from that list.
    for example, their is a top level site "abc"
    it contains sub site "123", "456","567", etc.. All this sub sites contain a list by name "Sample List", Now I need to go to that sub site list(Sample List) and get list-item column say "created By" which
    is created on particular date. 
    in my report, I need to print the sub site "url/Title" which comes from SQL database and list-item column  "Created By" of that sub site list "Sample List".
    I tried using subreport inside a report by using "Microsoft SharePoint List" as a datasource, but when it comes to real time we don't know how many subsites will be created, so we can't create a datasource for each subsite site.
    I guess we need to be using XML as a datasource, but how can we go to particular subsite in query while using XML, since all subsites have list with the same name ?
    I appreciate your help.
    Thank you,
    Kishore 

    Hi Kishore,
    SQL Server Reporting Services(SSRS) supports expression-based connection strings. This will help us to achieve the goal you mentioned in this case:
    Create a new report
    Create a Data Source in the report with the connection string like this:
    http://server/_vti_bin/lists.asmx (We use static connection string instead of expression-based connection string now, as it is not supported to get fields based on expression-based connection string in design time. We will change it to be expression-based
    connection string later)
    Create the data set(as you have done using XML query language). Please use list name instead of GUID in the listName parameter.
    Design the report(e.g. Add controls to the report)
    Now, let's change the connection string to be expression-based. First, please add a parameter to the report, move this parameter to top. This parameter is used to store the sub site name.
    Open the Data Source editor, set the connection string to be: ="http://server/" & Parameters!parameterCreatedInStep5.value & "_vti_bin/lists.asmx"
    In the main report, pass the sub site name to the report we created above via the parameter created in step5
    That is all.
    Anyway, this is actually a SQL Server Reporting Service(SSRS) question. You can get better support on this question from:
    http://social.technet.microsoft.com/Forums/en/sqlreportingservices/threads
    For more information about Expression-Based connection string, please see:
    http://msdn.microsoft.com/en-us/library/ms156450.aspx#Expressions
    If there is anything unclear, please feel free to ask.
    Thanks,
    Jinchun Chen
    Jin Chen - MSFT

  • Cant get data from text file to print into Jtable

    Instead of doing JDBC i am using text file as database. I cant get data from text file to print into JTable when i click find button. Goal is to find a record and print that record only, but for now i am trying to print all the records. Once i get that i will change my code to search desired record and print it. when i click the find button nothing happens. Can you please take a look at my code, dbTest() method. thanks.
    void dbTest() {
    DataInputStream dis = null;
    String dbRecord = null;
    String hold;
    try {
    File f = new File("customer.txt");
    FileInputStream fis = new FileInputStream(f);
    BufferedInputStream bis = new BufferedInputStream(fis);
    dis = new DataInputStream(bis);
    Vector dataVector = new Vector();
    Vector headVector = new Vector(2);
    Vector row = new Vector();
    // read the record of the text database
    while ( (dbRecord = dis.readLine()) != null) {
    StringTokenizer st = new StringTokenizer(dbRecord, ",");
    while (st.hasMoreTokens()) {
    row.addElement(st.nextToken());
    System.out.println("Inside nested loop: " + row);
    System.out.println("inside loop: " + row);
    dataVector.addElement(row);
    System.out.println("outside loop: " + row);
    headVector.addElement("Title");
    headVector.addElement("Type");
    dataTable = new JTable(dataVector, headVector);
    dataTableScrollPane.setViewportView(dataTable);
    } catch (IOException e) {
    // catch io errors from FileInputStream or readLine()
    System.out.println("Uh oh, got an IOException error!" + e.getMessage());
    } finally {
    // if the file opened okay, make sure we close it
    if (dis != null) {
    try {
    dis.close();
    } catch (IOException ioe) {
    } // end if
    } // end finally
    } // end dbTest

    Here's a thread that loads a text file into a JTable:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=315172
    And my reply in this thread shows how you can use a text file as a simple database:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=342380

  • How to get data from Oracle using Native SQL in SAP.. Problem with date

    Hi Masters.
    I'm trying to get data from an Oracle DB. I was able to connect to Oracle using tcode DBCO. The connetion works fine
    I wrote this code and it works fine without the statement of where date > '01-09-2010'
    But i need that statement on the select. I read a lot about this issue, but no answer.
    My code is (this code is in SAP ECC 6.0)
    DATA: BEGIN OF datos OCCURS 0,
          id_numeric(10),
          component_name(40),
          comuna(10),
          record_id(10),
          status,
          sampled_date(10),
          END OF datos.
    DATA: c TYPE cursor.
    EXEC SQL.
      connect to 'LIM' as 'MYDB'
    ENDEXEC.
    EXEC SQL.
      SET CONNECTION 'MYDB'
    ENDEXEC.
    EXEC SQL PERFORMING loop_output.
      SELECT ID_NUMERIC, COMPONENT_NAME, COMUNA, RECORD_ID, STATUS, SAMPLED_DATE
      into :datos from lims.SAMP_TEST_RESULT
      where     date > '01-09-2010'
    ENDEXEC.
    EXEC SQL.
      disconnect 'MYDB'
    ENDEXEC.
    How can i get the data from that date?? If i delete the where statemet, the program works well, it takes 30 mins and show all the data, I just need the data from that date.
    Any help
    Regards

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • How to get data from a table in a condition between twomonth

    hai friends
    I have a query that is i want to get data from a table based on a condition between two months in a format of char column
    Ex
    I have a column called from_month in the format of 'mon/yyyy'(already converted from date')
    then the second column is to_month in the same format 'mon/yyyy'
    now i wiil select from_month and to_month like
    from month jan/2009
    to month mar/2010
    how to use between of two months in the format of char.Please tell me how to get two different month between data.

    Hi,
    This may be of help.
    Remember Pointless has made a point ;) (worth millions)
    If possible , DO NOT store dates as strings or numbers.Let dates be dates.
    WITH dat AS
    (SELECT ' THIS IS JAN' x,to_char(to_date('01-JAN-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS FEB' x,to_char(to_date('01-FEB-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS MAR' x,to_char(to_date('01-MAR-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS APR' x,to_char(to_date('01-APR-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS MAY' x,to_char(to_date('01-MAY-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS JUN' x,to_char(to_date('01-JUN-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS JUL' x,to_char(to_date('01-JUL-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS AUG' x,to_char(to_date('01-AUG-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS SEP' x,to_char(to_date('01-SEP-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS OCT' x,to_char(to_date('01-OCT-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS NOV' x,to_char(to_date('01-NOV-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual)
    SELECT * FROM dat
    WHERE to_date(y,'mon/yyyy') BETWEEN to_date('01 jan 2009','dd mon yyyy') AND to_date('01 mar 2009','dd mon yyyy')Cheers!!!
    Bhushan

Maybe you are looking for

  • I cannot do a full system recovery due to missing files and I don't have a recovery disc

    At startup, I continue to get a message to activate windows. When I try to do this, I get message that some files are missing. The computer will not allow me to go back to the earliest system restore, nor will it allow me to do a full factory restore

  • Adjusting preferences in Preview for viewing pdfs

    I would like to have the option to view the 1st page of my pdf next to the second page - not on its own (eg currently, for a 5 page document, mine only shows up as page 1, then p2+3, then P4+5. I would like it to show up at p1+2, then P3+4 then P5, e

  • Create a helpdesk account that can join pc's to the domin

    Hi, I need to create a Active Directory user account that has the ability to join a pc to the domain, create user accounts and Exchange 2010 mailboxes. What groups would the user need to be a part of? We do not want the user to have full domain admin

  • DataOutputStream wrong file format

    I have a small Java Application writing a file, I have been able to get file to be writen as I intended to BUT it comes out UNIX formated....which isn't good for easier text-application such as Ms NotePad. How can I tell Java that i want it to use "W

  • New Window Opens Under The Toolbar

    When I open a new window, the left side always falls under the toolbar, hiding the red button that closes the window. I think this is something new. I don't remember having to move each window after it opens in the past. Anybody else? Any solutions?