Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Invalid Column Name

Author  Topic 

sue1969
Starting Member

1 Post

Posted - 2011-09-04 : 09:39:22
I need help on finding what why I'm getting this error message when I type in the test set folder name in the sql statement.

SELECT TS_NAME, count(RN_RUN_ID) Executed
FROM TEST, RUN, CYCLE, CYCL_FOLD
WHERE RN_TEST_ID = TS_TEST_ID
AND CY_CYCLE_ID = RN_CYCLE_ID
AND CF_ITEM_ID = CY_FOLDER_ID
AND RN_STATUS in ('Failed', 'Passed')
AND CF_ITEM_ID in ("02 Release 45")
group by TS_TEST_ID, TS_NAME

The test lab folder tree looks like this:

02 Release 45 (New Folder)
01 System Testing Phase One (New Folder)(also linked to Cycle)
Generate report member <50 years (test set folder)
Generate report member >50 years (test set folder)


I thought the Test Set Folder is "02 Release 45" which is the high level folder containing the test sets. However, I tried '01 System Testing..." and even the actual test set folder "Generate report member..." also receiving same error message.

Am I missing a link in my query?


Susan

Kristen
Test

22859 Posts

Posted - 2011-09-04 : 10:09:16
Maybe "Executed" or "RUN" etc. are reserve words? Try putting brackets around then

SELECT TS_NAME, count(RN_RUN_ID) [Executed]
FROM [TEST], [RUN], [CYCLE], CYCL_FOLD
...

I think you need single quoted around the string:

AND CF_ITEM_ID in ('02 Release 45')
Go to Top of Page
   

- Advertisement -