|
-
Jul 13th, 2009, 08:12 AM
#1
Thread Starter
Hyperactive Member
Adding 'fixed' values records
Is there a way to add a record using SQL (Access, DAO) with 'fixed' values only ? I've searched but couldn't find anything (too much results with not even close to what I want)..
The reason is this, I'm using standard SQL queries to fill a combobox, but the specified table doesn't have a record with the needed selection (and it shouldn't).
So I'm looking into UNION and would figure something like this (which would propably work in MySQL):
Code:
SELECT "<No item>", 0
UNION
SELECT MyDescription,MyID FROM MyTable
ORDER BY MyDescription,MyID
Which would result in a recordset like so:
"<No item>",0
"MyItem1", 1
"MyItem2", 2
"MyItem3", 3
But it doesn't seem to work in Access..
Any idea how to do this in an SQL query which works with MSAccess?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|