jim7567g
Posts: 38
|
| Posted: 01/02/2005, 12:20 PM |
|
Hello, I am trying to understand how to incorporate the SQL Parameter into my query.
Can someone explain the syntax for this?

Thank you.
_________________
Jim |
 |
 |
peterr
Posts: 5971
|
| Posted: 01/02/2005, 1:24 PM |
|
Not sure if you wanted to explain the syntax of the SQL query or the SQL paremeter. Generally I can see that your SQL is wrong and should contain:
"TimeStamp={TimeStamp}" instead of "TimeStamp=???????".
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
jim7567g
Posts: 38
|
| Posted: 01/02/2005, 1:32 PM |
|
I guess I am asking for help, when I add the {TimeStamp} variable I get an sql error. I was wondering how I'm supposed to enter the syntax at the point where I have the ????????
Any help would be greatly appreciated.
Thanks
_________________
Jim |
 |
 |
peterr
Posts: 5971
|
| Posted: 01/02/2005, 1:45 PM |
|
I think that the syntax should be the one that I provided above, so you should just replace ??????? with {TimeStamp}.
However there may be a number of other things wrong with your syntax, therefore I recommend that you debug your SQL as shown in the Debugging section of the CCS documentation.
For example some databases may require "#" around dates and then your syntax may need to be
#{TimeStamp}#. Other databases may use TimeStamp as a reserved SQL word.
Thus I recommend that you debug and run your SQL directly in the database to see if it works at all.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
peterr
Posts: 5971
|
| Posted: 01/02/2005, 1:47 PM |
|
I meant, try to run such SQL directly in your database:
... WHERE TimeStamp=2004-01-02 ...
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
jim7567g
Posts: 38
|
| Posted: 01/02/2005, 1:48 PM |
|
Thank you very much, so the bottom line is that when I set up any parameter in the SQL Parameter window I then use {variable} in the query where it is needed and of course using the correct format for the database.
_________________
Jim |
 |
 |
peterr
Posts: 5971
|
| Posted: 01/02/2005, 1:51 PM |
|
Yep. The parameter should be identified in curly brackets {} within the SQL, and then it will be replaced with the value based on the parameter's configuration.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |