Viewing 15 posts - 976 through 990 (of 4,080 total)
EdA ROC (7/19/2011)
Well, that is exactly what I did!. My notes from reading about indexes are not correct. I thought (wrote...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 19, 2011 at 8:44 am
The reason for the question was that if you are usually looking for all the forms belonging to a particular job, it might be a better idea to have the...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 19, 2011 at 8:37 am
That's fine, Theomed. I hope the CASE example was of help to you.
In the future, you might find it useful to read this article[/url] to see how...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 19, 2011 at 8:24 am
Look at the previous thread he posted at the top, Mike. The way you know is by the sequence of the rowIDs, in his base table.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 19, 2011 at 8:16 am
I'm assuming you are new to SQL, because (1) you have spaces in your column names and (2) you are asking us to list your source data together with totals...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 19, 2011 at 6:44 am
NVARCHAR(1) !!
I love it. I have to change my signature line now.
Seriously, I do want to ask a question, since you said that JobNum/FormNum is unique. ...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 18, 2011 at 8:51 pm
And also...
-- To make result = 0 when @test < 0
declare @test int -7
select (ABS(@test)+@test)/2 as result
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 18, 2011 at 8:44 pm
Use a cte, like so:
;with cte (newvalue) as (select COALESCE etc FROM sometable)
select case when newvalue < 0 then 0 else newvalue end as newvalue from cte
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 18, 2011 at 5:22 pm
I've glanced at the code and it may be possible to improve it. But it would be really nice to see the schema of the tables involved, including...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 18, 2011 at 3:56 pm
make this example dynamic based on unlimited exams (with 1 student per exam), students, tests and results
The way I read this, guys. He wants a solution that...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 18, 2011 at 2:57 pm
kramaswamy (7/18/2011)
I understand the relucatance to use loops in order to do set-based processing, but lets say you had a table which had a million records in it, and which...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 18, 2011 at 12:23 pm
From the article I deduced it is bad to use select , because you have possible multiple rows. SET doesn't allow for multiple rows, values, if it does then I...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 15, 2011 at 1:30 pm
Randy, search SSC for forums and articles with the keywords PIVOT or "cross tab", to see how you can turn rows into side by side columns. ...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 15, 2011 at 12:58 pm
As Per Vegas - you would miss me. I don't live there anymore.
Whups, sorry Jason. :blink:
You must have moved when I was absent from the...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 15, 2011 at 12:51 pm
jw: I can't seem to use the link you posted up.
But when populating variables from columns in a table, would you seriously use
set @a = (select column_A...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 15, 2011 at 10:59 am
Viewing 15 posts - 976 through 990 (of 4,080 total)