Forum Replies Created

Viewing 15 posts - 901 through 915 (of 1,217 total)

  • RE: Difference between function and stored procedure

    In fact, table valued functions return table, so that means that function can return several values, too. The main difference from user's point of view is that you can use...

  • RE: My database keeps messing up

    John,

    I hope it won't be that bad 🙂 I suppose they are backing up the DB regularly, just don't have a maintenance plan for it. It can be normal job (as...

  • RE: Alter Table Problem

    I'm not sure, but I'm afraid he is trying to disassemble a long string and create a table structure on the fly, naming the added columns based on some part...

  • RE: how to create TRANSACTION for all this

    Huh.. I'm not sure what you expect the transaction to do...? If the transaction is rolled back, mails are already sent and file copied, how would you expect to get...

  • RE: My database keeps messing up

    Well, the first obvious steps would be to run sp_who (or sp_who2) from Query Analyzer, to find out about any running processes, locking issues etc. - and then DBCC commands...

  • RE: HOW TO? Stored proc, many optional parameters

    Well, you can always write "@parameter IS NULL OR @parameter = table.column". If parameter is null, it means no filtering on that condition:

    SELECT * FROM orders

    WHERE

    (@Ordernumber IS NULL OR Orders.OrderNumber =...

  • RE: An @query parameter for xp_smtp_sendmail?

    Well, I can't blame them much, because I hate attachments, too :-). We have lots of checks coming in every day - generally I get everything that is sent from...

  • RE: An @query parameter for xp_smtp_sendmail?

    What do you mean by laziness of management? That they don't want to open attachments? If the attachment is a HTML file (produced e.g. by sp_makewebtask) of the size less...

  • RE: Help with store proc query

    I found some more time to juggle with it, here is the result. Mark that the GROUP BY clause (and MAX) is not necessary in the actual select. All grouping is done...

  • RE: Help with store proc query

    I'm not able to put the correct code together without some sample data, but the problem is clear : your code uses 3 times MAX, for each value separately. Each...

  • RE: A job running a stored procedure fails but works in the QA

    IMHO what you should search for is why the primary key violation occurs and adjust the code, so that it does not happen any more. Not sure what you mean...

  • RE: Orphaned Users

    IMHO it would be better to write a loop that would start sp_change_users_login for each user. I found one script that we used on a DB restored for testing purposes....

  • RE: Default join

    OK, it seems that it is more complicated :-). Right now I can see two possible ways to do that, but I can't gurantee that any of them will work...

  • RE: Changing Indexes Based on Query

    Hello Sergiy,

    but there already is index on the second table. Wouldn't that be used?

    "Table2 has 1 index with CustNo, State and Zip as Index_Keys."

    "CUSTNO, STATE, ZIP index on Table2 is...

  • RE: group by week problem

    Perfect, Sergiy! I was trying to find a way how to do that, not long ago... and gave up in the end - didn't think about using modulo. I solved it...

Viewing 15 posts - 901 through 915 (of 1,217 total)