Thanks for any help!-m
--SQLAlchemy -The Python SQL Toolkit and Object Relational MapperTo post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.---You received this message because you are subscribed to the Google Groups "sqlalchemy" group.To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/CAOLfK3UWDoh4n%2BQpj%3DBDOK616TpOEfn46ZQ%2BCo88c5VQyVK%3DZA%40mail.gmail.com.
On Tue, Apr 20, 2021, at 1:52 PM, 'Matt Zagrabelny' via sqlalchemy wrote:Greetings SQLAlchemy,I'm attempting to use the next_value function to get the (next) value from a sequence:cycle_counter = next_value(Sequence('cycle_seq'))print(cycle_counter)However, the print statement yields:<next sequence value: cycle_seq>Does anyone know the correct way to get the value of a sequence?you should execute that with a connection:with engine.connect() as conn:conn.scalar(seq.next_value())