on ‎2012 Oct 07 9:53 PM
Sybase has the ability to make an insertion multi rows? If yes, what version is available? If not, has plans to develop?
Request clarification before answering.
The multiple values option in 12.0.0 is great; but if you have an old version or want to do some SQL substitutions related to a fixed set of data in your Stored Procedure, try using OpenXML. I do the following when building up a set of error messages that I want to hardcode (for maintenance reasons) into the code and that have to be translated using tables in system:
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 c1="6201" c2="REF" c3="',@kSituation_APPENDED,'"/>',
'<b c1="6202" c2="CODE USED BY 2+ ITEMS, FIX ONLINE ONLY" c3="',@kSituation_MULTICDs,'"/>',
'<b c1="6203" c2="UNKNOWN/CAN ADD" c3="',@kSituation_NOTFOUND,'"/>',
'</a>'),
'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;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.