Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.sqlserver.programming > #31371

Re: CTE Query

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups microsoft.public.sqlserver.programming
Subject Re: CTE Query
Date Thu, 08 Oct 2020 19:56:05 +0200
Organization Erland Sommarskog
Lines 16
Message-ID <XnsAC50CAC977519Yazorman@127.0.0.1> (permalink)
References <3eda523f-5a68-4182-b6ab-2003ca3d293en@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Injection-Info reader02.eternal-september.org; posting-host="d329bb09f9fc291998036c33cdd2eb17"; logging-data="21427"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tItzVzkboHYhupSynx4EH"
User-Agent Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32)
Cancel-Lock sha1:eZu2o1XPEs+KdH0HvArknkxQpQ4=
Xref csiph.com microsoft.public.sqlserver.programming:31371

Show key headers only | View raw


Bimith Kunhiraman (bimithgmc@gmail.com) writes:
> using with cte , i need to skip row when the mnmIPDetails column has
> null values which means each user login Ttime two rows will be added in
> this case i need only one row which containing mnmIPDetails. Below
> written script will fetch all records. 

WHERE mnmIPDetails IS NOT NULL?

Please keep in mind the people you are talking have no knowledge of your
table or business problem? If my out-of-the blue guess does not answer
your question, my advice is that you post 2) CREATE TABLE statements for
your table(s), 2) INSERT statements with sample data, enough to illustrate 
all angles of the problem. 3) The expected result given the sample data. 4) 
A short description of the business rules why you want result, 5) The output 
from "SELECT @@version" so that we know which version of SQL Server you are 
using.

Back to microsoft.public.sqlserver.programming | Previous | NextPrevious in thread | Find similar


Thread

CTE Query Bimith Kunhiraman <bimithgmc@gmail.com> - 2020-10-08 01:45 -0700
  Re: CTE Query Erland Sommarskog <esquel@sommarskog.se> - 2020-10-08 19:56 +0200

csiph-web