How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Raj Your Own Question
Raj, Computer Engg.
Category: Programming
Satisfied Customers: 1290
Experience:  MS CS, 5+ Experience in Programming and Database (ERP)
Type Your Programming Question Here...
Raj is online now
A new question is answered every 9 seconds

When it comes to sql the std select, update and delete and

Customer Question

When it comes to sql the std select, update and delete and the occassional joins I am OK with. However recently I have a requirement to perform the following and although I can do it programatically using e.g. PHP/Yii I want to actually do it using SQL or more specifically T-SQL.
The requirement:
TableA: id, code, comname
TableB: id, val1, val2, val3, flag, comname
What I would like to do is from tableA pass it a code value and depending on the number of records write out that many records in tableB providing values as parameters for val1, val2, val3 and flag so that tableB.comname is ***** ***** the value from tableA.comname
Eg TableA:
1, abc, The ABC World
2, abc, The alphabet world
3, abc, Words
4, 123, The numbers world
5, 123, Numbers world
6, 1a3, The aplhanumeric world
So now, if I pass a parameter of 'abc' and provide the following parameters for TableB
val1 = 11, val2=21, val3=31, flag=FALSE then tableA should have the following entries:
1,11,21,31, FALSE, The ABC World
2,11,21,31, FALSE, The alphabet world
3,11,21,31, FALSE, Words
How can I do this in T-SQL please?
Submitted: 1 year ago.
Category: Programming
Expert:  Raj replied 1 year ago.

Hi there, my name is ***** ***** I will try my best to help you

Expert:  Raj replied 1 year ago.

The requirement got distorted, so can you please provide me the details using MS word and in tabular representation the structure of Table A and Table B and the final result you need.

Customer: replied 1 year ago.
Hello,my apology for not getting back sooner - extremely busy at work with very long hours. It is Saturday now so I can take a short break. I have attached a Word document that shows what my requirement are.I hope you can help.Also, I received an email to rate your answer? I won't be rating it as yet as we are still continuing discussionsThank you
Expert:  Raj replied 1 year ago.

You dont have to rate until I provide the solution so dont worry. The mail you got was an automated system generated mail for reminder. I am going through the file, give me some time and will get back to you.

Customer: replied 1 year ago.
Hello Raj,Any further progress with a solution to my question please?Kind regards
Customer: replied 1 year ago.
Hello Raj,any further progress please? I am now quite desperate for a solution to my question. If unable to complete this let me know and I will source somewhere else.Chris
Customer: replied 1 year ago.
How very disappointing. I paid good money for a solution and paid extra for a quick response and I got nothing. This site is a scam.
Raj you should be ashamed of yourself. Your lack of communication and ability to provide a solution to my question is disgusting.Have the decency and return my money.

Related Programming Questions