Viewing 15 posts - 436 through 450 (of 606 total)
My favourite way is to use osql within a batch file.
You then call the batch file from a job and write the execution log to another text file.
I use this...
August 24, 2004 at 5:23 am
I am probably showing my ignorance here, but how do you get the debugger up in QA. I did not know there was one.
August 24, 2004 at 5:18 am
You need to put the sum function around your case statement, not inside of it.
E.g
sum(CASE
WHEN DIS_DAT BETWEEN '01/05/2003' AND '05/31/2003'
THEN RET_QTY else 0 end) as UNSOLD_2003,
August 12, 2004 at 9:16 am
A more efficient way would be to use a full outer join. This will return records not matching either side of the middle table.
SELECT DISTINCT M.id, M.name
FROM Member M
FULL...
August 12, 2004 at 7:31 am
See my answe to this post I put in this morning;
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=131367&post=true
You just need to replace the WHEN statement with between start and end dates.
August 12, 2004 at 7:13 am
Just had a brainwave and have found how to sum by group OK.
Use
select id,
sum(CASE WHEN datediff(d, pdate,getdate()) 61
THEN amount else 0 end) as OVER2M
from product
group by id
I was...
August 12, 2004 at 7:12 am
You need to name the table and column that you want to count so that sql recognises it. Also, it is quicker to count the primary key than to count...
August 12, 2004 at 7:01 am
You are going about it the wrong way. You need to use a case statement when generating anything that looks like a pivot table. Checks BOL for examples. For what...
August 12, 2004 at 6:03 am
A basic overview of olap.
You need to have analysis services installed. I do not know which cd this comes on I am afraid.
You set up a db with a central...
August 12, 2004 at 4:56 am
Sounds like you've got it covered. Good to hear. I will have to take a look at your solution. Never know when it might come in handy in a new...
August 11, 2004 at 10:13 am
Or like this -
select t1.id, t1.lastname, t1.firstname,
case t2.communication
when 'phone' then t2.value else null end as phone,
case t2.communication
when 'email' then t2.value else null end as email
from table1 t1, table2 t2
where...
August 11, 2004 at 10:09 am
If you set up an olap db you can achieve this. When you populate the warehouse you can choose the option to append data only to the fact table.
However, this...
August 11, 2004 at 4:28 am
If you are looking at updating a sql server db from a non sql server db, message queues are required. For example, msqseries. This takes care of changes as they...
August 11, 2004 at 4:26 am
I forgot that. I have not worked on oracle for about 18 months and it shows.
August 11, 2004 at 4:13 am
A quick and easy way is:
WHERE CP.CLAIMID =* CD.CLAIMID
AND CP.CLAIMID =* CT.CLAIMID
August 10, 2004 at 7:30 am
Viewing 15 posts - 436 through 450 (of 606 total)