Viewing 15 posts - 556 through 570 (of 1,217 total)
IMHO, text output has hideous formatting and is not good for permanent reports anyway. I prefer sp_makewebtask to create HTML file in the job, but you can do it in VB if that suits...
October 27, 2006 at 1:29 am
Depends on how precisely the data look like, but from what you posted this seems to be a good candidate for UNION. If some columns that you will be displaying...
October 25, 2006 at 8:22 am
As Michael said, you will need a function to create the concatenated list. Then your query would look like this:
SELECT p.categoryid, dbo.GetProdList(p.categoryid) as ProductList, count(*) as No_of_Products
FROM Products p
And this...
October 25, 2006 at 3:51 am
Jeff,
are you sure the code you posted works? I tried it out of curiosity, and I'm getting some strange results... e.g. for number 99, depending on how I enter it, result is...
October 25, 2006 at 1:41 am
Hello John,
welcome to the forums! Just to avoid confusion to whom you are referring in your next posts: Ten Centuries and Veteran are "titles", based mainly on number of posts...
October 24, 2006 at 1:27 am
You have posted in the SQL Server 2000 forum so I will give you an answer for SQLS2k - it should work the same in 2005, but SQLS2005 may have...
October 24, 2006 at 1:06 am
Yeah, that would explain it. I just didn't think of the table INVOICE as of table of invoice lines(details), supposed that it is a header because of the direct link to...
October 23, 2006 at 2:51 am
Hmmm... can there be several invoices with the same INVOICE_ID? I would rather suppose that this does not happen - but on the other hand this could be a reason...
October 23, 2006 at 2:18 am
Hi,
Look up CASE in BooksOnline. Something similar to this should do the job:
SELECT c.vcCustomer,
SUM(CASE WHEN c.vcCustomer = 'A' THEN 1 ELSE 0 END) as cntA,
SUM(CASE WHEN c.vcCustomer =...
October 23, 2006 at 1:57 am
Nice job there, Ken.. I'm just afraid that Stuart will now say that "PATIENT NAME" is not always included. It will be "Pat.Name" or even "Nurse Name" in some rows, and...
October 20, 2006 at 7:27 am
OMG... I hope that this is a one-time conversion to correct format, not something you'll have to do permanently (on every new row)?
I am not sure that SQL Server is...
October 20, 2006 at 6:44 am
Hmm.. the function seems to me too complicated, it should be possible to do it in some other way.
Is the text "Period: 01/07/2002 to 28/07/2002" always the same (code-generated) or...
October 20, 2006 at 5:51 am
That's precisely what I thought (or rather felt somewhere back in my mind) but failed to put into words. How elementary, my dear Watson...
I think this explains everything and also...
October 20, 2006 at 5:23 am
"Is there a way to stop the SP from running through the other statements if one IF statement is sastisfied?"
Yes there is. Use ELSE.
IF col1 < 0
BEGIN ... END
ELSE IF...
October 20, 2006 at 3:11 am
Since the two Refund tables seem to have the same structure, you could probably use UNION ALL on Refund tables, join the result to orderproducts and do GROUP BY /...
October 20, 2006 at 2:46 am
Viewing 15 posts - 556 through 570 (of 1,217 total)