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 Chriss Miller 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 eao

  1. eao

    IDENTITY: Defining the 'seed' value.

    genomon, SELECT @Seq = (RECNUM + 1) FROM SDE.dbo.SMSYSRECNUM WHERE Name = '_COMPANY_' ...returns the same error.
  2. eao

    IDENTITY: Defining the 'seed' value.

    I want my autonumbered column to start at a particular value because I am importing records into a table that has values in it already. Basically, I have this table, smsysrecnum, that stored the last used sequence number for all user tables in the database. Here's the entire query: USE SDE GO...
  3. eao

    IDENTITY: Defining the 'seed' value.

    I'd like to use a value from another table to set the seed value for a field in a table variable. This on its own parses ok: --Variable to set the MU.Sequence field. DECLARE @Seq int SET @Seq = (SELECT (RECNUM + 1) FROM SDE.dbo.SMSYSRECNUM WHERE Name = '_COMPANY_') And this code...
  4. eao

    Incrementing a local variable per row

    Does this look better? USE SDE GO --Variable to set the EBU.Sequence field. DECLARE @Seq int --Table variable for EBU data. declare @tmpEBU table ( NewSeq int IDENTITY(1001,1), Name nvarchar (30) ) --Populate the record number table. INSERT SDE.dbo.smsysrecnum (Name, RecNum) VALUES...
  5. eao

    Incrementing a local variable per row

    I need some help figuring out what I am doing wrong. I am trying to migrate data from one system to another, and I want to assign an incrementing number to a field, but I can't seem to nail down the particulars. I am starting to think I need a stored procedure to increment the field. Please let...
  6. eao

    DTS Transform Data Task - Lookup Help

    Nevermind, I'm all set. My lookup query was bad.
  7. eao

    DTS Transform Data Task - Lookup Help

    Do I need to use a multiphase data pump for this task?
  8. eao

    DTS Transform Data Task - Lookup Help

    I'm not very familiar with DTS, but thought it was the right tool for this job. I am trying to import data from one database to another, and the target table has a primary key called Sequence (int). I wrote a lookup that says: select max (sequence) + 1 from Customer ...and the ActiveX script...
  9. eao

    User-defined function help

    Thanks Otto. You got me headed down the right path. My secondary IF... condition was looking at the wrong field. I updated it and it now works properly.
  10. eao

    User-defined function help

    I've got the following function defined: USE MagicTSD GO ALTER FUNCTION dbo.ProjectTime_GetProjectID (@WONum int) RETURNS nvarchar(40) BEGIN DECLARE @ProjID nvarchar(40) SET @ProjID = 'No ID' IF ( NOT (SELECT [HDNUM] FROM [_SMDBA_].[_WORKORD_] as W WHERE W.[SEQUENCE] = @WONum) IS NULL)...
  11. eao

    Import Issue

    Yes. But I think I found my issue. One of the field names was slightly different than the target. Fixed the name, and the import was successful.
  12. eao

    Import Issue

    Also, the field that is set to autonumber (BatchID) does not have a corresponding column in the spreadsheet.
  13. eao

    Import Issue

    Excel 2000, Access 2000 I am trying to import a spreadsheet to a table. The spreadsheet column headings are named the same as the target table. There are no spaces in any of the column names. The target table contains an autonumber field (not sure if this is the cause of the issue or not). The...
  14. eao

    Concatenation

    Thanks folks. Alex, you're answer got me started in the right direction. I was trying to over complicate things.
  15. eao

    Concatenation

    http://tek-tips.com/faqs.cfm?fid=4233 I'm attempting to use the function listed in the FAQ above to concatenate fields across two tables into a single field in an append query. I am not too sure of the syntax I need to use. My tables look like this: tblManualInstall: Sequence OldSerialNum...

Part and Inventory Search

Back
Top