I want to insert a record to a table with columns “A”, “B”, and “C”. In this record, the “B” column contains a NULL value. When I used table(12 as A, NULL as B, 13 as C)
, I encountered an error: Not allowed to create void vector
. Does anyone know how to solve this issue?
Asked
Active
Viewed 8 times
1

carbonhydrate
- 348
- 5
1 Answers
1
You need to use the appropriate NULL value representation based on the data type of the “B“ column. For example:
If the “B“ column is of INT type, use 00i
:
table(12 as A, 00i as B, 13 as C)
If the “B“ column is of SYMBOL type, use ''
:
table(12 as A, '' as B, 13 as C)

Eva Gao
- 402
- 1
- 7