Results 1 to 6 of 6
  1. #1
    Full Member
    Join Date
    January 16th, 2006
    Posts
    447
    Question Can I use sql to parse a datafeed column?
    In one of my feeds it has multiple values separated by a tilde ~. I can get the data from the datafeed, which was CSV in to a database, but now in the fields I have "subdata" in the same column that has the tilde. For example, a shoe has many sizes. I have a boot for a database row. One of the fields/columns in that row is size. In that field it will say 9~10~11... Can I parse that with SQL or should I get that out somehow and separate it in my db with a unique column for sizes? That last idea seems counter to what I know, but I thought I would see what other say. ANd also do all feeds like this have the tilde separater?

    I am using SQL Server 2k and 2005 and visual studio 2005, asp.net 2.0. I listed to everyone in the other thread and went ahead and started to roll my own software out.

    Thanks for any help.

  2. #2
    Member RWorld's Avatar
    Join Date
    December 18th, 2005
    Posts
    101
    There are many ways to approach this, really. Depends on what your preferences are.
    I would have a single "boot size" column and store all sizes in that. You need to standardize the format in YOUR database though, as it is very unlikely that all feeds will follow the same format. For example, make a decision to store sizes in your databases pipe separated maybe?

    I would try to standardize the size column in the feed with your size column in the code side, rather than SQL, as you will have a LOT more flexibility in how you manipulate the data.

    That way, it doesn't matter how the feeds are formatted as long as you have code to cover every format you encounter in the feeds.
    <font size="1"><strong>[URL=http://www.thechesszone.com]TheChessZone[/URL]</strong> Chess sets and supplies.<br><strong>[URL=http://www.shareasale.com/shareasale.cfm?merchantID=9515]Join our affiliate program[/URL]</strong> Up to 12% commission!

  3. #3
    Member
    Join Date
    September 5th, 2005
    Location
    Mansfield, TX
    Posts
    161
    You could use a Excel ODBC driver to read the file. Or here's a link to some nifty code that parses files. You have to be a coder to use some of this. I'd be glad to give pointers since I'm a programmer by day.

    FileHelper

    I have similar code in JAva if you need it.

  4. #4
    Full Member
    Join Date
    January 16th, 2006
    Posts
    447
    Question
    I know this is a little older thread, but was wondering. How would you handle a database column/field that had this data in the datafeed?

    Shoes~womens~dress~business~travel~slip-ons~pumps~round-toe

    What would you do here? I'm not even really sure what I want. Say I have a lnk that says "pumps." When I click the link, I want to select the field that has "pumps" in this column.

    Should I create a column for each category instead of trying to parse this list each time? May not be "right," but I wonder if it will be faster. I don't know. Any thoughts are appreciated.

  5. #5
    Member
    Join Date
    September 5th, 2005
    Location
    Mansfield, TX
    Posts
    161
    This data looks like it's more for a keyword search field.

    In otherwords if your user type in "pumps" in your search box then your SQL:

    select * from {table} where keyword like '%pumps%'

    would select this record. The % (percent sign) is a wild card selector. Hope this helps.

  6. #6
    Full Member
    Join Date
    January 16th, 2006
    Posts
    447
    Quote Originally Posted by DHolland
    This data looks like it's more for a keyword search field.

    In otherwords if your user type in "pumps" in your search box then your SQL:

    select * from {table} where keyword like '%pumps%'

    would select this record. The % (percent sign) is a wild card selector. Hope this helps.
    After I wrote that I did exactly that. I don't know why I didn't think of it before. Thank you.

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Walmart - SKU is also in the UPC & MPN column in datafeed
    By majestique in forum Rakuten LinkShare - LS
    Replies: 2
    Last Post: October 13th, 2013, 01:40 PM
  2. Walmart - What does W or M mean in your Availability column in datafeed?
    By majestique in forum Rakuten LinkShare - LS
    Replies: 2
    Last Post: October 12th, 2013, 08:41 PM
  3. Help with Unique column in SAS datafeed
    By likemynick in forum ShareASale - SAS
    Replies: 3
    Last Post: August 16th, 2006, 06:44 AM
  4. Anyone Use a DataFeed with MySQL or SQL Server?
    By johnnyWebAffiliate in forum Programming / Datafeeds / Tools
    Replies: 29
    Last Post: April 23rd, 2006, 12:43 PM
  5. Datafeed column headings?
    By input in forum ShareASale - SAS
    Replies: 36
    Last Post: February 25th, 2006, 02:12 AM

Posting Permissions

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