Viewing 15 posts - 6,316 through 6,330 (of 7,636 total)
I don't see any data type definitions. Should we just assume that all columns are varchars?
July 11, 2008 at 10:14 pm
"It's not getting what you want, .. it's wanting what you've got."
July 11, 2008 at 9:30 pm
Like this:
DECLARE @PMH as varchar(500)
SELECT @PMH=''
SELECT @PMH=p.TextBody
FROM dbo.PartyText p
WHERE p.DataPointID=186
And p.PartyID=19396
print @PMH
July 11, 2008 at 9:24 pm
Jeff Moden (7/11/2008)
rbarryyoung (7/11/2008)
this was never possible with the old syntaxThat's not true...
Hey, I just realized... This is the post that you broke 10,000 on! :w00t:
Woo, hooo! Makes...
July 11, 2008 at 8:50 pm
The canonical way to do this is to OR the values to gether and then test the Negative bit (or just test the final result for negative). Unfortunately, there...
July 11, 2008 at 8:35 pm
What are you hoping to get from us?
July 11, 2008 at 3:58 pm
GSquared (7/11/2008)
The NullIf thing will only work if the value is -1 (or am I missing something). I'm assuming the possibility exists for any valid negative integer.
Oops, you are...
July 11, 2008 at 3:23 pm
Peso (7/11/2008)
If you run the suggested code PM, you will not get today's beginning.
Declare @Today smalldatetime
-- beginning of today:
Select @Today = Cast(Cast(getdate() as int) as smalldatetime)...
July 11, 2008 at 3:20 pm
You need to use TOP with an ORDER BY clause to give it what BOL calls "a meaningful chronology":
update TOP (1) s
set [past effective date 1] = s.effective_date
...
July 11, 2008 at 3:14 pm
I think that this works too:
Select Count(NullIf(values,-1))-Count(values) From table
Probably not any faster than Gus's, but I guess it'll help those out aching fingers 🙂
Of course, now that I look at...
July 11, 2008 at 3:06 pm
Loner (7/11/2008)
July 11, 2008 at 11:58 am
I agree with Lynn.
Using commas is the older, "SQL-89" syntax and it is deprecated now.
Using "JOIN" is the newer "SQL-92" syntax and it IMHO much preferred because:
1) It is...
July 11, 2008 at 11:27 am
I think that you might have the wrong idea, Mike. Like Lynn, I started to look at this a couple of days ago, but after an hour or so...
July 11, 2008 at 11:20 am
Viewing 15 posts - 6,316 through 6,330 (of 7,636 total)