Are the posted questions getting worse?

  • I just love these!

    "I've got this task, needs to be done in an insert trigger".

    So, I give the code for doing so.

    "Now, can you incorporated it into my already existing, cursor-ridden insert trigger?"

    Just shoot me... better yet, shoot the OP.

    Edit: and, upon further reading, scope has changed from being for company/sub-accounts to being for college/students. Homework?

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Swap? http://www.sqlservercentral.com/Forums/Topic1005710-265-1.aspx

    Me: Run CheckDB and and post the full and unedited results

    OP: I have used that command and it returned about 3000 line of error code. This is last lines. (Posts 7 lines)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Just had a rreally foul time with SQLS 2008 R2.

    Tried installing Express edition (on a machine with XP Professional SP3 + .Net (Fwks 1.1, 2.0 SP2, 3.0 SP2, 3.5 SP1, 4 Client Profile, 4 Extended) + all critical updates. Installer hung; let it sit for 4 hours, then hit cancel; it hung; did other things for a while, discovered that machine couldn't do simple things like delete files (delete hung; so did many other things); tried taskkill (with force) on installer - it didn't die. Tried shut down machine - that hung too. Forcibly terminated machine, rebooted,and tried to uninstall what there was of SQL - it hung - same as on install. Machine didn't have any tool on it for clearing up hung install/uninstall, so edited registry to allow a tool to be installed to run the SQL uninstaller in a controlled fashion - and under that control the SQL uninstaller reported that it had failed to uninstall anything. So did a brute force uninstall using the tool without using the SQL installer - 100s of registry entries and around 400MB of filestore, and then some final tidying up by hand. The machine appears to be OK now. But I will never again attempt to install SQL 2008 R2 on any machine without first creating a restore point (including full registry dump).

    Anyone know if this is a common problem with the SQL 2008 R2 Express inataller for XP? And is there a known workaround?

    Tom

  • GilaMonster (10/16/2010)


    Swap? http://www.sqlservercentral.com/Forums/Topic1005710-265-1.aspx

    Me: Run CheckDB and and post the full and unedited results

    OP: I have used that command and it returned about 3000 line of error code. This is last lines. (Posts 7 lines)

    Aw, come on Gail. You gotta tell the whole story...

    After posting those last 7 lines the OP says

    Then I used this commands:

    ALTER DATABASE FAQ

    SET single_user WITH ROLLBACK IMMEDIATE;

    go

    DBCC checkdb ('FAQ', repair_allow_data_loss);

    go

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Is anyone willing to bet some money on whether he has a clean backup or not?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (10/16/2010)


    Is anyone willing to bet some money on whether he has a clean backup or not?

    I'll bet... that he doesn't.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • WayneS (10/16/2010)


    GilaMonster (10/16/2010)


    Is anyone willing to bet some money on whether he has a clean backup or not?

    I'll bet... that he doesn't.

    Then I'll certainly not bet agaionst you!

    Tom

  • GilaMonster (10/16/2010)


    Is anyone willing to bet some money on whether he has a clean backup or not?

    Backup? Why would I do that? I want to move forward! πŸ˜›



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Lennie's back... http://www.sqlservercentral.com/Forums/Topic1005823-169-1.aspx

    With some sample code that looks like an interesting cross between T-SQL and an object-orientated language.

    SELECT .... WHERE OrderDate.Month = 2

    May I suggest that everyone just ignores that? I don't think we need another flaming thread here.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (10/17/2010)


    Lennie's back... http://www.sqlservercentral.com/Forums/Topic1005823-169-1.aspx

    With some sample code that looks like an interesting cross between T-SQL and an object-orientated language.

    SELECT .... WHERE OrderDate.Month = 2

    May I suggest that everyone just ignores that? I don't think we need another flaming thread here.

    That line and another like it; and a comma after From just to be certain the sql MAKES NO SENSE. And what is all that pontless conversion from text to int (explicit in the maybe C#) and back again (implicit in the maybe C#) in aid of?

    If Lennie hadn't already demonstrated himself to be thoroughly arrogant, offensive and a stupid waste of time to respond to I would be inclined to pity anyone with as little understanding as that code demonstrates and both tell him which documentation he needs to read and give him an edited version of the code that would work. As it is, I reckon your "just ignore" suggestion is best.

    Tom

  • If I wasn't ignoring him/her, I'd suggest they do some reading on SQL Injection. The odd casts to int will ensure that there's nothing odd in the month or year, but the CustID has no such 'protection'.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (10/17/2010)


    If I wasn't ignoring him/her, I'd suggest they do some reading on SQL Injection. The odd casts to int will ensure that there's nothing odd in the month or year, but the CustID has no such 'protection'.

    Well, I wouldn't want to do injection prevention for strings that have to be in a known population at this level (and if I did I would have a try-catch in there, for when a convert fails): the app should make sure that the month, year, and CustID are pulled from a form with drop-down selection, no free text allowed (it's a nobrainer to do it that way for these sorts of field), and that wouldn't be visible in the code fragment he has provided. "Only take free text where it's necessary" has been my rule.

    I usually check free text (when I have to take it) pretty carefully (to enable error messages for the end user which are both more useful and less revealing of internal structure) but also I always pass it into a varchar (or nvarchar) typesafe parameter of an SP (no putting the string into dynamic SQL).

    I used to rant a lot about using SPs for all interfaces and sticking to type-safe parameters and avoiding free-text input whenever reasonable partly because I didn't want anyone screwing about in my database with SQL they generated rather than with approved SQL but mostly because I once inherited an app which was wide open to injection, together with some of the developers responsible. I know I could use type safe parameters with dynamic SQL, including parameter batching, but I prefer to stick to SPs. If I find a situation where I can't use type-safe parameters I redesign so that I can; I guess I could be forced to use the fallback of escaping the string if I fail to find a sensible design but don't recall it happening yet.

    Tom

  • GilaMonster (10/17/2010)


    Lennie's back... http://www.sqlservercentral.com/Forums/Topic1005823-169-1.aspx

    With some sample code that looks like an interesting cross between T-SQL and an object-orientated language.

    SELECT .... WHERE OrderDate.Month = 2

    May I suggest that everyone just ignores that? I don't think we need another flaming thread here.

    Love that he opens with "Hullo Friends" and then begs for help. The smilies seem to indicate he knows he's got little chance, but is desperate.

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    It’s unpleasantly like being drunk.
    What’s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

  • GilaMonster (10/17/2010)


    Lennie's back... http://www.sqlservercentral.com/Forums/Topic1005823-169-1.aspx

    With some sample code that looks like an interesting cross between T-SQL and an object-orientated language.

    SELECT .... WHERE OrderDate.Month = 2

    May I suggest that everyone just ignores that? I don't think we need another flaming thread here.

    I agree. Let's ignore it. Maybe Celko will come to his rescue. πŸ˜€



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Alvin Ramard (10/17/2010)


    GilaMonster (10/17/2010)


    Lennie's back... http://www.sqlservercentral.com/Forums/Topic1005823-169-1.aspx

    With some sample code that looks like an interesting cross between T-SQL and an object-orientated language.

    SELECT .... WHERE OrderDate.Month = 2

    May I suggest that everyone just ignores that? I don't think we need another flaming thread here.

    I agree. Let's ignore it. Maybe Celko will come to his rescye. πŸ˜€

    Alvin, that's just mean (I like it!) :w00t:

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

Viewing 15 posts - 20,491 through 20,505 (of 66,712 total)

You must be logged in to reply to this topic. Login to reply