CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Faltering Windows support
  • Internet Explorer 8 Click Clever Click Safe
  • Release Candidate 2 for ASP.NET MVC 2
  • Learn How to Create Dual Mode Windows Services

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Visual Basic .NET
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Visual Basic .NET Microsoft Visual Basic .NET and related questions.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old July 30th, 2009, 12:26 AM
    daniel50096230 daniel50096230 is offline
    Member
     
    Join Date: Jan 2009
    Posts: 84
    daniel50096230 is an unknown quantity at this point (<10)
    SQL select string

    I have the following data in my [content] column:

    STORE NO : 908 FFDC SIMPANG PULAI (908) TEL : 03-42518482 FAX:03-42604102 FROM DATE : 01/01/09 TO DATE : 31/01/09

    How should I write my sql statement so that I can only get the date after "FROM DATE: " and another data after "TO DATE: "???

    Currently I have the following code which store the whole content to dataset,but I just want to select 01/01/09 and 31/01/09 to separate column in dataset.

    Code:
      sql = "SELECT [content] FROM DC_VendorDetails_Temp "         
                    objDB.OpenDataSet(dsrepeater, sql)
                    dsrepeater.Tables(0).TableName = "DC"
                    dsrepeater.DataSetName = "DC"
    Reply With Quote
      #2    
    Old July 30th, 2009, 12:46 AM
    dglienna's Avatar
    dglienna dglienna is offline
    ex MVP - Visual Basic
    Power Poster
     
    Join Date: Jan 2006
    Location: Chicago, IL
    Posts: 10,288
    dglienna has a brilliant future (2000+) dglienna has a brilliant future (2000+) dglienna has a brilliant future (2000+) dglienna has a brilliant future (2000+) dglienna has a brilliant future (2000+) dglienna has a brilliant future (2000+) dglienna has a brilliant future (2000+) dglienna has a brilliant future (2000+) dglienna has a brilliant future (2000+) dglienna has a brilliant future (2000+) dglienna has a brilliant future (2000+)
    Re: SQL select string

    Fix the tables, so that they are in columns. That's what a table is supposed to be.
    __________________
    David CodeGuru Article: Bound Controls are Evil-VB6
    101 Samples: VB & C# VS2008 Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Visual Basic .NET


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 08:16 AM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.