469,278 Members | 2,391 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,278 developers. It's quick & easy.

Commands not available in 2005 Express

Hi all, I'm having some trouble getting commands to be available. Certain commands are grayed out, and i'm assuming not working.

For example I copied this code from online:

SELECT h.USERID, c.KEY1,
CASE srectype
WHEN 'A' THEN 'Appointments'
WHEN 'C' THEN 'Calls'
ELSE 'Nothing'
END AS ContactType,
COUNT(h.USERID) AS Total_Contacts,
COUNT(CASE WHEN resultcode BETWEEN 0 AND 4 THEN 1 ELSE NULL END) AS Contacts_Made,
COUNT(CASE WHEN resultcode = 4 THEN 1 ELSE NULL END) AS Sales
FROM CONTHIST h INNER JOIN
CONTACT1 c ON h.ACCOUNTNO = c.ACCOUNTNO
WHERE (h.USERID = @userident)
AND (h.ONDATE BETWEEN @startdate AND @enddate)
AND (h.SRECTYPE IN ('A', 'C'))
GROUP BY h.USERID, c.KEY1, h.SRECTYPE
ORDER BY h.USERID, c.KEY1, h.SRECTYPE


http://www.codeguru.com/forum/showthread.php?t=372235



From that bit of code the following commands are gray:
BETWEEN
AND
NULL
INNER JOIN
IN


I can only assume that i'm doing something fundamentally wrong. Is there a setting i'm missing in SQL Server Managment Studio EXpress to make these available? Do I need to 'import' anything?

TIA
Feb 29 '08 #1
1 950
ck9663
2,878 Expert 2GB
Hi all, I'm having some trouble getting commands to be available. Certain commands are grayed out, and i'm assuming not working.

For example I copied this code from online:

SELECT h.USERID, c.KEY1,
CASE srectype
WHEN 'A' THEN 'Appointments'
WHEN 'C' THEN 'Calls'
ELSE 'Nothing'
END AS ContactType,
COUNT(h.USERID) AS Total_Contacts,
COUNT(CASE WHEN resultcode BETWEEN 0 AND 4 THEN 1 ELSE NULL END) AS Contacts_Made,
COUNT(CASE WHEN resultcode = 4 THEN 1 ELSE NULL END) AS Sales
FROM CONTHIST h INNER JOIN
CONTACT1 c ON h.ACCOUNTNO = c.ACCOUNTNO
WHERE (h.USERID = @userident)
AND (h.ONDATE BETWEEN @startdate AND @enddate)
AND (h.SRECTYPE IN ('A', 'C'))
GROUP BY h.USERID, c.KEY1, h.SRECTYPE
ORDER BY h.USERID, c.KEY1, h.SRECTYPE


http://www.codeguru.com/forum/showthread.php?t=372235



From that bit of code the following commands are gray:
BETWEEN
AND
NULL
INNER JOIN
IN


I can only assume that i'm doing something fundamentally wrong. Is there a setting i'm missing in SQL Server Managment Studio EXpress to make these available? Do I need to 'import' anything?

TIA
Did you execute the query? Some query editor "gray out" to stress reserve words. I have not used SQL Express before but most of those keywords are basics of t-sql so I assume they would work, sometimes even cross-platform. Try executing the code or try to create simple queries using them.

Happy coding

-- CK
Feb 29 '08 #2

Post your reply

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

Similar topics

10 posts views Thread by Bonj | last post: by
12 posts views Thread by Selva Chinnasamy | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.