on 12-03-2015 10:43 PM
Buenas tardes, necesito crear un procedimiento de autorización basado en una consulta, por favor me pueden ayudar, la consulta es la siguiente:
SELECT
(case when sum(T0.[DocTotal])>T2.[CreditLine] then 'Y' else 'N' end)
FROM
OPOR T0
INNER JOIN POR1 T1 ON T0.[DocEntry] = T1.[DocEntry]
INNER JOIN OCRD T2 ON T0.[CardCode] = T2.[CardCode]
WHERE
datepart(wk,T0.[DocDate]) = datepart(wk,getdate()) and
datepart(yy,T0.[DocDate]) = datepart(yy,getdate())
GROUP BY
T2.[CreditLine]
Les agradezco la ayuda que me puedan brindar.
Saludos,
Cerrado el Post
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.