Last active
August 20, 2024 09:41
-
-
Save ahndmal/44ce2092c979bfa41f45985f70e71599 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ast.scripts.db | |
import groovy.sql.Sql | |
import org.ofbiz.core.entity.TransactionFactory | |
import org.ofbiz.core.entity.ConnectionFactory | |
import java.sql.Connection | |
Connection connection = TransactionFactory.getConnection("defaultDS") | |
Connection connection2 = ConnectionFactory.getConnection("defaultDS") | |
Sql sql = new Sql(connection) | |
String GET_EMPL_CARD_FIELD_VALUE_QUERY = | |
"""SELECT ID FROM AO_8C2830_EMPLOYEE_CARD where EMPLOYEE_NAME = 'a.user'""" | |
String value = sql.firstRow(GET_EMPL_CARD_FIELD_VALUE_QUERY)["ID"] | |
sql.close() | |
value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment