C
Carlos
Hello everybody,
I have made a form (new from Data Connection)with a data connection SQL
database. I have created a data source without any table, and an SQL
statement, the following:
SELECT DISTINCT t.Ticket
,t.Updated_By AS Ticket_Updated_By
,a.Updated_By AS Activity_Updated_By
,t.Summary
,t.Status
,count(*) as Num_Activities
FROM HD_Tickets t
JOIN HD_Ticket_Activity a
on t.ID = a.Ticket_ID
WHERE a.ID IN (SELECT a.ID
FROM HD_Ticket_Activity a
WHERE a.Ticket_ID = t.ID
AND a.Updated_By IN ('juan justo')
-- AND cast(floor(cast(a.Submit_Date as float)) as datetime)
-- BETWEEN CONVERT(datetime,'2006-01-23',120)
-- AND CONVERT(datetime,'2006-01-23',120)
)
GROUP BY t.Ticket
,t.Updated_By
,t.Summary
,a.Updated_By
,t.Status
The form is working properly, but I have a question, I would like Infopath
to ask me for some data before doing the 'query', for instance he
'Updated_By' and Dates that are shown in the SQL statement, I really don't
know how to integrate them,
any advise will be really appreciated,
The best regards,
Carlos
I have made a form (new from Data Connection)with a data connection SQL
database. I have created a data source without any table, and an SQL
statement, the following:
SELECT DISTINCT t.Ticket
,t.Updated_By AS Ticket_Updated_By
,a.Updated_By AS Activity_Updated_By
,t.Summary
,t.Status
,count(*) as Num_Activities
FROM HD_Tickets t
JOIN HD_Ticket_Activity a
on t.ID = a.Ticket_ID
WHERE a.ID IN (SELECT a.ID
FROM HD_Ticket_Activity a
WHERE a.Ticket_ID = t.ID
AND a.Updated_By IN ('juan justo')
-- AND cast(floor(cast(a.Submit_Date as float)) as datetime)
-- BETWEEN CONVERT(datetime,'2006-01-23',120)
-- AND CONVERT(datetime,'2006-01-23',120)
)
GROUP BY t.Ticket
,t.Updated_By
,t.Summary
,a.Updated_By
,t.Status
The form is working properly, but I have a question, I would like Infopath
to ask me for some data before doing the 'query', for instance he
'Updated_By' and Dates that are shown in the SQL statement, I really don't
know how to integrate them,
any advise will be really appreciated,
The best regards,
Carlos