Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

U ONLY Ingo, I would like to add another table to the

Customer Question
FOR INGO U ONLYHello Ingo,I...
FOR INGO U ONLYHello Ingo,I would like to add another table to the routine you previously created.
Submitted: 2 years ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Customer reply replied 2 years ago
I should have said I would like to create another UPDATE routine that will include the new table.Let me know if you have any questions.
Answered in 1 hour by:
2/2/2016
Programmer: Ingo U, Software Engineer replied 2 years ago
Ingo U
Ingo U, Software Engineer
Category: Programming
Satisfied Customers: 796
Experience: Over 25 years experience in software development. Expert in Microsoft .Net, C#, C++, VB, SQL
Verified

Hello, welcome back and thanks for requesting me. I will be happy to look into your request tomorrow.

Ask Your Own Programming Question
Programmer: Ingo U, Software Engineer replied 2 years ago

I'm sorry can you explain what you need? Some parts of some of the files you sent look familiar, others don't - I need some direction as to what you're after.

Also I struggle every time with the importing of your CSV files, at least because they contain double quote characters, it's tedious and in the end I'm never quite sure if I'm getting everything.

Can you just upload a backup of your database as a single file which I could restore in one step and be looking at the same table schema and data? Then, tell me what you're trying to achieve.

You could create the single database backup file (.dat) and upload it to wikisend, for example.

Ask Your Own Programming Question
Customer reply replied 2 years ago
I have about 30 tables in DB. I think I would have to back them all up to? Might be a large file.I’m trying to get this UPDATE to work with the FROM below just like you did with 2 tables - now I have 3./*--------------YOUR UPDATE ---------------*/UPDATE [Volusion_WCL_Categories]
SET [CategoryDescription] = convert(nvarchar(max),[CategoryDescription]) +''+ [Volusion_Product_Attributes].[PTR_Thermal_DTTT] + '"' + [Volusion_Product_Attributes].[PTR_Thermal_Print_Width]
+ ''' ' + [Volusion_Product_Attributes].[PTR_Thermal_DPI] + '' + [Volusion_Product_Attributes].[PTR_Thermal_Connections] + '' + [Volusion_Product_Attributes].[PTR_Thermal_Options] + '"' + [Volusion_Product_Attributes].[PTR_Thermal_Options] + '' + [Volusion_Product_Attributes].[PTR_Thermal_Options] + ''+
'' + [Volusion_WCL_Products].[productcode] + '
Same Day Shipping On Orders Before 2:00pm CST $' + CAST([Volusion_WCL_Products] .[productprice] AS VARCHAR) +
'
Per CartonAdd To Cart'/*-------------------With This From----------------------*/FROM
[DistributorFeeds].[dbo].[Volusion_WCL_Categories] [Volusion_WCL_Categories]
INNER JOIN [DistributorFeeds].[dbo].[Volusion_WCL_Products]
[Volusion_WCL_Products]
ON [Volusion_WCL_Categories].[categoryid] =
LEFT ([Volusion_WCL_Products].[categoryids] ,
3)
INNER JOIN [DistributorFeeds].[dbo].
[Volusion_Product_Attributes] [Volusion_Product_Attributes]
ON [Volusion_WCL_Products].[productcode] =
[Volusion_Product_Attributes].[productcode]
WHERE
([Volusion_WCL_Categories].[categoryid] = 136) OR
([Volusion_WCL_Categories].[categoryid] = 135)
ORDER BY
[Volusion_WCL_Products].[productcode] ASC
Customer reply replied 2 years ago
This is what I tried, but not updating the categorydescription field/*---------UPDATE THERMAL PRINTER CATEGORY DESCRIPTIONS-----------*/
UPDATE [Volusion_WCL_Categories]
SET [CategoryDescription] = 'WideLongColorPerfOutside DiameterLabels Per RollRolls Per CartonPart
NumberShippingPriceOrdering'
FROM
[DistributorFeeds].[dbo].[Volusion_WCL_Categories] [Volusion_WCL_Categories]
INNER JOIN [DistributorFeeds].[dbo].[Volusion_WCL_Products]
[Volusion_WCL_Products]
ON CAST([Volusion_WCL_Categories].[categoryid] AS NVARCHAR) =
CASE WHEN CHARINDEX(',',[Volusion_WCL_Products].[categoryids]) 0
THEN LEFT ([Volusion_WCL_Products].[categoryids], CHARINDEX(',',[Volusion_WCL_Products].[categoryids])-1)
ELSE [Volusion_WCL_Products].[categoryids]
END
INNER JOIN [DistributorFeeds].[dbo].
[Volusion_Product_Attributes] [Volusion_Product_Attributes]
ON [Volusion_WCL_Products].[productcode] =
[Volusion_Product_Attributes].[productcode]WHERE
([Volusion_WCL_Categories].[categoryid] = 136) OR
([Volusion_WCL_Categories].[categoryid] = 135);/* LOOP THROUGH ALL PRODUCT CODES*/
DECLARE @productcode5 varchar(150)
DECLARE c1 CURSOR FOR
SELECT Volusion_WCL_Products.productcode
FROM Volusion_WCL_Products INNER JOIN
[913392] ON
Volusion_WCL_Products.productcode = [913392].[Vendor_part_Num]
ORDER BY
[913392].[Vendor_part_Num] ASCOPEN c1
FETCH NEXT FROM c1 INTO @productcode5
WHILE @@FETCH_STATUS = 0
BEGIN
-- PRINT 'Processing product code ' + @productcode/*--------------YOUR UPDATE ---------------*/UPDATE [Volusion_WCL_Categories]
SET [CategoryDescription] = convert(nvarchar(max),[CategoryDescription]) +''+ [Volusion_Product_Attributes].[PTR_Thermal_DTTT] + '"' + [Volusion_Product_Attributes].[PTR_Thermal_Print_Width]
+ ''' ' + [Volusion_Product_Attributes].[PTR_Thermal_DPI] + '' + [Volusion_Product_Attributes].[PTR_Thermal_Connections] + '' + [Volusion_Product_Attributes].[PTR_Thermal_Options] + '"' + [Volusion_Product_Attributes].[PTR_Thermal_Options] + '' + [Volusion_Product_Attributes].[PTR_Thermal_Options] + ''+
'' + [Volusion_WCL_Products].[productcode] + '
Same Day Shipping On Orders Before 2:00pm CST $' + CAST([Volusion_WCL_Products] .[productprice] AS VARCHAR) +
'
Per CartonAdd To Cart'
FROM
[DistributorFeeds].[dbo].[Volusion_WCL_Categories] [Volusion_WCL_Categories]
LEFT OUTER JOIN [DistributorFeeds].[dbo].[Volusion_WCL_Products]
[Volusion_WCL_Products]
ON CAST([Volusion_WCL_Categories].[categoryid] AS NVARCHAR) =
-- This case statement CASE..END extracts [categoryids] up to/exluding a comma, if there is one
CASE WHEN CHARINDEX(',',[Volusion_WCL_Products].[categoryids]) 0
THEN LEFT ([Volusion_WCL_Products].[categoryids], CHARINDEX(',',[Volusion_WCL_Products].[categoryids])-1)
ELSE [Volusion_WCL_Products].[categoryids]
END
INNER JOIN [DistributorFeeds].[dbo].
[Volusion_Product_Attributes] [Volusion_Product_Attributes]
ON [Volusion_WCL_Products].[productcode] =
[Volusion_Product_Attributes].[productcode]
-- ONLY APPEND DATA IF @productcode2 in loop MATCHES
WHERE @productcode5 = [Volusion_WCL_Products].[productcode] AND
([Volusion_WCL_Categories].[categoryid] = 136) OR
([Volusion_WCL_Categories].[categoryid] = 135);FETCH NEXT FROM c1 INTO @productcode5
ENDDEALLOCATE c1
/* END LOOP */
Programmer: Ingo U, Software Engineer replied 2 years ago

Can you just describe what you want in English? I can't decipher that from your pasting of attempts that don't work...

Ask Your Own Programming Question
Customer reply replied 2 years ago
I would like to do the same update as before with an additional table joined. [Volusion_WCL_Products].[productcode] =[Volusion_Product_Attributes].[productcode]
Customer reply replied 2 years ago
Need to get data from [Volusion_Product_Attributes].[PTR_Thermal_DPI] on line 41 - can you add the table [Volusion_Product_Attributes] to the routine?/*---------UPDATE BEFORE DNP PRIDUCTS-----------*/
UPDATE [Volusion_WCL_Categories]
SET [CategoryDescription] = 'Bull'
FROM
[DistributorFeeds].[dbo].[Volusion_WCL_Categories] [Volusion_WCL_Categories]
LEFT OUTER JOIN [DistributorFeeds].[dbo].[Volusion_WCL_Products]
[Volusion_WCL_Products]
ON CAST([Volusion_WCL_Categories].[categoryid] AS NVARCHAR) =
CASE WHEN CHARINDEX(',',[Volusion_WCL_Products].[categoryids]) 0
THEN LEFT ([Volusion_WCL_Products].[categoryids], CHARINDEX(',',[Volusion_WCL_Products].[categoryids])-1)
ELSE [Volusion_WCL_Products].[categoryids]
END
-- [Volusion_WCL_Products].[categoryids]
RIGHT OUTER JOIN [DistributorFeeds].[dbo].[913392]
[913392]
ON [913392].[Vendor_Part_Num] = [Volusion_WCL_Products].[productcode]
WHERE
([Volusion_WCL_Categories].[categoryid] = 136) OR
([Volusion_WCL_Categories].[categoryid] = 135);/* LOOP THROUGH ALL PRODUCT CODES*/
DECLARE @productcode varchar(150)
DECLARE c1 CURSOR FOR
SELECT Volusion_WCL_Products.productcode
FROM Volusion_WCL_Products INNER JOIN
[913392] ON
Volusion_WCL_Products.productcode = [913392].[Vendor_Part_Num]
ORDER BY [913392].[Vendor_Part_Num]OPEN c1
FETCH NEXT FROM c1 INTO @productcode
WHILE @@FETCH_STATUS = 0
BEGIN
-- PRINT 'Processing product code ' + @productcode/*--------------YOUR UPDATE ---------------*/
UPDATE [Volusion_WCL_Categories]
SET [CategoryDescription] = convert(nvarchar(max),[CategoryDescription]) +' Shit' + [Volusion_Product_Attributes].[PTR_Thermal_DPI]
FROM
[DistributorFeeds].[dbo].[Volusion_WCL_Categories] [Volusion_WCL_Categories]
LEFT OUTER JOIN [DistributorFeeds].[dbo].[Volusion_WCL_Products]
[Volusion_WCL_Products]
ON CAST([Volusion_WCL_Categories].[categoryid] AS NVARCHAR) =
-- This case statement CASE..END extracts [categoryids] up to/exluding a comma, if there is one
CASE WHEN CHARINDEX(',',[Volusion_WCL_Products].[categoryids]) 0
THEN LEFT ([Volusion_WCL_Products].[categoryids], CHARINDEX(',',[Volusion_WCL_Products].[categoryids])-1)
ELSE [Volusion_WCL_Products].[categoryids]
END
RIGHT OUTER JOIN [DistributorFeeds].[dbo].[913392]
[913392]
ON [913392].[Vendor_Part_Num] = [Volusion_WCL_Products].[productcode]
-- ONLY APPEND DATA IF @productcode in loop MATCHES
WHERE @productcode = [Volusion_WCL_Products].[productcode]FETCH NEXT FROM c1 INTO @productcode
ENDDEALLOCATE c1
/* END LOOP *//*---------UPDATE AFTER DNP PRIDUCTS-----------*/
UPDATE [Volusion_WCL_Categories]
SET [CategoryDescription] = convert(nvarchar(max),[CategoryDescription]) +''
FROM
[DistributorFeeds].[dbo].[Volusion_WCL_Categories] [Volusion_WCL_Categories]
LEFT OUTER JOIN [DistributorFeeds].[dbo].[Volusion_WCL_Products]
[Volusion_WCL_Products]
ON CAST([Volusion_WCL_Categories].[categoryid] AS NVARCHAR) =
CASE WHEN CHARINDEX(',',[Volusion_WCL_Products].[categoryids]) 0
THEN LEFT ([Volusion_WCL_Products].[categoryids], CHARINDEX(',',[Volusion_WCL_Products].[categoryids])-1)
ELSE [Volusion_WCL_Products].[categoryids]
END
-- [Volusion_WCL_Products].[categoryids]
RIGHT OUTER JOIN [DistributorFeeds].[dbo].[913392]
[913392]
ON [913392].[Vendor_Part_Num] = [Volusion_WCL_Products].
[productcode];
Customer reply replied 2 years ago
I figured it out, sorry about the miscommunication.
Programmer: Ingo U, Software Engineer replied 2 years ago

OK, no problem.

Ask Your Own Programming Question
Was this answer helpful?
Ask ATLPROG Your Own Question
ATLPROG
ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7,677
7,677 Satisfied Customers
Experience: MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

ATLPROG is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

7,131 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

800 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
I have a MS SQL 2013 server, a programmer created a
I have a MS SQL 2013 server, a programmer created a "Scalar-Valued Function" called.. "GetUsersCurrentRewardBalance(UserID)" This returns back a int value when you pass in the UserID, that works.. I a… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
U only. Ingo, I have a few more questions about the document
For Ingo U only. Ingo, I have a few more questions about the document that we were working on around 2/1/2016. It will require me to attach the document for your review.… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
U ONLY Ingo, I would like to take a field in a table
FOR INGO U ONLYHello Ingo,I would like to take a field in a table separated by a comma and create two records in a different table.Field1 Field2 112-8K1-00200 146,112 ***-***-****0 146,112 ***-***-***… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
Will need help creating SQL scripts database and populate it
Will need help creating SQL scripts for a database and populate it with data. Also will need to incorporate relationships and integrity… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
. Write a program that uses a structure to store the
. Write a program that uses a structure to store the following inventory data in a file: Item Description Quantity on Hand Wholesale Cost Retail Cost Date Added to Inventory The program should have a … read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
hello...you helped me with a previous question...this new question
hello...you helped me with a previous question...this new question really has me baffled... i wish there was a way to attach my program to more fully explain my needs however i will try... i dynamical… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
I have 2 spreadsheets; One with 37,000 emails and physical
I have 2 spreadsheets; One with 37,000 emails and physical addresses and another with 5,000 'chosen' email addresses. I need to find all 5,000 email adds from my list of 37,000 and make sure their phy… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
Still Waiting, will add up to 50% bonus today for this. - Visual
Still Waiting, will add up to 50% bonus today for this. - Visual Basic Kayak...Can you help me write a program using the following directions. Create an application named Kayak Rental Prices that disp… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
I must have the simplest of question for you - but that is because I am totally new to mac
I must have the simplest of question for you - but that is because I am totally new to macros All I want to do is get a macro to copy the content of about 1200 cells from one worksheet to the next. Th… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
Hello Ingo U I was just inquiring if you had the following
Hello Ingo U I was just inquiring if you had the following assignment still? Create a class, called AddressBook, that encapsulates personal information about your friends. Use the class to create a pr… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
I want to create a form in a MS Access database called Payroll
I want to create a form in a MS Access database called “Payroll per month”. When this form opens it will have data for only the user opening it by prompting the user to type in their number. The form … read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
Ingo U, This is due Wednesday Create a class, called AddressBook,
Ingo U, This is due Wednesday Create a class, called AddressBook, that encapsulates personal information about your friends. Use the class to create a program that maintains the names and phone number… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
The other question I have is VERY similar to the other one
The other question I have is VERY similar to the other one I just sent. In this case, you use a Microsoft Access database named Play (which I will send you). The Play database contains one table named… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
Hi! I have a couple more projects that I need help with. Its
Hi! I have a couple more projects that I need help with. It's another VisualBasic 2008 question: It has a database (that is finished that I can send) attached to the problem. It reads, The Sports data… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
In access, how would I go about assigning a price to a product
In access, how would I go about assigning a price to a product? Example, if Doors cost 15.00. How do I populate a field with 15 dollars after the user chooses 'Doors' from a list box?… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
I have another program I need help with if you dont mind helping
I have another program I need help with if you don't mind helping me. Here is what I need to do. General: Need to set up a class to work with a trapezoid. Specifically, create a class that describes a… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
I need to write a program in visual studio 2008. This program
I need to write a program in visual studio 2008. This program is to be a gradebook calculator which has a user interface for the input of students, grades, attendance, ss numbers and their classes. In… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
trying to cram. Have many tests this week. wanna help Here
trying to cram. Have many tests this week. wanna help? Here is the assignment when you are prepared to see it.… read more
Ingo U
Ingo U
Software Engineer
796 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x