CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Posts
    177

    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"

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    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
    2013 Samples: MS CODE 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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured