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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: naxy
  • Order by date
  1. naxy

    Return record(s) that produced error

    That sounds like a good option. However, how would I be able to determine the problematic row(s)? For example, we have a straight INSERT INTO... SELECT FROM statement. It may process up to 50,000 records. If only one is "invalid", how can I know which one it is (without writing a query that...
  2. naxy

    Return record(s) that produced error

    This is going to be far-fetched, I know, but my immediate supervisor has asked if it would be possible to return any record(s) that causes an error. I told him I would investigate, but I didn't think it was possible. For example, if we have an INSERT statement to move 100,000 records into a...
  3. naxy

    Problem with Begin/Commit/Rollback Transaction

    I'm trying to work in some rollback procedures into a few stored procedures. I've set up the following code. However, when I set it up to fail on purpose, the rollback does not appear to be working (the USP_Write_To_Log is not firing). What am I doing wrong? Thanks! DECLARE @err INT BEGIN...
  4. naxy

    Comparing possible NULLS

    I'll give COALESCE a shot. I'm just so used to using IsNull on the few database fields that we allow them on. Oh, and yeah, same principle applies for all fields I need to check against. Thanks!
  5. naxy

    Comparing possible NULLS

    Apologies for the triple post here, but I think I may have stumbled upon my solution. Does this look right? UPDATE a SET a.PUSH_STATUS = 'U' FROM HR_SRC a INNER JOIN EMPLE_jlr b ON a.Employee_ID = b.HMN_RSRC_ID WHERE IsNull(a.Previous_Badge_ID, '') <> IsNull(b.TEMP_ID, '')
  6. naxy

    Comparing possible NULLS

    Oops. Disregard the lower case "select *" line. It's there for my testing in Query Analyzer. :D
  7. naxy

    Comparing possible NULLS

    Hi all, I'm trying to write a data validating query in which existing data is checked against new data coming come. I'm then determining if I need to insert a new record or simply update one already existing. The insert records are good to go, but I can't get the update comparison to go. Here's...
  8. naxy

    SQL Srv 2000 - Apply Permissions via a Parameter

    For whatever reason the original business requirements were drawn, the business owners must be able to alter the table/data at any time. This is something that could easily be done if they knew how to use Views and/or Joins (or let us template the reports within the actual application), but...
  9. naxy

    SQL Srv 2000 - Apply Permissions via a Parameter

    Not a problem. Just didn't think I had enough to really make a benefit though. So here is the first part of the original logic Stored Procedure (where the DROP/recreate is): SET NOCOUNT ON -------------------------------------------------------------- --DROP EXISTING PREPAID WORKING TABLE...
  10. naxy

    SQL Srv 2000 - Apply Permissions via a Parameter

    I have a set of permissions which can potentially apply to about 15 different tables. What I want to do is be able to call these permissions dynamically so that I don't have to split a block of logic into two Stored Procedures. Basically, I have a block of logic in which a "working" table is...
  11. naxy

    Check Flat File's Existance via DTS Package

    Denis hit the nail on the head. If I knew the date stamp, I would be able to check for its existance as is. However, because the date stamp changes each day, and also because it is not always the current day, I need to be able to look for the file name, minus the last 9 characters. For example...
  12. naxy

    Check Flat File's Existance via DTS Package

    Hi all, Preliminaries: 1) This is in a SQL Server 2000 DTS Package 2) The flat file is on the server itself (duh) 3) The flat file always has a date stamp appended to the end 4) The date stamp isn't always the date the file was FTP'd to the server Question: I need to be able to check for the...
  13. naxy

    Trying to use SELECT TOP @Sample_Size within an INSERT INTO block

    Sorry, I can't find an edit button. I didn't realize that my Windows Clipboard didn't pick up my text. Here's what my post really SHOULD read: Hi all, I'm not really sure what to call my problem, so I will try to be as descriptive as possible. I'm trying to insert records to a new table using...
  14. naxy

    Trying to use SELECT TOP @Sample_Size within an INSERT INTO block

    UPDATE manual_audits SET manual_audit_system = ( case when transaction_number in ('10', '14', '9292') then 'G' when transaction_number in ('401', '202', '8258', '8282', '8217', '6060', '6061') then 'M' end) WHERE claims_id = cast(@mclaims_id as nvarchar(10)
  15. naxy

    Update data in one table from data in another table

    the solution by vongrunt seems to work (testing the data to make sure now). SQLBill - I understand where you're going with the temp tables. I will read in to it for sure! This is actually handled by a DTS package. The temp table is created, used, and dropped within the same step.
  16. naxy

    Update data in one table from data in another table

    Hi all!!! I have a main table (itof_operator) and a working table (#itoftemp). I want to update a field on the main table (itof_operator.operator_state) with a field on the temp table (#itoftemp.cost_center_number) where a field on both tables match (itof_operator.operator_id =...
  17. naxy

    Update one table with data from another?

    Hi all!!! I have a main table (itof_operator) and a working table (#itoftemp). I want to update a field on the main table (itof_operator.operator_state) with a field on the temp table (#itoftemp.cost_center_number) where a field on both tables match (itof_operator.operator_id =...

Part and Inventory Search

Back
Top