|
Posted by Rob on 12/29/05 22:20
Erich93063 wrote:
> I am trying to create a SQL statement that returns values from fields
> in the database but I also need to return values that are NOT in the
> database but hard coded int he SQL statement. The values along with the
> names of the fields will be hardcoded into the SQL statement. I'm not
> sure if this can be done.
>
> It will be something like this:
>
> SELECT vchrFirstName,
> vchrLastName,
> 'hardcoded value' AS myField
> FROM tblCustomer
>
> The above statement does NOT work. It throws an error, but that is what
> I am trying to do. Bascially I want the query to return the values for
> vchrFirstName and vchrLastName which are in the database, but I also
> want the field called "myField" to be returned in the recordset with
> the value of "hardcoded value" for every record returned. I hope this
> made sense and can be done. THANKS!
>
Yes, it can be done, and your query should work. What's the error
you're getting?
[Back to original message]
|