Viewing 15 posts - 1 through 15 (of 113 total)
it is a relatively straightforward CASE statement
CASE WHEN perc_cs_publico <> 0 AND perc_cs_privado = 0 AND perc_cs_estrangeiro = 0 THEN PUBLICO
WHEN perc_cs_publico...
April 22, 2013 at 8:59 am
that rollback transaction has to complete. If you reboot, it will depend on your recovery settings what will happen.
April 22, 2013 at 8:54 am
Just my opinion, but the reason that your CASE 3 does not appear in Kimball's approach is because you wouldn't create such a fact table. Why would you exclude...
April 19, 2012 at 7:39 am
Your post is a little confusing...
I believe if you got the citizenID as a distinct value you could use that as a subquery for updating...
December 12, 2011 at 12:53 pm
You could create a table that is a place holder for the months (essentially 12 records). Then do a left join from that table to your data (on month...
December 9, 2011 at 1:38 pm
Straight SQL is not going to show you want isn't in the database, but I'm confused on how that makes the YTD figures incorrect. Is it that they are...
December 9, 2011 at 1:22 pm
While the DTA is a wonderful tool, you really do need to understand SQL Server, your database and your business use cases to properly implement the changes it will suggest....
December 9, 2011 at 1:12 pm
I believe i understand what you typed, but I'm not sure if you are asking a question here.
December 9, 2011 at 10:50 am
I see that you are measuring your duration, but to see the likely culprit of the difference, you should use:
SET STATISTICS IO ON
The info you'll get will likely show you...
December 9, 2011 at 7:22 am
Look into the PIVOT command in Books Online. If you still have trouble re-post with questions on PIVOT. I think it will achieve what you are looking for.
December 8, 2011 at 12:11 pm
Excellent point Jon.
December 8, 2011 at 11:48 am
There are several methods you could follow. Is the MemberControlID unique? If it is, the follow SQL would pull out all the MemberControlID's that you want to keep:
Select...
December 8, 2011 at 10:05 am
Actually, PIVOT is what you are looking for:
select Pivoted.* from
(select c.teacher, c.period, c.classname from dbo.class c) p
pivot
(max(classname) for
Period in ([1st], [2nd], [3rd], [4th], [5th], [6th], [7th], [8th])) as...
July 27, 2011 at 7:19 am
Look at Books Online about the SELECT statement and using and subselect.
Essentially, you will use your SELECT as a table and join it to the other tables:
select t1.field1, P.fieldname
from
...
June 14, 2011 at 5:41 am
Viewing 15 posts - 1 through 15 (of 113 total)