I want have a query with a column that is a hardcoded value not from a table, can this be done? I need it basically as a placeholder that I am going to come back to later and fill in.
example:
SELECT hat, shoe, boat, somevalue = 0 as placeholder FROM objects
then I would loop through this query later and fill in the placeholder
in this example someValue is not a field in objects, I need to fake it. I am doing this in coldfusion and using two datasources to complete one query. I have tried the space() function but have been unable to get it to work.
Thanks.
SELECT hat, shoe, boat, 0 as placeholder FROM objects
And '' as placeholder
for strings.
This should work on most databases. You can also select a blank string as your extra column like so:
Select Hat, Show, Boat, '' as SomeValue From Objects
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With