Viewing 15 posts - 1,711 through 1,725 (of 4,080 total)
There's nothing wrong with your CAST solution, andresito. It works perfectly for getting rid of the spare change.
The reason(s) I used the modulo operator is 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
March 25, 2010 at 2:49 pm
Perhaps its a limitation of the Pervasive db?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 2:16 pm
Happy to help. 🙂
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 12:21 pm
Grant Fritchey (3/25/2010)
The Dixie Flatline (3/25/2010)
ARID = Alternate Reality ID.I believe it's parameter 117, but I'd have to confirm that with Gail.
And that's a GUID right?
It...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 12:13 pm
You mean like this? Or am I missing something?
DECLARE @X XML
SELECT @X = ( SELECT * FROM sampleTable FOR XML AUTO )
SELECT @X as [@X]
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 12:00 pm
ARID = Alternate Reality ID.
I believe it's parameter 117, but I'd have to confirm that with Gail.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 11:48 am
Paul's solution will work. Just don't confuse it with the following code which will NOT work, in violation of the laws of algebra.
select amount
from ...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 11:44 am
Trey, it's possible they are relying on DBCC TIMEWARP to provide point-in-time recovery.
What is your ARID??
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 11:35 am
Sure... just test if it is evenly divisible by 1. The modulo operator (%) returns the remainder of a division operator, so if Amount % 1 = 0,...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 11:25 am
Actually, the original query is a cross-tab. It just uses a CTE instead of a subquery. The Case statements in the CTE convert the rows...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 10:59 am
Nabha, that looks like a winner to me.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 10:46 am
It depends on whether or not it depends? :w00t:
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 10:24 am
I'm about to start through Itzik Ben-Gan's "T-SQL Querying".
If I run across an explanation, I'll let you know.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 8:22 am
It's not a hack. It's just one more tool in the toolbox. If it significantly reduces the run time of a job, then it's 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
March 25, 2010 at 7:57 am
Paul White NZ (3/25/2010)
The Dixie Flatline (3/25/2010)
Tell me you have a life outside SQL.
(0 row(s) affected)
SOM 😛
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 25, 2010 at 7:49 am
Viewing 15 posts - 1,711 through 1,725 (of 4,080 total)