Showing posts with label line. Show all posts
Showing posts with label line. Show all posts
Friday, March 30, 2012
having problems with details selection
i have a packing slip report with 2 detail sections. can i select which details section to display/print as the line item based on whether the line item is a stock item (orderitem.type) =1 or a miscellaneous item (orderitem.type) = 3 ?? i don't want to use the suppress method, it needs to be one section or the other. thanksWhat's wrong with conditionally suppressing each detail sub-section as required? Would seem to be exactly what you want.
Monday, March 26, 2012
HAVING (COUNT(category) > 1) , not only 1 row
i am using this code :
SELECT MAX(user) AS lastuser, category
FROM journal
GROUP BY category
HAVING (COUNT(category) > 1)
it works but returns 1 line by category >1
i need all the user (all the rows) HAVING (COUNT(category) > 1) , not only 1
if 1 category has only 1 user i must not keep it
i am not shure to be clear :-)
thank you for helpingIf you need all the users fulfilling the requirements, why are you using the "max" argument. By its nature, the max (maximum) will return the largest value. Get rid of max, add user to your group by and try again.|||you mean
SELECT user, category
FROM journal
GROUP BY user,category
HAVING (COUNT(category) > 1)
i dont get it in that way
I dont need the lines : A|B where count(B) = 1
i need only the lines : A|B. C|B, D|B count(B) > 1
with my first code I get D|B (the last one)|||I don't think that your query will work it would return
where a user had the same category more than once
not differeent categories for the same user.
SELECT user
FROM journal
GROUP BY user
HAVING (COUNT(category) > 1)|||i dont get it in that way
i need for exemple 3 lines
john tennis
pierre tennis
paul tennis
3 lines if count(category) > 1|||SSELECT user_name,
category
FROM journal
WHERE category IN (SELECT category
FROM journal
GROUP BY category
HAVING COUNT(*) > 1)|||i'll try
thank you
SELECT MAX(user) AS lastuser, category
FROM journal
GROUP BY category
HAVING (COUNT(category) > 1)
it works but returns 1 line by category >1
i need all the user (all the rows) HAVING (COUNT(category) > 1) , not only 1
if 1 category has only 1 user i must not keep it
i am not shure to be clear :-)
thank you for helpingIf you need all the users fulfilling the requirements, why are you using the "max" argument. By its nature, the max (maximum) will return the largest value. Get rid of max, add user to your group by and try again.|||you mean
SELECT user, category
FROM journal
GROUP BY user,category
HAVING (COUNT(category) > 1)
i dont get it in that way
I dont need the lines : A|B where count(B) = 1
i need only the lines : A|B. C|B, D|B count(B) > 1
with my first code I get D|B (the last one)|||I don't think that your query will work it would return
where a user had the same category more than once
not differeent categories for the same user.
SELECT user
FROM journal
GROUP BY user
HAVING (COUNT(category) > 1)|||i dont get it in that way
i need for exemple 3 lines
john tennis
pierre tennis
paul tennis
3 lines if count(category) > 1|||SSELECT user_name,
category
FROM journal
WHERE category IN (SELECT category
FROM journal
GROUP BY category
HAVING COUNT(*) > 1)|||i'll try
thank you
Monday, March 19, 2012
Has anyone ever seen this fatal error?
We are getting the following error after execcuting an SP
on one of our clusters:
Server: Msg 7105, Level 22, State 6, Line 8
Page (1:16750), slot 4 for text, ntext, or image node does
not exist.
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
We are running SQL Server 2000 with SP3.
DBCC CHECKDB showed a problem with an index which we fixed
but the error still shows when we run the SP. DBCC
CHECKDB now shows no problems.
Is there any other way to track down this problem and/or
repair it?To resolve this problem, obtain the lates service pack for
Microsoft SQL Server 2000.
To work around the problem, either:
- Insert a dummy row in the table to import into so that
the table is not empty, and then delete the dummy row
after you import the data.
-or-
- Do not use the TABLOCK hint.
This posting is provided "AS IS" with no warranties, and
confers no rights.
http://www.microsoft.com/info/cpyright.htm
>--Original Message--
>We are getting the following error after execcuting an SP
>on one of our clusters:
>Server: Msg 7105, Level 22, State 6, Line 8
>Page (1:16750), slot 4 for text, ntext, or image node
does
>not exist.
>ODBC: Msg 0, Level 16, State 1
>Communication link failure
>Connection Broken
>We are running SQL Server 2000 with SP3.
>DBCC CHECKDB showed a problem with an index which we
fixed
>but the error still shows when we run the SP. DBCC
>CHECKDB now shows no problems.
>Is there any other way to track down this problem and/or
>repair it?
>
>.
>
on one of our clusters:
Server: Msg 7105, Level 22, State 6, Line 8
Page (1:16750), slot 4 for text, ntext, or image node does
not exist.
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
We are running SQL Server 2000 with SP3.
DBCC CHECKDB showed a problem with an index which we fixed
but the error still shows when we run the SP. DBCC
CHECKDB now shows no problems.
Is there any other way to track down this problem and/or
repair it?To resolve this problem, obtain the lates service pack for
Microsoft SQL Server 2000.
To work around the problem, either:
- Insert a dummy row in the table to import into so that
the table is not empty, and then delete the dummy row
after you import the data.
-or-
- Do not use the TABLOCK hint.
This posting is provided "AS IS" with no warranties, and
confers no rights.
http://www.microsoft.com/info/cpyright.htm
>--Original Message--
>We are getting the following error after execcuting an SP
>on one of our clusters:
>Server: Msg 7105, Level 22, State 6, Line 8
>Page (1:16750), slot 4 for text, ntext, or image node
does
>not exist.
>ODBC: Msg 0, Level 16, State 1
>Communication link failure
>Connection Broken
>We are running SQL Server 2000 with SP3.
>DBCC CHECKDB showed a problem with an index which we
fixed
>but the error still shows when we run the SP. DBCC
>CHECKDB now shows no problems.
>Is there any other way to track down this problem and/or
>repair it?
>
>.
>
Subscribe to:
Posts (Atom)