[AccessD] Function Error

Gustav Brock Gustav at cactus.dk
Fri Jan 27 12:39:36 CST 2006


Hi Mike

I suspect this to be the bad guy:

  Mid([inmates].[sid],(Len([inmates].[sid])-1),1) AS BinRowNum

Try to replace it for a test with:

  '0' AS BinRowNum

and run:

  SELECT SID FROM qryInmatesBinNumberUpdate WHERE BinRowNum = '0'

I guess that could be replaced with:

  Val(Right([inmates].[sid],1)) AS BinRowNum

and then it will be numeric, thus you could try:

  SELECT SID FROM qryInmatesBinNumberUpdate WHERE BinRowNum = 0

/gustav

>>> Mike.W.Gowey at doc.state.or.us 27-01-2006 18:56:21 >>>
This is the SQL of qryInmatesBinNumberUpdate:

SELECT Mid([inmates].[sid],(Len([inmates].[sid])-1),1) AS BinRowNum,
Inmates.SID, Inmates.Namef, Inmates.Namel, Inmates.Namem, Inmates.DOB,
Inmates.Cell, Inmates.Race, Inmates.Custody, Inmates.Age,
Inmates.HasBlues
FROM Inmates
WHERE (((Inmates.Cell) Not Like "DS*" And (Inmates.Cell) Not Like "IM*"
And (Inmates.Cell) Not Like "IN*" And (Inmates.Cell) Not Like "M-*" And
(Inmates.Cell) Not Like "S-*" And (Inmates.Cell)<>"") AND ((Exists
(SELECT SID FROM FTLaun WHERE FTLaun.SID = Inmates.SID))=False) AND
((Exists (SELECT SID FROM BinNumSIDAssign WHERE BinNumSIDAssign.SID =
Inmates.SID))=False))
ORDER BY Mid([inmates].[sid],(Len([inmates].[sid])-1),1), Inmates.SID; 

-----Original Message-----
From: Gustav Brock [mailto:Gustav at cactus.dk] 
Sent: Friday, January 27, 2006 10:54 AM
To: accessd at databaseadvisors.com 
Subject: Re: [AccessD] Function Error

Hi Mike

So what is the SQL of qryInmatesBinNumberUpdate?

/gustav





More information about the AccessD mailing list