Hidding column in query

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • W. Adam

    Hidding column in query

    Here is my code.

    SELECT [Owner].[First Name], [Owner].[Last Name], [Condo].[Unit Number],
    [Condo].[Weekly Rate], [Condo].[Linens]

    FROM [Owner], [Condo]

    WHERE [Condo].[Linens]=True

    AND [Owner].[Owner ID]=[Condo].[Owner ID]

    ORDER BY [Condo].[Unit Number];





    I am trying to not display "Linens" column in my query result.Any idea how
    can i achive that. Thanks in advance




  • Erland Sommarskog

    #2
    Re: Hidding column in query

    W. Adam (wogla@sbcgloba l.net) writes:[color=blue]
    > Here is my code.
    >
    > SELECT [Owner].[First Name], [Owner].[Last Name], [Condo].[Unit Number],
    > [Condo].[Weekly Rate], [Condo].[Linens]
    > FROM [Owner], [Condo]
    > WHERE [Condo].[Linens]=True
    > AND [Owner].[Owner ID]=[Condo].[Owner ID]
    > ORDER BY [Condo].[Unit Number];
    >
    > I am trying to not display "Linens" column in my query result.Any idea how
    > can i achive that. Thanks in advance[/color]

    Well, just don't display it!

    Seriously, this is likely to be a GUI issue, and you should probably
    ask in a forum devoted to the GUI tool you are using.


    --
    Erland Sommarskog, SQL Server MVP, sommar@algonet. se

    Books Online for SQL Server SP3 at
    SQL Server 2025 redefines what's possible for enterprise data. With developer-first features and integration with analytics and AI models, SQL Server 2025 accelerates AI innovation using the data you already have.

    Comment

    • BenignVanilla

      #3
      Re: Hidding column in query


      "W. Adam" <wogla@sbcgloba l.net> wrote in message
      news:tL5Cb.1123 6$aw2.5741825@n ewssrv26.news.p rodigy.com...[color=blue]
      > Here is my code.
      >
      > SELECT [Owner].[First Name], [Owner].[Last Name], [Condo].[Unit Number],
      > [Condo].[Weekly Rate], [Condo].[Linens]
      >
      > FROM [Owner], [Condo]
      >
      > WHERE [Condo].[Linens]=True
      >
      > AND [Owner].[Owner ID]=[Condo].[Owner ID]
      >
      > ORDER BY [Condo].[Unit Number];
      >
      >
      >
      >
      >
      > I am trying to not display "Linens" column in my query result.Any idea how
      > can i achive that. Thanks in advance[/color]

      There are two answers to this question. The first being, just don't select
      the field

      SELECT [Owner].[First Name], [Owner].[Last Name], [Condo].[Unit Number],
      [Condo].[Weekly Rate]
      FROM [Owner], [Condo]
      WHERE [Condo].[Linens]=True
      AND [Owner].[Owner ID]=[Condo].[Owner ID]
      ORDER BY [Condo].[Unit Number];

      - or -

      If you need the linens value but don't want to display it, handle this in
      business layer (class, dll, module, mts, etc.), or your presentation layer
      (application, web page, etc.).

      BV.



      Comment

      Working...