Forum Replies Created

Viewing 15 posts - 18,886 through 18,900 (of 49,552 total)

  • RE: Compare two tables and return result

    Why do you need a function at all?

    btw, that function will throw errors and not do what you want even if it did compile. To filter requires a where...

    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
  • RE: Compare two tables and return result

    No, that's not going to work. Run that and you'll see. Read carefully over the article, it does show you how to pull sample data.

    I'll write up an 8 question...

    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
  • RE: Compare two tables and return result

    .Netter (4/22/2012)


    There will only be one Exam which is the one in question at the moment, When users come in for an interview they will sit this exam!

    Ah, now things...

    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
  • RE: Compare two tables and return result

    Are you absolutely sure there will never, never, never, never be a second exam? Never have something with a second set of answers?

    p.s. You need to change the examresults table...

    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
  • RE: Compare two tables and return result

    .Netter (4/22/2012)


    There is only one row in the correct_ExamAnswers with 36 columns is that what you ment?

    So what happens if a second exam is added? How would you be able...

    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
  • RE: Retriving values in a table with condition

    Right, now let's take a look at how this works:

    select uir.RoleId

    FROM aspnet_UsersInRoles uir

    inner join aspnet_Users u ON u.UserID = uir.UserID

    WHERE...

    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
  • RE: Retriving values in a table with condition

    Mando_eg (4/22/2012)


    I'm a beginner and I don't know how to use Inner Join, Outer Join and such functions so I think I have to work on the simple way to...

    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
  • RE: Compare two tables and return result

    Sample data please?

    How many rows in Correct_ExamAnswers? How do I tell which exam a user wrote?

    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
  • RE: Retriving values in a table with condition

    Mando_eg (4/22/2012)


    in this example I don't get any inputs from the user I just get his username programmatically by code so I don't think he has a chance to inject...

    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
  • RE: design methods

    This might help a bit: http://www.simple-talk.com/books/sql-books/the-red-gate-guide-to-sql-server-team-based-development/

    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
  • RE: Retriving values in a table with condition

    Mando_eg (4/22/2012)


    Perfect solution

    Thank you so much

    so I missed the 'cast' function and I think it works as you have used it in this example

    Please don't use dynamic SQL. You're just...

    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
  • RE: Cost Threshold Paralllelism -

    A query's cost is not the number of seconds that SQL thinks it will take to run. Yes, the documentation says it is, the documentation here is wrong. Costs (and...

    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
  • RE: Compare two tables and return result

    Sounds possible, but without seeing the table definitions it's hard to be more precise than that.

    Please post table definitions, sample data and desired output. Read this to see the best...

    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
  • RE: Retriving values in a table with condition

    There is absolutely no need to use dynamic SQL here. All you're doing by using dynamic SQL is making it more complex and less secure. There's also no need for...

    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
  • RE: Table with 2000 records - Clustered Scan or Index Scan?

    It's not a question of what's better, it's a question of what's possible.

    If you're retrieving all columns, all rows, then a table scan (clustered index scan) is the only option....

    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

Viewing 15 posts - 18,886 through 18,900 (of 49,552 total)