<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can I Select * in Query Builder, or Trim an individual column when using a select * statement? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774969#M39756</link>
    <description>I’m afraid this still hits the same issue—I’d need to name every column if I was going to grab all except one, right? So I wouldn’t be using SELECT *. So if that day’s data generated a different # of columns, I would miss them since they would not be named in my SELECT statement.</description>
    <pubDate>Mon, 18 Oct 2021 18:49:55 GMT</pubDate>
    <dc:creator>Boswser</dc:creator>
    <dc:date>2021-10-18T18:49:55Z</dc:date>
    <item>
      <title>Can I Select * in Query Builder, or Trim an individual column when using a select * statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774865#M39750</link>
      <description>I have a run I inherited that transposes data. For some reason, this transpose sticks 30+ empty spaces in front of the NOV2018 values, so the requester has to trim it and has asked if I can prevent that issue.&lt;BR /&gt;&lt;BR /&gt;I inserted a Query Builder step to trim, but noticed that the number of columns generated by the run depends on the data. So the columns I grab with the query builder are not always there, causing the run to fail. &lt;BR /&gt;&lt;BR /&gt;I’m looking into using PROC SQL language to achieve this instead of QB, but I am running into a similar issue. I need to use SELECT * to make sure I grab each column that’s created, but I can’t trim down the date column without naming it in the SELECT statement. If I name the columns, I run into the same problem as QB.&lt;BR /&gt;&lt;BR /&gt;Is there a way to SELECT * in QB or PROC SQL and still be able to trim a named column?</description>
      <pubDate>Mon, 18 Oct 2021 12:09:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774865#M39750</guid>
      <dc:creator>Boswser</dc:creator>
      <dc:date>2021-10-18T12:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Select * in Query Builder, or Trim an individual column when using a select * statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774913#M39751</link>
      <description>No, if you use * you cannot TRIM the same column in the same step. You can in the next step. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Oct 2021 15:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774913#M39751</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-18T15:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Select * in Query Builder, or Trim an individual column when using a select * statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774918#M39752</link>
      <description>I understand, that’s what I figured. Unfortunately if I do a new step where I need to name all the columns in order to trim one (since I still need all the columns), it creates the same issue—missing any new columns that may have been created in the initial data pull.&lt;BR /&gt;&lt;BR /&gt;My workaround for this right now is to so SELECT *, date_column so that I have two copies of the date column and I am able to trim the one named in the select statement. Better than nothing!</description>
      <pubDate>Mon, 18 Oct 2021 15:45:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774918#M39752</guid>
      <dc:creator>Boswser</dc:creator>
      <dc:date>2021-10-18T15:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Select * in Query Builder, or Trim an individual column when using a select * statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774927#M39753</link>
      <description>Then you can do a select from the two column result down to single column.</description>
      <pubDate>Mon, 18 Oct 2021 17:02:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774927#M39753</guid>
      <dc:creator>HB</dc:creator>
      <dc:date>2021-10-18T17:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Select * in Query Builder, or Trim an individual column when using a select * statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774961#M39754</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/386967"&gt;@Boswser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have a run I inherited that transposes data. For some reason, this transpose sticks 30+ empty spaces in front of the NOV2018 values, so the requester has to trim it and has asked if I can prevent that issue.&lt;BR /&gt;&lt;BR /&gt;I inserted a Query Builder step to trim, but noticed that the number of columns generated by the run depends on the data. So the columns I grab with the query builder are not always there, causing the run to fail. &lt;BR /&gt;&lt;BR /&gt;I’m looking into using PROC SQL language to achieve this instead of QB, but I am running into a similar issue. I need to use SELECT * to make sure I grab each column that’s created, but I can’t trim down the date column without naming it in the SELECT statement. If I name the columns, I run into the same problem as QB.&lt;BR /&gt;&lt;BR /&gt;Is there a way to SELECT * in QB or PROC SQL and still be able to trim a named column?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Perhaps time to look at the code doing the TRANSPOSE of the data and address the issue at the start instead of fixing later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 18:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774961#M39754</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-18T18:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Select * in Query Builder, or Trim an individual column when using a select * statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774968#M39755</link>
      <description>It’s done in a Transpose step in SAS EG. I did look at the code of the step and there’s nothing there indicating addition of spaces as far as I can tell. Though I admit I am unfamiliar with PROC TRANSPOSE. &lt;BR /&gt;&lt;BR /&gt;The code starts with a PROC SORT, and the PROC TRANSPOSE looks like this:&lt;BR /&gt;&lt;BR /&gt;    DATA=WORK.SORTTempTableSorted&lt;BR /&gt;    OUT=WORK.TRNSTransposed(LABEL=“Transposed WORK.TEST2”)&lt;BR /&gt;    PREFIX=Column&lt;BR /&gt;    NAME=Source&lt;BR /&gt;    LABEL=Label&lt;BR /&gt;    ;&lt;BR /&gt;    BY Col1 Col2 Col3 Col4;&lt;BR /&gt;    VAR name_column date_column;&lt;BR /&gt;&lt;BR /&gt;Is anything in there responsible for the added spaces in date_column?&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Oct 2021 18:47:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774968#M39755</guid>
      <dc:creator>Boswser</dc:creator>
      <dc:date>2021-10-18T18:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Select * in Query Builder, or Trim an individual column when using a select * statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774969#M39756</link>
      <description>I’m afraid this still hits the same issue—I’d need to name every column if I was going to grab all except one, right? So I wouldn’t be using SELECT *. So if that day’s data generated a different # of columns, I would miss them since they would not be named in my SELECT statement.</description>
      <pubDate>Mon, 18 Oct 2021 18:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-I-Select-in-Query-Builder-or-Trim-an-individual-column-when/m-p/774969#M39756</guid>
      <dc:creator>Boswser</dc:creator>
      <dc:date>2021-10-18T18:49:55Z</dc:date>
    </item>
  </channel>
</rss>

