Hi
We have an issue with BODS and SQL Server. We have tables that have default constraints managed by the server, and which BODS is not allowed to apply a value for.
Take a look on this sample table:
--drop table testDefaultValue
create table testDefaultValue
(
Col1 int not null,
Col2 varchar(30) not null,
Col3 varchar(30) not null constraint df_testDefaultValue_col3 default 'Default Value',
[Action] varchar(100) not null
)
So far the solution was not to map these columns to begin with when adding them to the data store. This led to BODS creating SQL that did not apply any values to these columns, and SQL Server used the default value.
/*1 - insert a row with out the column that has the default constraint*/
insert into testDefaultValue (Col1, Col2,Action)
values (1,'something','insert a row with out the column that has the default constraint');
select *
from testDefaultValue as tdv;
However, we want to be able to do initial load, and here we would like to provide the values for these columns for the full load data flows only. Therefore we must add these columns to the data store definition.
What I need to know is how I can make BODS to use the default key word in SQL, as a value for a column:
/*2 - insert a row providing a value for all 3 columns*/
insert into testDefaultValue (Col1, Col2, Col3,Action)
values (2,'something', 'manualy added value', 'insert a row providing a value for all 3 columns');
select *
from testDefaultValue as tdv;
/*3 - insert a row using the default keyword*/
insert into testDefaultValue (Col1, Col2, Col3, Action)
values (3,'something', default, 'insert a row using the default keyword');
select *
from testDefaultValue as tdv;
How can I make bods act like the third insert query?[/code]
asrafi (BOB member since 2013-01-23)