Hi all,
I was wondering if anyone could help me with this, I have had a go at a number of things like using union queries but I think I am looking in the wrong place.
I am trying to run a SQL query on a singular table to provide to users with only datareader permissions to discover total sales.
The table itself contains sales and refunds which have a type of 1 or 3 in the database.
Table example structure:
Select (if type is 1 then sum(value) - (if type is 3 then sum(value)
In honestly I simply can't do it! I have tried using temporary tables and such but it has completely stumped me.
Can I anyone help a fellow spicehead in need? I will...