Skip to content

Tag: sql

Execute query and populate the same in datagrid Box

I have a winform app connected to access database as data source , but in access i was using this below SQL to generate a query table called trend: But i do not know how execute this & populate the same in datagrid box on form load event(dataset:CSCdataset) , please help me. Answer I guess you can find mo…

Create a left join with raw string data

I have a list of e-mails in a text file and a Person table with an email column. I need to know which of the emails are in the table, and which are not. So I was thinking in creating a query and do some kind of left join in my raw e-mail data with the Person table. Now, I

elect data from related tables with duplicate columns

I have 3 tables. news rubrics parent_id is key for id parent in table rubrics. And “news_rubriks” How I can select news which apply to rubrics.id and rubrics.parent_id ? Answer If I understand correctly, you want to apply a filter to both the rubrik id and the parent. Say if you are searching for …

Select when two tables reference the same table

I have two tables, tSellers and tBuyers. They both have FK to a table tCity. How do I join and select city name from a buyer and a seller in a order table? Expected output: Answer To expand on @jarlh ‘s comment: Example of joining on City table twice, once for Seller (to get the city of the Seller), and