cancel
Showing results for 
Search instead for 
Did you mean: 

Assign constant values in query - BODS

former_member601762
Participant
0 Kudos

Hi Guys,

I'd like to ask a basic question.

Source table has 30 fields. Target table has 40 fields, 10 are not mapped and null is not allowed in target. I want to populate the 10 fields with constant value ''. How can I do it in query(transfer)?

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

werner_daehn
Active Contributor
0 Kudos

Best would be to add a new query transform and before adding any output columns, connect this query to the target. When a query without columns is connected to a target, all the target columns are copied as outputs in the query for you.

Hence you should see in the right upper list all columns and when you click on any of the output column, the mapping area below the input/ouput panes will be empty. It is not mapped yet.

You can type a mapping, e.g. 0 for an integer field and hence this output field will have that value for all rows.

The other fields you simply drag from left over the output field to say COL1 should be mapped to COL1. The mapping formula will reflect that.

vinaya_hg
Participant
0 Kudos

Hi David ,

In the query transform , in the output select the field ,we can find mapping as one tab along with from and where),there we can give assign constant values .

Thanks,

Vinaya

vijender_sangwan
Explorer
0 Kudos

Hi David,

If you just need to assign Constants, easy to do it in the Query Transform,

Just click on the field in the Target in Query and assign a default value in double braces.

Thanks,

Vijender