🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.sqlinfo
Article #246

first one only

#246
From: Stuart Askham
Date: Mon, 09 Oct 2000 00:00
19 lines
1262 bytes
Please help a SQL virgin!

I've wrote the following code (there is obviously more but this is the part
that is causing the problem!) which access a process computer data base. It
loops round batch numbers and selects records that fulfill the requirement.
The problem is that there are several records which fulfill the requirement
so I only want the first one to be displayed..

begin

select UniqueID, batch ID, PValue, Descript, lcltime from RMNT
where ((convert(int,UNiqueID)) = @ Unique ID and
Recipe like "%CHT%" and PValue LIKE "%Begin%"

select @UniqueID = (@UniqueID +1)

end

Thaks in advance
Technical Details
Message-ID: <8rt9dv$279$1@news5.svr.pol.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11355a,2345681b7c4cf3d4,start
X-Google-Attributes: gid11355a,public
From: "Stuart Askham" <stuart@askhams.freeserve.co.uk>
Subject: first one only
Date: 2000/10/09
Message-ID: <8rt9dv$279$1@news5.svr.pol.co.uk>
X-Deja-AN: 679452897
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Complaints-To: abuse@theplanet.net
X-Trace: news5.svr.pol.co.uk 971122943 2281 62.136.22.18 (9 Oct 2000 20:22:23 GMT)
Organization: Customer of Energis Squared
X-MSMail-Priority: Normal
NNTP-Posting-Date: 9 Oct 2000 20:22:23 GMT
Newsgroups: bit.listserv.sqlinfo