Forum Replies Created

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

  • RE: insert multiple times...

    look at the fields in the insert statement.

    Then look at the values you pass into the check dup proc which is just above the insert statement.

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: insert multiple times...

    oh it's no problem.

    OK I think I found the problem.

    When you create the record you INSERT @EstateCLID INTO RealEstate_ID

    However when you call dbo.[CentralCheckDuplicate]

    You pass in @EstateID which looks at [Realestate_id]...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: insert multiple times...

    how does the proc stop a dup record getting inserted?

    If it's this proc? please could you supply the code:CentralCheckDuplicate

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Displaying NULL as the last row + ORDER BY

    another solution

    Is to put an isnull acount the field and just make the value really hight 🙂

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: insert multiple times...

    I've heard that getdate() normally has a 3 ms difference, so if the proc ran in less than 3 ms then there is a chance the dates could be the...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: insert multiple times...

    Is there a trigger on the table you are inserting into ?

    Also how is this sp called?

    Is it not being called twice at the same time?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: insert multiple times...

    Please could you post the code your sp?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Adding sum and distinct to case query

    There you have it Lynn beat me to the code post 🙂

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Adding sum and distinct to case query

    don't worry my toes are all good 🙂

    Yeah was just thinking that creating it in a CTE no summing first then grouping the cte on the new column based on...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Adding sum and distinct to case query

    looks like your distinct is in the wrong place.

    Try this:

    select DISTINCT sum(acres), case

    when curage <= 5 then 'Age 0-5'

    ...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Adding sum and distinct to case query

    could you please post the whole error message:-)

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error - Could not find server 'Database' in sysservers

    ooops well spotted Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error - Could not find server 'Database' in sysservers

    Are you sure that the Db1 and DB2 are databases?

    Second are you sure this is the exact code that you are running?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Create a table with select statment values from store procedure

    You shouldn't need a table to create a report.

    If you open up an ADO recordset which is created from your Procedure then you don't need to know the columns at...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: The Reverse Optimization Challenge #1

    are we allowed to use temp tables for looping? If the loop has a purpose?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life

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