Forum Replies Created

Viewing 15 posts - 49,081 through 49,095 (of 49,552 total)

  • RE: how to fetch last entered records when i...

    Do you have an identity column, a time stamp column or a column that shows date entered (default getdate())? If not, there's no way to get the latest 3 rows....

    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: ODBC support JOINS?

    Are you connecting to the same server and the same database? (it's caused me a red face from time to time before)

    Is the query exactly the same, no additional clauses?

    Are...

    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: Problem calling a function within a SELECT

    fyi, what you're trying to do does work in SQL 2005, with some minor mods. It's possible in 2005 to do the following

    SELECT * FROM SomeTable S CROSS APPLY dbo.SomeFunction(S.aField)...

    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: How to stopp Null insertions

    I'll second the suggestion 'go bash a developer across the head' (I'm a developer myself)

    One thing I'd like to correct about your comments. The code inserting doesn't have to request...

    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: SIMPLE OR COMPLEX QUERY

    No need for a having clause as far as I can see. Try this

    SELECT

    sales_person_id, COUNT(

    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: Self Paced Studying - How do you do it?

    I've done it for several exams. The amout of time per week is pretty dependent on how long you have before you plan to write the exam.

    For my SQL...

    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: Is there any wrong to create clustered index on identity column?

    If you have no better place to put it, then put it there.

    Also note that the potential of hot spot has to be weighed against the probability of page...

    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: Is there any wrong to create clustered index on identity column?

    With large volumes, a cluster on an increasing column can create an insert hotspot, but the volumn really needs to be excessive (1000s of inserts/sec)

    It's actually quite a good idea...

    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: Unusual -- Violation of PRIMARY KEY constraint ERROR

    Is it possible that there's an insert into the transaction table from somewhere else, with identity_insert switched on?

    It almost sounds like someone's inserting the 'next' transaction and manually assigning...

    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: Question about SQL Server Management Studio...

    Yes.

    Install 2005 and when you get to the screen to select what you want installed, just install the workstation components. Unselect the database engine and all the other stuff.

    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: Two columns referencing same field in inner join

    Unrelated to your question, but something you should know.

    Inner Join PWIN171.dbo.FE AS FERaised

               On LTrim(RTrim(Cast(tblHeaders.fldRaisedBy as char))) = LTrim(RTrim(FERaised.FE_CODE))

    With the functions around the fields in the...

    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: SQL Where Clause

    I've noticed 'problems' with the auto stats with large tables (+20 million rows) with clustered indexes on an increasing field.

    I had a table a while back with DateAdded as...

    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: How a Insert works ?

    If the record violates the pk constraint, any of the fk constraints or any of the check constraints, it won't be inserted and the trigger, if any, won't fire.

    If the...

    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: Performance Impact of CURSOR

    Doesn't looks too hard. One clarification please. Why didn't

    s3c1some datesome date

    appear in the thrid table?

    What are...

    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: Performance Impact of CURSOR

    Can you give the structure of the 2nd and 3rd tables, an example of input data and an example of your desired output please.

    There's almost certainly a set-based solution 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

Viewing 15 posts - 49,081 through 49,095 (of 49,552 total)