T-SQL:  how to get the current column name

Posted on 2014-08-20
Last Modified: 2014-08-22
Hi, I am writing a cursor and I need to know column name for some cells.
Please advise, ideally with code sample.
Thank you in advance.
Question by:quasar_ee
    LVL 65

    Expert Comment

    by:Jim Horn
    Hi, your question is too vague to be actionable.
    Please advise in greater detail what you are trying to pull off here.
    Thank you in advance.
    LVL 75

    Accepted Solution

    Columns name will be in the cursor definition
    LVL 47

    Expert Comment

    show us the cursor you are writing

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Viewers will learn how the fundamental information of how to create a table.
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    734 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

    18 Experts available now in Live!

    Get 1:1 Help Now