473,395 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Invalid column name 'ProjectQuestionContentDateTime'

I build the following:

USE [RG_ProjectData]
GO
CREATE PROCEDURE AddProjectQuestionContentFrequency
@ProjectQuestionId int,
@ProjectQuestionContent nvarchar(255),
@ProjectQuestionContentFrequency int,
@ProjectQuestionContentDateTime datetime
AS

SET NOCOUNT ON
select ProjectQuestionId, ProjectResponseContent, count (*) ProjectQuestionContentFrequency --------------give alias here
from ProjectResponse
WHERE ProjectQuestionContentDateTime> CAST( convert(VARCHAR(8),getdate(),112) as datetime)
group by ProjectQuestionId, ProjectResponseContent


INSERT INTO [ProjectQuestionContentFrequency] (
ProjectQuestionId,
ProjectQuestionContent,
ProjectQuestionContentFrequency,
ProjectQuestionContentDateTime)
VALUES (
@ProjectQuestionId,
@ProjectQuestionContent,
@ProjectQuestionContentFrequency,
@ProjectQuestionContentDateTime)
GO
I get the following error:

Msg 207, Level 16, State 1, Procedure AddProjectQuestionContentFrequency, Line 11
Invalid column name 'ProjectQuestionContentDateTime'.
Sep 28 '06 #1
2 2753
is the compatibily level for the database set st SQL 2005 (9.0) ?
try SQL 2000.
Oct 29 '06 #2
NeoPa
32,556 Expert Mod 16PB
It was defined earlier ('@ProjectQuestionContentDateTime') as a variable.
Is it possible that you've mixed up a column name with a variable name by mistake.
Oct 29 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: | last post by:
When I execute the following (with an OleDBDataAdapter), wanting to add a row to a visual foxpro table: myrow= datasetTarget.Tables(0).NewRow 'fill all columns here like.. row(i)= myvalue '...
1
by: chelleybabyger | last post by:
Using the below method, <% remaining_stock = cint(product_stock) - cint(chQuantity) %> <% sqlString = "UPDATE Products SET " &_ "product_stock='" & remaining_stock & "'," &_ "WHERE...
8
by: Shino | last post by:
Hi, Can anyone help with this error: "ORA-00904: invalid column name"? Thanks! SQL> create view PPFa as 2 SELECT L.UserID AS LecID, U.Name, U.Email, I.IntakeID, S.UserID AS StudID 3 FROM...
4
by: rawheiser | last post by:
Behavior I found: Invalid Column name in select embedded in a IN() clause appears to return a NULL, and fails silently - completing the query giving incorrect results. Behavior I expected: ...
2
by: adams114 | last post by:
I am having a strange problem with invalid type casts. I am trying to update a MS SQL Database with a stored procedure. When I setup the parameters collection for the command object I get a invalid...
3
by: graphicsxp | last post by:
Hi, I have a SQL stored procedure which looks like that: SELECT @QuerySQL = 'SELECT as LookupField, G.GroupDesc + ' + '" : "' + ' + as DescField FROM ' + 'JOIN ItemGrouping IG on IG.CatID...
9
by: mark4asp | last post by:
Why is this page invalid? Pasted into http://validator.w3.org/ I'm told that the page is invalid. Why? It flags problems with the <bodyand </htmltags but I can't see why. Is the W3C validator...
3
by: josna | last post by:
I am trying to execute following query but i am getting a sql exception i do not understand where i went wrong. it is saying invalid column name but i have given all fields and table names...
5
by: Anne | last post by:
Hello! Here is the statement in question: --STATEMENT A SELECT * FROM dbo.myTable WHERE colX in (SELECT colX FROM dbo.sourceTable) The problem with Statement A is that 'colX' does not exist...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.