title: get count and another values in stored procedure
body: <p>I have stored procedure like this:</p>
  
  <pre><code>ALTER procedure [dbo].[carcallvalidation]
  @carid nvarchar(100)=null
  as
  begin
      select count(*)t.TBarcode, t.Paid,t.Status,t.DelDate
      from Transaction_tbl t
      where TBarcode=@carid;
      declare @transid integer=null;
     select @transid= t1.transactID from Transaction_tbl t1 where TBarcode=@carid;
  if(select count(k.transactid) from KHanger_tbl k where k.transactid=@transid)&gt;0
  begin
  return 1
  end
  end
  </code></pre>
  
  <p>I want to get count of T.TBarcode
  while executing error coming like this:Incorrect syntax near '.'.</p>