Viewing 15 posts - 3,556 through 3,570 (of 5,685 total)
hmbtx (3/27/2011)
Yes, Craig's code satisfied my requirements?
If it is okay, I would like to add one additional question based on Craig's solution and that is how can I change the...
March 27, 2011 at 1:31 pm
Lynn Pettis (3/26/2011)
I may be wrong, but I think I could count on one...
March 26, 2011 at 9:19 pm
Double post, please send all comments and concerns to this thread.
March 26, 2011 at 4:41 pm
Jeff Moden (3/26/2011)
March 26, 2011 at 4:40 pm
hmbtx (3/26/2011)
That is it! Works perfectly.
Thanks for your help as I would not have ever figured this out on my own.
I am sorry that I did not provide you with...
March 26, 2011 at 4:36 pm
This runs against your sample.
SELECT
a.activity_code,
--a.[Description],
a.register_count,
drv.line_count
FROM
A_Header AS a
JOIN
( SELECTali.Activity_Code, COUNT(*) AS line_count
FROMA_Line AS ali
GROUP BYali.Activity_code
) AS drv
ONa.activity_code = drv.activity_code
where
drv.line_count <> a.register_count
order by
a.activity_code
March 26, 2011 at 4:23 pm
hmbtx (3/26/2011)
I made the change as you suggested (see below) but now I get the following...
March 26, 2011 at 4:19 pm
*FACEPALM*
I'm blind, sorry. It's currently stating FROM table FROM (SELECT ...)
Yeaaah... turn that into FROM table JOIN (SELECT...)
March 26, 2011 at 3:59 pm
hmbtx (3/26/2011)
Server: Msg 156, Level 15, State 1, Line 8Incorrect syntax near the keyword 'FROM'.
Server: Msg 156, Level 15, State 1, Line 12
Incorrect syntax near the keyword 'AS'.
2 Q's:
1) Are...
March 26, 2011 at 3:58 pm
hmbtx (3/26/2011)
I am running MSSQL 2000 sp4.
That's good to know. FYI, you posted in the 2k8 forum. You wanted the 7,2000 one that's further down in the list....
March 26, 2011 at 3:30 pm
WayneS (3/26/2011)
(Posting tip: when posting dates, include a "SET DATEFORMAT DMY" so that people...
March 26, 2011 at 3:22 pm
happycat59 (3/25/2011)
March 26, 2011 at 1:05 pm
I have to work through this weekend so I finally get around to swinging by here, and you guys are plotting the end of the community as we know it....
March 26, 2011 at 12:59 pm
The timing on this re-print couldn't be better. Thanks!!!
March 25, 2011 at 6:03 pm
Jeff Moden (3/24/2011)
Crap... looks like the thread is going to beat me to the 25,000 number.
Perhaps, but not 25,000 points...
March 24, 2011 at 11:28 pm
Viewing 15 posts - 3,556 through 3,570 (of 5,685 total)