Author Message
Nesbit421
Joined: Feb 24, 2020
Messages: 51
Offline
I wish I knew Java better, but I don't know all the formatting. If I could get help from the javascript folks in here that would be great. I need to make a SQL Server DB call to get a record.

The query is more advanced than the OD tool allows:

Select
distinct t.tag_tail, t.person_id, p.phone_area_code + p.phone_number
From sysadm.tag t
JOIN (select max(tag_date) tag_date, tag_tail from sysadm.tag group by tag_tail) a
on t.tag_tail = a.tag_tail and t.tag_date = a.tag_date
JOIN sysadm.person p on t.person_id = p.person_id
WHERE t.tag_tail = @tag
AND tag_stat <> 'DEAD'

In the end, I need to store the value (p.person_id) to a variable called 'personID'. Attached is the datasource info.

Thanks in advance!
  • [Thumb - datasourceNEW.jpg]
[Disk] Download
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
I suggest you use a stored procedure for this.
Nesbit421
Joined: Feb 24, 2020
Messages: 51
Offline
Ok...what is happening to the replies to my posts? Are they getting deleted for some reason?
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
Interesting. I didn't know anybody could delete messages. I've seen some change things. Maybe just post your message again.
Go to:   
Mobile view