Hello again,
I cannot add the DLL for being too complex but I added the stored procedure
if it can be of help.
Thanks again.
SELECT dbo.CLAIMS.CLAIM_ID, dbo.CONCESIONARIO.CONCESIONARIO_NOMBRE,
dbo.COMERCIALES.COMERCIAL_APELLIDOS,
CAST(dbo.CLAIMS.DATE_OF_CLAIM AS DATETIME) AS D_CLAIM,
dbo.CLAIMS.AGENT_ID
FROM dbo.CLAIMS INNER JOIN
dbo.CLIENTS ON dbo.CLAIMS.CLIENT_ID =
dbo.CLIENTS.CLIENT_ID INNER JOIN
dbo.AGENTS ON dbo.CLAIMS.AGENT_ID =
dbo.AGENTS.AGENT_ID AND
dbo.CLAIMS.AGENT_ID = dbo.AGENTS.AGENT_ID
WHERE (dbo.CLAIMS.AGENT_ID = @Agent) AND (CAST(dbo.CLAIMS.DATE_OF_CLAIM
AS DATETIME) BETWEEN @D_Start AND
@D_End)
ORDER BY dbo.CLAIMS.CLAIM_ID
"Adam Machanic" <amachanic@hotmail._removetoemail_.com> escribió en el
mensaje news:OzgE40bzFHA.1028@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view] > I'm not really understanding your question, then. Can you provnide DDL
> and sample data, as well as the full query?
>
> See:
www.aspfaq.com/etiquette.asp?id=5006 >
>
> --
> Adam Machanic
> SQL Server MVP
>
http://www.datamanipulation.net > --
>
>
> "Ana" <nospam@yahoo.com> wrote in message
> news:eb0MLibzFHA.3188@TK2MSFTNGP14.phx.gbl...
>> Hello Adam,
>> I added the ORDER BY clause but didn't make a change.
>>
>> "Adam Machanic" <amachanic@hotmail._removetoemail_.com> escribió en el
>> mensaje news:OozPWoZzFHA.3856@tk2msftngp13.phx.gbl...
>>> Do you need to add an ORDER BY clause to your query?
>>>
>>> There is never implicit ordering guaranteed for any query.
>>>
>>>
>>> --
>>> Adam Machanic
>>> SQL Server MVP
>>>
http://www.datamanipulation.net >>> --
>>>
>>>
>>> "Ana" <nospam@yahoo.com> wrote in message
>>> news:ex8IwdZzFHA.2212@TK2MSFTNGP15.phx.gbl...
>>>> Hi,
>>>>
>>>> In a stored procedure I've a WHERE condition which asks for the
>>>> following date parameters:
>>>>
>>>> BETWEEN @D_Start AND @D_End
>>>>
>>>> When I run the query, the window comes up with D_END and then with
>>>> D_Start.
>>>>
>>>> The strange thing is that D_Start should come up first and then D_End.
>>>> An other phenomenon is that D_End is converted to upper case to D_END.
>>>>
>>>> I'm lost. Why is this happening?
>>>>
>>>> TIA
>>>>
>>>> Ana
>>>>
>>>>
>>>
>>>
>>
>>
>
>