Solved

sql - query returning no column name when name is specified

Posted on 2013-12-04
3
370 Views
Last Modified: 2013-12-10
Hi

The following query is returning no column name when then name 'iOutDistributionid' is specified
niether
select *,@iDistributionid as 'iOutDistributionid' from #tmpDistribution
nor
select *,@iDistributionid as [iOutDistributionid] from #tmpDistribution
work
the data ie @iDistributionid is in each row ok

eg
customerid [no colomn name]
1                   1
2                   1
0
Comment
Question by:louise_8
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
duttcom earned 100 total points
Comment Utility
Have you tried without the quotes or square brackets? I never use any text qualifiers when creating aliases for columns.
0
 

Author Comment

by:louise_8
Comment Utility
yes I tried that first, no luck
0
 

Author Closing Comment

by:louise_8
Comment Utility
thanks
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now