Migrate from MS Access to Bubble

Hi, I’m having troubble doing this on bubble. It’s supposed to display the recipy for making 2 different products, one with 4 and the other with 5 different ingredients. It works fine on MS Access . . can anyone help me?

SELECT Vendas.IdVenda, DetalhesDeTipo.IdTipo, Tipologia.Tipo, DetalhesDeTipo.Quantidade, Produtos.Produto, Produção.Quantidade, Produção.Largura, Produção.Altura
FROM Vendas INNER JOIN ((Tipologia INNER JOIN (Produtos INNER JOIN DetalhesDeTipo ON Produtos.IdProduto = DetalhesDeTipo.IdProduto) ON Tipologia.IdTipo = DetalhesDeTipo.IdTipo) INNER JOIN Produção ON Tipologia.IdTipo = Produção.IdTipo) ON Vendas.IdVenda = Produção.IdVenda
WHERE (((Vendas.IdVenda)=1230));

Shoul look like this:

Maybe intersect with in place of INNER JOIN ???

Figuring out how to structure your Bubble DB coming from a SQL and Relationship DB world is something most people have to deal with in the early days. Look for posts by this guy @cmarchan - he helpfully often posts a collection of tutorials links. Long story short “inner joins” in Bubble is equivalent to “putting a Thing on another Thing” (yes Bubble calls them Things :slight_smile: )

2 Likes

@carloslealdeoliveira

The below post by @NigelG may help understand the “Bubblish” way when thinking in sql terms

Thanks for the kind mention @lindsay_knowcode :+1:t2:

http://forum.bubble.io/t/sql-joins-vs-bubble/25806

2 Likes

Thanks Lindsay . . . I’ll check it out