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 8244809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:58:48+00:00 2026-06-07T21:58:48+00:00

I have been tasked with writing a stored procedure that takes a user specified

  • 0

I have been tasked with writing a stored procedure that takes a user specified formula as parameter, and does calculations using tables on the formula.

It’s for the result of a competency test. The test is broken up into sections and each section is assigned a variable, eg. E1 and E2.

Now each section consists of questions with their scores. eg. E1 = [1]+[2]-[3]+[4]+[5]+[6] when the [number] indicates the question number.

Now the user will specify a formula like the above [1]+[2]-[3]+[4]+[5]+[6], and I have to write a parser that replaces the question number with the score for that question. But there is a snag in it, because one section can reference the score of another section eg. E2 = [7]+[8]+([6]-E1)+[9].

So I need to write a parser that parses the string, replaces the [Number] with the score, and if it hits a variable number, first calculates the sections score, before continuing.

I can imagine that it will be something like a recursive function, but can anyone help me oin the right direction?

Kind Regards.

  • 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-06-07T21:58:51+00:00Added an answer on June 7, 2026 at 9:58 pm

    I’m not saying you can’t do it, but SQL is not the best environment for this kind of operation; equally, you can bash a nail into a wall using a watermelon. You don’t specify your particular platform – if it is Microsoft SQL then perhaps a SQL CLR procedure would make the necessary manipulations easier.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been tasked with writing an ADP application using Access. The back-end data
I have been tasked with writing an xsd, for an xml file format that
I have been tasked with writing an installer with a silverlight out of browser
I have been tasked with refactoring some components that used xmlbeans to now make
I have been tasked to develop an interactive website using java & mysql: using
I've been tasked with writing a WCF service. (have not done this before.) I've
I am not really familiar with Joomla but I have been tasked with writing
I have been tasked with improving the current mess that is our JavaScript strategy;
I've recently been tasked with writing a Sage import tool that imports Quantity Price
I have been tasked with creating a program that will generate an amortization schedule.

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.