cancel
Showing results for 
Search instead for 
Did you mean: 

Using parameters in UDOs

Former Member
0 Kudos

I'm trying to execute this query, but it says: "Must select a table to select from". First time I tried this without variables but it was the same error. I don't know if its possible, but thanks before hand.

DECLARE @FechaInicio DATETIME

DECLARE @FechaFinal DATETIME

SET @FechaInicio = '[%0]'

SET @FechaFinal = '[%1]'

SELECT

  T0.DocEntry,

  T0.DocNum,

  T0.U_Fecha,

  T0.U_Owner,

  T0.U_OwnerName,

  T0.U_Inicio,

  T0.U_Fin,

  T0.U_Activo,

  T1.U_Oportunidad,

  T1.U_Cotizacion,

  T1.U_Codigo,

  T1.U_Cliente,

  T1.U_Articulo,

  T1.U_Grupo,

  T1.U_CtroCosto,

  T1.U_Cantidad,

  T1.U_Pendiente,

  T1.U_CantTotal,

  T1.U_Obra,

  T1.U_Inicio,

  T1.U_Final,

  T1.U_Obs,

  T1.U_ObsInc,

  T1.U_Revisado

FROM

  [@PRESMENSUAL] T0

  INNER JOIN [@MENSUAL_BLOCK] T1 ON T0.DocEntry = T1.DocEntry

WHERE

  T0.U_Inicio >= @FechaInicio AND T0.U_Inicio <= @FechaFinal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try to add [dbo]. for both UDO to see.

Thanks,

Gordon

Former Member
0 Kudos

Thanks a lot! It worked so nice!

Answers (0)