Viewing 15 posts - 11,851 through 11,865 (of 18,923 total)
I'm reading it but I don't see how this can be bad. Care to explain some more?
September 7, 2006 at 2:29 pm
N stands for unicode in a literal string.
Kind of like doing CAST('this text to ' AS nVarchar(4000))
September 7, 2006 at 2:11 pm
That is just personal taste... I don't like to have to add them when I need to change the code... or forget to add 'em and insert a bug in...
September 7, 2006 at 10:59 am
SELECT cliente, COUNT(cdu_slaok) AS Total , SUM(CASE WHEN cdu_slaok = '1' THEN 1 ELSE 0 END) AS SLA_OK,
CAST(SUM(CASE WHEN cdu_slaok = '1' THEN 1 ELSE 0 END)AS DECIMAL)*100...
September 7, 2006 at 10:37 am
There's no syntaxe error in that query. Post the query that is giving you the error.
September 7, 2006 at 10:00 am
Please post the entire query... most message by themselves are not very easy to debug... unless you only want vague pointers
.
September 7, 2006 at 9:40 am
You have 2 columns name Total... that might be the problem.
September 7, 2006 at 9:31 am
Then once you prensent the data you will format it... also much easier to do client side than sql server.
September 7, 2006 at 9:14 am
Where are you presenting that data to anyone?? This is where you format it. Sql server is supposed to be used mainly as a data repository... but that's changing now...
September 7, 2006 at 8:46 am
I would use Lynn's version since it's shorter, but that'll give you a chance to learn a little more tsql
.
If TSQL we use...
September 7, 2006 at 8:44 am
You can only use case in a query. here you are stuck with the good old if statement :-).
Need help with that one?
September 7, 2006 at 8:24 am
We can't see an image unless you post it on a webserver. You can always manually tell us whta operations take the longest.
September 7, 2006 at 8:07 am
Viewing 15 posts - 11,851 through 11,865 (of 18,923 total)