Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!lll-winken!iggy.GW.Vitalink.COM!widener!netnews.upenn.edu!msuinfo!news From: adc@tardis.cl.msu.edu (Alan D. Cabrera) Newsgroups: comp.databases Subject: SYBASE: APT SQL problems Message-ID: <1991Jun27.033322.12867@msuinfo.cl.msu.edu> Date: 27 Jun 91 03:33:22 GMT Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University Lines: 30 I'm using APT 4.0.2 and am having trouble using it find entries in my database. The two key fields in my table are varchar(5) and typically look like: bldg room ----- ----- 035 208 Note the blank space in front of the "035". In an APT SQL proc, the following piece of code sets flag to zero. submit sqlbegin select flag = (select count(*) from inventory where bldg = {sqlexpr(bldg)} and room = {sqlexpr(room)}) sqlend I know that the entry is in there. The bldg entry field in my APT form is set to " 035" and the room field to "208"; " 035 " does not work either. What could I be doing wrong? -- Alan Cabrera internet: adc@tardis.cl.msu.edu Michigan State University phone: (517) 353-3027 514a Computer Center fax: (517) 353-9847 East Lansing, MI 48824 bitnet: CABRERA@MSU