parameter on append

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

PeterBaileyUkAsked:
Who is Participating?
 
Bhavesh ShahConnect With a Mentor Lead AnalysistCommented:
hi

if its mssql

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

INSERT INTO AbiBuilds ( abiCode, BuildYearMonth )
SELECT tClient.abiCode,  @BulidYearMonth
FROM tClient;
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.