parameter on append

Posted on 2012-09-20
Last Modified: 2012-09-21
I would like the query to ask for the year month. in my query at present it is wriiten in to the sql how do i add as a parameter?

INSERT INTO AbiBuilds ( abiCode, BuildYearMonth )
SELECT tClient.abiCode, "2012-09" AS Expr1
FROM tClient;

Open in new window

Question by:PeterBaileyUk
    1 Comment
    LVL 19

    Accepted Solution


    if its mssql

    Declare @BulidYearMonth Varchar(10)
    SET @BulidYearMonth = '2012-09'

    INSERT INTO AbiBuilds ( abiCode, BuildYearMonth )
    SELECT tClient.abiCode,  @BulidYearMonth
    FROM tClient;

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    In database programming, custom sort order seems to be necessary quite often, at least in my experience and time here at EE. Within the realm of custom sorting is the sorting of numbers and text independently (i.e., treating the numbers as number…
    Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    731 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

    15 Experts available now in Live!

    Get 1:1 Help Now