Forum Replies Created

Viewing 15 posts - 556 through 570 (of 1,217 total)

  • RE: suppress underline in output file

    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...

  • RE: multiple inner joins. same primary key

    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...

  • RE: SELECT query - group by and concatenate

    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...

  • RE: Count Decimal Places

    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...

  • RE: First-timer: Removing last comma from a string

    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...

  • RE: Getting first line of Max results

    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...

  • RE: I want to left join a single time...

    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...

  • RE: I want to left join a single time...

    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...

  • RE: Automated email to inform records loaded for a day.

    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 =...

  • RE: UDF inconsistent returns

    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...

  • RE: UDF inconsistent returns

    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...

  • RE: UDF inconsistent returns

    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...

  • RE: DBA Certification

    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...

  • RE: Multple If Statements with slow performance

    "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...

  • RE: Help with a select query?

    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 /...

Viewing 15 posts - 556 through 570 (of 1,217 total)