Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by bebblebrox

  1. bebblebrox

    limit results to an aggregate function total

    thanks guys...my sql is a little rusty. nagorm...i had the donor id critera on purpose to limit the results to a particular donor for testing.
  2. bebblebrox

    limit results to an aggregate function total

    Hi, My table (gift_history) looks like this: donor_id number gift_date datetime gift_amount number query looks like this: select donor_id from gift_history where donor_id= 3890 And gift_date between '01/01/1991' and '01/01/1992' group by donor_id having sum(gift_amount) between 15 and...
  3. bebblebrox

    access skipping autonumbers

    Hi, I have a form that inserts data into an access db using an autonumber column. It passed QA, but in production I'm getting a lot of skipped autonumbers. is that normal? I have all input validated and errors trapped.
  4. bebblebrox

    unique index violation exception?

    is a specific exception thrown if an insert into an access database via oledb causes a violation of a unique index?
  5. bebblebrox

    how to find cause of arithmetic overflow error

    Hi, I'm inserting about 500,000 records during which i'm converting a string to a date. I get an error: Server: Msg 8115, Level 16, State 2, Line 1 Arithmetic overflow error converting expression to data type datetime. The statement has been terminated. How can I figure out which records...
  6. bebblebrox

    how to catch this error

    Robert: Yes, that works. But where I actually have this problem is in the following script: --create cursor of existing records Declare @origdate varchar(5), @id int DECLARE cOrigdate CURSOR fast_forward for SELECT origdate,id FROM MEMBERS2 where len(origdate) = 4 ORDER BY id begin open...
  7. bebblebrox

    how to catch this error

    Hi, Any advice on the problem below? I have a 4 digit string representing a date which I can sucessfully convert when the year is prior to 2000. But, after 2000, I get a syntax error. select convert(datetime,(substring(@date,1,2) + '01' + substring(@date,3,2)),101100) 1999-01-08...
  8. bebblebrox

    freeware data modeling software?

    are there any freeware packages that can be used to create ER diagrams? nothing too fancy, but preferably something that can generate a script.
  9. bebblebrox

    how to allow truncates in a procedure

    never mind, i had an error in my error handling. traping now.
  10. bebblebrox

    how to allow truncates in a procedure

    what i really want to do is trap that error and insert the record causing it into another table. doable?
  11. bebblebrox

    how to allow truncates in a procedure

    hi, i have a procedure which occasionally generates the following error: Server: Msg 8152, Level 16, State 9, Line 112 String or binary data would be truncated. The statement has been terminated. is there any command I can issue prior to running the script so that such truncations would be...
  12. bebblebrox

    how to resume a loop in a procedure on error

    I have a script which uses a cursor (cursor use is not the topic though :)). There are some records that, for various reasons, cause an errors such as: 1. can't insert null 2. data would have been truncated 3. eetc which cause the statement to be aborted. My question is: what construct do...
  13. bebblebrox

    how to trap row errors ona bulk insert

    Hi, So I'm trying to embrace the "cursors are evil" mentality while doing some dataloads. My question is this: Say I'm inserting 10 rows from a query into a table. The first 9 have no problems, but the last has an error because it has a null value, or an arithmetic overflow, or whatever...
  14. bebblebrox

    case statements using logical expressions

    i don't think i can use an "=" because it's part of a larger select statment, ie SELECT blah, blah, blah, case addr2 when charindex(addr2,'@') > 0 then null else addr2 end as addr2, blah, FROM members What's wrong with my syntax? I can't see a differrence between...
  15. bebblebrox

    case statements using logical expressions

    Hi, I have the following snippit: select case addr2 when charindex(addr,'@') > 0 then null else addr2 end as addr2 from members when i run it i get: Server: Msg 170, Level 15, State 1, Line 2 Line 2: Incorrect syntax near '>'. what gives? addr2 is a...

Part and Inventory Search

Back
Top