crhodus
10-30-2001, 01:17 PM
Is is possible to concatenate date with other data in a query?
For an example would something like this work?
INSERT INTO tblCompany (CompNum & rnd(), field1, field2, ....)
[This message has been edited by crhodus (edited 10-30-2001).]
[This message has been edited by crhodus (edited 10-31-2001).]
crhodus
10-31-2001, 05:46 AM
I finally got my query to work, but I have one other obstical to get around. The rnd() does not generate a unique random number for each record. The random number ends up being the same for each record that it is joined to. Does anyone know of another way that I can create a unique ID for my records when I run my query?
Here is the query that I created:
INSERT INTO Calls (ContactID, CallID, Notes)
SELECT [Forms]![frmTransNotesHist].[ContactID], A.CallID & RND(), A.Notes
FROM Calls AS A
WHERE A.ContactID=[Forms]![frmTransNotesHist].[OldNum];
Add a AutoNumber field to the table and then use Rnd([AutoNumber_field]+1), this has worked for me.
HTH
Val
Pat Hartman
10-31-2001, 08:23 AM
If you look at the help entry for Rnd(), you'll see that you need to FIRST use the Randomize() function to provide a seed value.