omnialive
Registered User.
- Local time
- Today, 13:34
- Joined
- Sep 17, 2010
- Messages
- 23
Firstly, I have minimal previous experience with Access but year of experience with SQL, databases and the like (former Informix DBA and Unix Sys Admin).
I have an INSERT query that I use to grab data from a table and concatenate it together to create a specific string and store that string onto a temp table for later processing.
Here is an example table and INSERT query to illustrate what is happening.
Table [PERSON] has three columns: LAST_NAME, FIRST_NAME and SSN.
Sample data on table is:
LAST_NAME = KEITEL
FIRST_NAME = HARVEY
SSN = 999-00-1234
What the INSERT statement looks like is this:
INSERT INTO [TEMPTABLE] ([STRING], [DATE])
SELECT 'DISPLAY NAME: ' & [PERSON].[LAST_NAME] & ', ' & [PERSON].[FIRST_NAME] & CHR(12) &
'DISPLAY SSN: ' & [PERSON].[SSN] & CHR(12) &
'AUTHOR: ' & [PERSON].[LAST_NAME] & ', ' & [PERSON].[FIRST_NAME] & CHR(12) &
'AUTHOR SSN: ' & [PERSON].[SSN] & CHR(12) AS [STRING],
NOW() AS [DATE]
FROM PERSON
What is happening is that I am getting prompted to enter in a value for the second concatenated instances of SSN and FIRST_NAME. However, LAST_NAME doesn't generate a prompt and works just fine.
Any ideas on why I am being prompted for SSN and FIRST_NAME? I understand that this example is rather silly, but it illustrates exactly what I am struggling with.
I've checked the simple things like spelling in my query and et cetera and the invocations of concatenating the columns are spelled exactly the same! I have been pulling my hair out trying to figure this out and searching all over the internet (which is how I found this group). Any help or guidance is greatly appreciate!!!!!!!!!!!
I have an INSERT query that I use to grab data from a table and concatenate it together to create a specific string and store that string onto a temp table for later processing.
Here is an example table and INSERT query to illustrate what is happening.
Table [PERSON] has three columns: LAST_NAME, FIRST_NAME and SSN.
Sample data on table is:
LAST_NAME = KEITEL
FIRST_NAME = HARVEY
SSN = 999-00-1234
What the INSERT statement looks like is this:
INSERT INTO [TEMPTABLE] ([STRING], [DATE])
SELECT 'DISPLAY NAME: ' & [PERSON].[LAST_NAME] & ', ' & [PERSON].[FIRST_NAME] & CHR(12) &
'DISPLAY SSN: ' & [PERSON].[SSN] & CHR(12) &
'AUTHOR: ' & [PERSON].[LAST_NAME] & ', ' & [PERSON].[FIRST_NAME] & CHR(12) &
'AUTHOR SSN: ' & [PERSON].[SSN] & CHR(12) AS [STRING],
NOW() AS [DATE]
FROM PERSON
What is happening is that I am getting prompted to enter in a value for the second concatenated instances of SSN and FIRST_NAME. However, LAST_NAME doesn't generate a prompt and works just fine.
Any ideas on why I am being prompted for SSN and FIRST_NAME? I understand that this example is rather silly, but it illustrates exactly what I am struggling with.
I've checked the simple things like spelling in my query and et cetera and the invocations of concatenating the columns are spelled exactly the same! I have been pulling my hair out trying to figure this out and searching all over the internet (which is how I found this group). Any help or guidance is greatly appreciate!!!!!!!!!!!