select stcode, shortnamethai, (select lockno, rcvno, lockname, ipaddress from…
- User
select stcode, short_name_thai, (select lockno, rcvno, lockname, ipaddress from posterminal where status = 'a') from pospara
- Assistant
The SQL query you provided has a few issues that need fixing for it to work correctly. The subquery trying to select multiple columns from
posterminaltable is not valid in the projection list of a main query. Instead, you can use a JOIN or a correlated subquery, depending on the relationship betweenposparaandposterminaltables.Here's an example of how you might want to rewrite the query using a JOIN, assuming there's a common field to join on (I'll use as an example; you might need to adjust it based on your actual schema):
- User
Private Sub Items_ItemAdd(ByVal Item As Object) If TypeOf Item Is Outlook.MailItem Then Dim Email As Outlook.MailItem Set Email = Item
code' Process emails received after Outlook started If Email.ReceivedTime >= OutlookStartTime Then ' Check for specific keywords 'If CheckKeywords(Email.subject, Array("logbatch")) And CheckKeywords(Email.subject, Array("ERROR")) Then If CheckKeywords(Email.subject, Array("Logbatch", "OK")) Then Call RunAny("D:\Prapun\Email_Trigger\Sound_Alert\run-task.bat") Call RunAny("cmd echo > error.log") End Ifmake create error.log file
- Assistant