Categories
Mastering Development

How do i join 4 tables in sql

Hi there I am a beginner in SQL coding and recently got an assignment from my teacher that I am not too sure how to do. If someone could help me by explaining what to do and how to do it. The assignment is: As we have found the limitation of the 3 table system […]

Categories
Mastering Development

How to tell which row is chosen by GROUP BY in a SELECT statement in MySQL?

I have a table called products: ╔═══════════╦══════════╦════════════╗ ║ productID ║ designID ║ isFeatured ║ ╠═══════════╬══════════╬════════════╣ ║ 111111111 ║ AAAAA ║ 0 ║ ║ 222222222 ║ AAAAA ║ 1 ║ ║ 333333333 ║ AAAAA ║ 0 ║ ║ 444444444 ║ BBBBB ║ 0 ║ ║ 555555555 ║ BBBBB ║ 0 ║ ║ 666666666 ║ CCCCC ║ […]

Categories
Database Development

How to avoid tempdb spill

I have several tempdb spills in queries which are currently serving business purposes. I am told by online searching that tempdb spills should never be ignored as they can cause performance problems. It’s still a bit unclear to me as to why that is. Since I have also read that SQL Server by itself will […]

Categories
Database Development

WHERE ANY clause

I have two tables. Products table has 2 fields: ProductID(Primary key), ProductName. Orders Table has 3 fields: OrderID (Primary key), ProductID, Quantity. How can I use WHERE ANY clause (or what is the easiest way) to write a query that will output: ProductID, ProductName and Quantity of all orders with Quantity> 50?

Categories
Database Development

Primary key advice for simple table

I’m making a sample database to test myself in MySQL workbench and was wondering the following: I have five tables, Customer, Product, Stock(Quantity), Warehouse and Purchase Order. For primary keys I have customerId, productId, warehouseId, and invoiceNo…but what would the stocks primary key be? Apologies if the answer is obvious, but as I understand it […]

Categories
Database Development

Best database design for my system

I work as a volunteer for a NPO that basically tries to straighten the relationship between organic food producers and consumers. It’s a complex operation that requires a system to manage everything. I am not a professional programmer, but I know a few things so I built one with the minimum requirements for everything to […]

Categories
Mastering Development

IF ELSE condition with SQL Trigger

I am populating a table entirely using triggers, it populates the table if LocationID and ProductID does not exists and if it already does it updates the given data. I have posted the following code-snipet looking for a possible solution or link to one. USE [InventoryManagement] GO /****** Object: Trigger [dbo].[newpurchase] Script Date: 2020-04-17 6:13:40 […]

Categories
CMS Magento Mastering Development

Magento 2: Issue with double configurable swatches on related product tab

I am having an issue with double configurable swatches on the related product tab. It is working properly with single swatches such as color swatches only but it creates an issue on products with double swatches such as color and size. When I choose any option from the main product above the swatches on the […]

Categories
User Help

“UBL Mode” in u-boot/busybox kills firmware update script for Cisco PrecisionHD webcam

On GNU/Linux (Debian Buster), upgrading firmware of Cisco (Tandberg?) PrecisionHD USB Webcam from current version 1.4 (confirmed by checking shutter screen) to latest 1.5, using the .sh script provided at: https://www.cisco.com/c/en/us/support/collaboration-endpoints/telepresence-precisionhd-usb-camera/model.html#~tab-downloads Executing script as root fails (user fails even earlier) with following messages echoed to terminal: Creating directory scripts Verifying archive integrity… All good. Uncompressing […]

Categories
Mastering Development

Why only part of the value make it into my DB

I have a code for food ordering system and input quantity values into my database. I make collapsible button to divide each of the category. Problem is only the last category that give the output value (ex : I have 3 categories, they’re burger, fries, pasta. When I input 1 cheeseburger and 2 spaghetti, the […]