• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Question Linked Server Sql - Get Sequence Value

#1
Hi all

We have an external program that inserts data into one of our progress database. They have set up linked server within Microsoft sql-server. Today we can connect and insert records into the progress database (10.2b).

But we would like to take use of a sequence that is defined in our database. How must we write the sql to get next value on a sequence to work ?

We have tried db.pub.seqname.netxval without any luck. (Note that we are doing this from our .NET solution using normal odbc and it works fine there.

Code:
SET @VismaInvoiceNr = (Select VismaInvoiceNR from ...)

Insert sDB.sDB.pub.invoice([SequenceNr],[VismaInvoiceNr])
values (pub.VismaInvoiceSequence.NEXTVAL, @VismaInvoiceNr)