Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7658517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:12:44+00:00 2026-05-31T13:12:44+00:00

I have a table id / product_id / var / active / price the

  • 0

I have a table

id / product_id / var / active / price

the var column contains three variables separated by :

e.g. (37:48:80)

i want to change the price column to a set value if var contains the right options.

i.e.

33:38:57 through to 80 would = 450 
33:39:57 through to 80 would = 0 
33:40:57 through to 80 would = 0 
33:41:57 through to 80 would = 450 

i would like to pass the first variable an array of the second variable and if matched update price

my very bad sql would look like:

   UPDATE 'price' = 450 
   WHERE 'var' = 33:array(38,41 etc):array(57,58 etc)

i know thats really wrong but thought may help you understand what I’m trying to do.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:12:44+00:00Added an answer on May 31, 2026 at 1:12 pm

    I don’t quite get the through to 80 but I get the idea of your query (I guess…). I kinda hate regular expressions but they seem to be the right tool to solve this. Give this a try:

    update t set price = 450
    where var regexp '^33:(38|41):(57|58)$'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a product table with columns .. product_id product_name prodcut_description Now I want
I have the table (Product_Id, category priority, atribute1, atribute2...) in MS Access, and I
I have 2 tables like this: Stock Table product_id bigint(20) qty float Sales Table
Let's say I have a table: SELECT SUM(quantity) AS items_sold_since_date, product_ID FROM Sales WHERE
I have 2 tables product and history product table: id name type price location
I have a LINQ2SQL Query: //Pulling the Product_ID from the PlanMaster Table from WebEnroll
I have table product(table name) product_id product_name product_image product_price product_description category_id category(table name )
I have a table product with colums product_id prodcut_name category_id another table category category_id
I have product table with columns product_id (p.k) product_name product_description product_price category_id and I
i have two tables product product_id product_Name product_Price product_Description product_image category_id another table category

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.