Article View: dk.edb.database
Article #15351Re: [MS SQL 7] GROUP BY - på bit-kolonne
From: Lauritz Jensen
Date: Thu, 24 May 2001 19:29
Date: Thu, 24 May 2001 19:29
22 lines
2098 bytes
2098 bytes
Jesper Stocholm wrote: > > JH <jimmy@dk2net.dk> wrote in <8cingt0o3a6t18n414nmbrsfd5772tnaea@4ax.com>: > > >> Er der nogen mulighed for at lave en GROUP BY p� en bit-kolonne > >Note: You cannot use GROUP BY or HAVING on ntext, text, image, or bit > >columns unless they are in a function that returns a value having > >another data type, such as SUBSTRING or CAST. > > ja ... og det var ogs� det jeg pr�vede at komme ud over i min > SQL-statement med anvendelsen af [CAST] , hvor feltet ignorant er > en bit-kolonne ... men fors�ges konverteret/CAST'et til en smallint. > > Er min anvendelse/kombination forkert ? Ja, det vil jeg tro. Pr�v: SELECT firstname, lastname, CAST(ignorant as smallint) AS ignorant FROM table GROUP BY firstname, lastname, CAST(ignorant as smallint) -- Lauritz
Technical Details
Message-ID:
<3B0D6130.1F2EFE21@hotmail.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.maxwell.syr.edu!newsfeed.icl.net!news.algonet.se!algonet!news000.worldonline.se!newsfeed01.se.dataphone.net!nntp.se.dataphone.net!newsrouter.euroconnect.net!news100.image.dk!news010.worldonline.dk.POSTED!not-for-mailReferences:
<Xns90AA9E3C31AFDspamstocholmdk@153.80.109.11> <8cingt0o3a6t18n414nmbrsfd5772tnaea@4ax.com> <Xns90ABD4C13D01Fspamstocholmdk@192.38.208.81>Show Full Headers
Complete Article Headers
X-Google-Language: DANISH,ASCII X-Google-Thread: fcdf9,ffbf9e0f89c9c28f X-Google-Attributes: gidfcdf9,public X-Google-ArrivalTime: 2001-05-24 12:30:07 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.maxwell.syr.edu!newsfeed.icl.net!news.algonet.se!algonet!news000.worldonline.se!newsfeed01.se.dataphone.net!nntp.se.dataphone.net!newsrouter.euroconnect.net!news100.image.dk!news010.worldonline.dk.POSTED!not-for-mail Message-ID: <3B0D6130.1F2EFE21@hotmail.com> From: Lauritz Jensen <lauritz2@hotmail.com> Organization: - X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: dk.edb.database Subject: Re: [MS SQL 7] GROUP BY - på bit-kolonne References: <Xns90AA9E3C31AFDspamstocholmdk@153.80.109.11> <8cingt0o3a6t18n414nmbrsfd5772tnaea@4ax.com> <Xns90ABD4C13D01Fspamstocholmdk@192.38.208.81> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Lines: 22 Date: Thu, 24 May 2001 21:29:52 +0200 NNTP-Posting-Host: 213.237.43.17 X-Complaints-To: news-abuse@wol.dk X-Trace: news010.worldonline.dk 990732573 213.237.43.17 (Thu, 24 May 2001 21:29:33 MET DST) NNTP-Posting-Date: Thu, 24 May 2001 21:29:33 MET DST