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...
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...
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...
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)...
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...
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...
I am trying to figure out the expression to identify the position of the last character in a text data type field so that I may pass the result to a SUBSTRING function. I have not had any success. I tried to do PATINDEX (RIGHT (fieldname, 1), fieldname), but I got an invalid datatype message...
I've got a formula to calculate the number of work orders closed on per day (count ({Work_Orders.Work Order #}, {Work_Orders.Close Date})), but I cannot summarize this formula field to get averages, min, max, etc. Is there some other way I should be trying to calculate this data?
I want to use the Row() function so that I get the value of column B and use the Row function to dynamically lookup the row, but I can't figure out how to use it to build the cell address. Anyone help me out?
So I've got a spreadsheet that looks something like this:
Name Role
Eric 1
Eric 2
Bob 1
Bob 2
Bob 3
Steve 1
Steve 3
I want this spreadsheet to look like this:
Name Role
Eric 1, 2
Bob 1, 2, 3
Steve 1, 3
How can I do this? Thanks.
I have a file that I want to transfer from one machine to another. The two machines are not on the same domain, but they are on the same network. Do I need to use ftp, and if so how do I configure it?
I have the following function on a form, that when run displays #name.This function does not appear to work at all in this particular database. If I create a new form in a new database, the formatting works properly. I didn't create this database, so I'm not sure what could be wrong with it...
So I need to write a query to extract the value between two braces { }. Using the subject line as an example, I want to return the value " and ". I know how I'd do this in SQL, but I can't figure out the equivalent substr function in Jet SQL.
I created a DTS package in a test environment to update one database from another located on another server. I gave my DBA a heads-up because I wanted him to check it out before moving it into production, and he wasn't sure why I had used a DTS package to begin with. Are there disadvantages to...
I'm new to DTS packages. I want to update a table in a database based with data from another based on a key field. Can I use the import wizard, or do I need to DTS to execute a stored procedure to run the update?
I have 307 files that I need to import. The files are identical schematically, and they will all be imported to the same table. How do I automate this process?
I want to copy the value of cell A1 into column F for each record that exists in Sheet1. I have found some code that allows me to open the workbook I want:
Option Explicit
Const vbNormal = 1 ' window style
DIM objXL, objWb, objR, objTab ' Excel object variables
DIM Text, tmp, i...
I'm trying to figure out how an application is inserting data into the backend, so I ran a trace. I suspected that the app was calling a stored procedure, but all I found in the trace were a bunch of selects and inserts. Does Profiler only show the SQL of the Stored Procedures, or would the SP's...
SQL Server 2000 SP3
Access 2000 and 97 database connecting through ODBC.
When users attempt to connect to any database on this server, they receive the following error message.
Connection failed:
SQLState: '01000'
SQL Server Error: 10060
[Microsoft][ODBC SQL Server...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.