Help with query not returning column name

Posted on 2014-08-01
Last Modified: 2014-08-02
help with this sql query.  It does not return the first column name for the Film_strCode.   I"m looking to only return the right 6 characters.  

SELECT    right(tblFilm.Film_strCode,6), tblFilm.Film_strTitle, tblFilm.Film_strCensor, tblFilm.Distrib_strCode, tblDistributor.Distrib_strName
FROM         tblFilm INNER JOIN
                      tblDistributor ON tblFilm.Distrib_strCode = tblDistributor.Distrib_strCode
Question by:JCONNELLY626
    LVL 29

    Accepted Solution

    It's because you are using a function on the column try:

    SELECT    right(tblFilm.Film_strCode,6) as Film_strCode, tblFilm.Film_strTitle, tblFilm.Film_strCensor, tblFilm.Distrib_strCode, tblDistributor.Distrib_strName
     FROM         tblFilm INNER JOIN
                           tblDistributor ON tblFilm.Distrib_strCode = tblDistributor.Distrib_strCode

    Author Closing Comment

    Thanks you, quite simple solution that allued me.  Learning this stuff on the fly, tried a few similar things but not this one.  I have another one I'll be posting shortly that I can't figure out.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
    Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

    732 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

    21 Experts available now in Live!

    Get 1:1 Help Now