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.
Author |
Topic |
duhaas
Constraint Violating Yak Guru
310 Posts |
Posted - 2006-09-11 : 13:58:49
|
I have the following:CREATE proc rs_sicsummary@state varchar(50),@month intasSELECT TOP 10 SicID, SicDescription AS [SIC Category], COUNT(*) AS [Total # Account with Sicid], SUM([Account Market Value]) AS [Account Total Market Value], monthendFROM SnapsRawWHERE (Branchstate = @state) AND (SicID <> '00') AND (SicID <> '99') AND monthend = @monthGROUP BY SicID, SicDescription, MonthEndORDER BY [Account Total Market Value] DESCGOwhen i run the following:exec RS_sicsummary 'Arizona' '20060801'i getLine 1: Incorrect syntax near '20060801'.new to writing SP's please bare with me |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2006-09-11 : 14:01:57
|
you are missing a <comma> between your input parameters when you exec the procedureBe One with the OptimizerTG |
 |
|
duhaas
Constraint Violating Yak Guru
310 Posts |
Posted - 2006-09-11 : 14:02:49
|
YOU DA MAN TG, I SUPPOSE IF I READ SOME DOCS I WOULD OF CAUGHT THAT> |
 |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2006-09-11 : 14:06:28
|
What a refreshing change to have someone post all the necessary information to solve a problem.>>I SUPPOSE IF I READ SOME DOCS I WOULD OF CAUGHT THATBooks Online...the other white meatBe One with the OptimizerTG |
 |
|
|
|
|