Skip to content

ssis case statement derived column

still learning about SSIS I have an excel source in SSIS, I need to create a case statement based on one of the columns [Teacher] but as a derived column (as it does not work in the SQL statement) the …

SQL Select from many-to-one

I have two tables containing a one-to-many relationship. How should I select the “one” side given information for the “many” side? I’m using SQLite. Let’s say our first table, T1, is about cars and the second table, T2, is about the imperfections in each car. Let’s sa…

How to use SQL math functions with multiple joins

in SQL Server I have two fact tables. FactA I will use COUNT(DISTINCT) and need to use two joins to get the needed GROUP BY and WHERE data from DimB. FactB uses SUM and needs only one join to DimB. …

Joining Temp Tables Using Indexes

I’m just beginning to learn about INDEX and I’ve heard it could speed up results but my testing is having the opposite effect. Some points about the data: My company uses a SQL Server but I don’t know much else beyond that I’m just an employee and don’t have any sort of admin acc…

SQL Select List mulitple values with case then

I have a variable and based on the variable I want to exclude the value from the select command. It works fine if I want to exclude 1 string, but if it’s not working if I’m excluding multiple string …

How find row by exact much of joined rows with SQL?

I have two tables I want to find specific row from parent table with name A which have exact two related rows in child table with names a and b. In example table is only one row is suitable (with id = 1). Row with id = 2 is not suitable because name of parent is B. Row with id

Nested aggregate function in PostgreSQL

I am trying to return every author_id, author_name, and AVG(total) per author for every article_group. I am trying to lump the author_id, author_name, and AVG(total) into arrays. I understand that …