Re: Simple SQl question
- From: Rob <no_spam_dogule@xxxxxxxxxxxxx>
- Date: Thu, 29 Dec 2005 20:20:22 GMT
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?
.
- Follow-Ups:
- Re: Simple SQl question
- From: Erich93063
- Re: Simple SQl question
- References:
- Simple SQl question
- From: Erich93063
- Simple SQl question
- Prev by Date: Simple SQl question
- Next by Date: Re: time format error
- Previous by thread: Simple SQl question
- Next by thread: Re: Simple SQl question
- Index(es):
Relevant Pages
|
|