Viewing 15 posts - 376 through 390 (of 433 total)
what is the data type of the quantity field? You can change that to int and your sums should inherit that or you can cast your sums as int
March 20, 2007 at 8:14 am
Are we looking at trnyr and trnmnth or entrydate for the date comparison?
select stockcode,description,
sum(case when datepart(yyyy,getdate()) = trnyr and datepart(mm,getdate()) = trnmonth then trnqty else 0 end) as curmonth,
sum(case when...
March 20, 2007 at 7:35 am
in the sp you are setting the smtp server to 127.0.0.1 localhost. Is smtp running on the server and does SQL login have permissions to relay on it?
The desktop script...
March 19, 2007 at 10:12 am
Turns out I was running on autopilot as well. I was attached to an SQL7 box which is probably the issue.
March 19, 2007 at 8:03 am
This isn't a straight forward pivot table either. A pivot table uses 3 columns, one for row headings, one for column headings, and one for summarized data. The column headings...
March 19, 2007 at 7:51 am
I copied your code from here into query analyzer in SQL 2000 thinking I had a syntax issue when I tried it. Here it is copied back out from QA.
update...
March 15, 2007 at 3:02 pm
Through enterprise manager you can view which process is blocking and view the properties of the process to see what it is and who is doing it.
March 15, 2007 at 2:37 pm
I goth the following error doing it Lynn's way which is why I added the extra step with the primary key.
Server: Msg 107, Level 16, State 2, Line 1
The column...
March 15, 2007 at 2:23 pm
Does TABLE1 have a primary key? If so what is it?
What are we updating Col5 to?
update table1 set col5 = 'X' where pk in (
select pk from table1 t
join ...
March 15, 2007 at 1:45 pm
The reason you are not getting the desired result is because the count is returning int and the redult returned is therefor an int with no decimal places. The way...
March 15, 2007 at 11:16 am
by multiplying one side by .01 you are moving the decimal place over. The usual way to do this is to multiply the result of the whole operation by 100. because you...
March 15, 2007 at 10:49 am
no it is a broken image. run your query in query analyzer and paste the results into your message.
March 15, 2007 at 6:13 am
you can do this using a temp table also, look here for info.
http://www.developersdex.com/gurus/code/836.asp
March 14, 2007 at 2:55 pm
Viewing 15 posts - 376 through 390 (of 433 total)