| Author |
Topic  |
|
|
chipembele
Yak Posting Veteran
97 Posts |
Posted - 12/14/2012 : 05:42:43
|
Hi We are required to create an export from SQL in a specific excel order/format.
Problem is, some of the fields they require dont exist in our database as we dont hold the data.
Is it possible (like in access where you can create dummy fields e.g. DummyField:"") to force a dummy field in a SQL view?
Any pointers appreciated. Dan |
|
|
webfred
Flowing Fount of Yak Knowledge
Germany
8515 Posts |
Posted - 12/14/2012 : 05:49:38
|
A view is a SELECT. In a SELECT you can do: select col1, col2, col3, '' as DummyField from ... where ...
Too old to Rock'n'Roll too young to die. |
 |
|
|
chipembele
Yak Posting Veteran
97 Posts |
Posted - 12/14/2012 : 06:16:09
|
quote: Originally posted by webfred
A view is a SELECT. In a SELECT you can do: select col1, col2, col3, '' as DummyField from ... where ...
Too old to Rock'n'Roll too young to die.
Hi What if the fields dont exist at all? What I mean is they arent anywhere in the database to be selected from. I'd be saying select from where but they arent anywhere.
Am I missing the point? |
 |
|
|
webfred
Flowing Fount of Yak Knowledge
Germany
8515 Posts |
Posted - 12/14/2012 : 07:03:14
|
I will try to make my example more clear 
select col1, col2, col3, 'A value that does not exists in any of the tables but I need it in the output.' AS HereComesTheNeededButNotExistingColName from ... where ...
Too old to Rock'n'Roll too young to die. |
 |
|
|
chipembele
Yak Posting Veteran
97 Posts |
Posted - 12/14/2012 : 07:07:45
|
| Thanks. i'll give it a go. I may be back for some more guidance :) |
 |
|
| |
Topic  |
|