cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Multirow inserts

Former Member
14,461

Sybase has the ability to make an insertion multi rows? If yes, what version is available? If not, has plans to develop?

View Entire Topic
Former Member
0 Likes

For older versions without the repeating values enhancement or where you might be doing a translation substitution, the following works..

  create table #E (idSituationCUR unsigned integer, txMessage char(150), idSeqRead integer default 0);  

-- using openxml to simplify the load and set a default value should the Join with -- CodelistTranslation fail to find a corresponding entry insert into #E (idSituationCUR, txMessage) select LOAD.idSituationCUR, isnull(CLT.txOther,LOAD.txOther) from OPENXML( string ('', '', '', '', ''), 'a/b' ) with ( idKey integer '@c1', txOther text '@c2', idSituationCUR unsigned integer '@c3') AS LOAD left outer join BOS.CodelistLanguage CLT on CLT.idCodelist = 238 and CLT.idLanguage = @idLanguage and CLT.idKey = LOAD.idKey;