Viewing 15 posts - 1 through 15 (of 66 total)
Called, some one did, hm?
The path to becoming a jedi is made possible by using clear, precise logic in your code.
A WHERE clause with join criteria and filters-- long it...
December 17, 2004 at 8:08 am
Yes!
And worse: IN and Not IN() require single-column primary keys. This leads beginners to deduce: every table must have an single-column (and thus, often, an identity) PK,...
December 17, 2004 at 8:01 am
Explain what your magic "isZero()" function is doing.
Replace 0 with another value it does, like Isnull()? If so, what value should be returned?
if you want NULL returned, you may use...
December 14, 2004 at 7:31 am
In this case, simple logic in the WHERE will suffice:
WHERE fa.EffEndDate=(SELECT MAX(fa2.EffendDate) FROM #LAccounts fa2 WHERE Fa2.accountnumber=fa.accountnumber)
or fa.EffEndDate is null
December 13, 2004 at 4:52 pm
Thank you for the compliment, Mr Rock Moose
December 13, 2004 at 1:59 pm
That doesn't give all permutations, and it also doesn't return a GroupID per group created.
December 13, 2004 at 1:59 pm
It is simply binary !
for 4 names:
0000
0001
0010
0011
0100
..etc ...
1111
1 = include the name, 0 = exclude.
For each group:
GroupID = integer representation of the bits
Members = all ID's in which the bit...
December 13, 2004 at 1:17 pm
declare @time varchar(10);
set @time= '09:00:00'
select convert(Datetime, convert(varchar(10), getdate(),101) + ' ' + @time)
December 13, 2004 at 10:33 am
Still confused on terminology:
Are you assigning Invoice Numbers or Line/Item Numbers to each line in the resultset for that 1 invoice?
i.e., this process is always generating 1 invoice or multiple...
December 13, 2004 at 9:25 am
I'd like to help if you can give more details of this process. tell us step by step what you are tyring to do.
i.e.,
step 1 -- import CSV file
step...
December 13, 2004 at 8:34 am
Yoda is confused -- are you updating/changing data in your database, or just producing a report? (don't say both -- these are two completely separate concepts!)
If it is just...
December 13, 2004 at 8:11 am
It depends if GroupID has any meaning. if it is just to group each distinct set, then no difference.
if there must be some logic as to how groupID...
December 13, 2004 at 7:52 am
Please give sample data and what you want to do.
I guarantee you need neither dynamic SQL, nor a cursor.
Are you familiar with the UPDATE statement in T-SQL? It allows...
December 13, 2004 at 7:50 am
warning (for my method and others):
if large amounts of data you have, results grow even larger.
For N names, possible groups = 2^N - 1.
This means only 32 names = 4,294,967,295
possible...
December 13, 2004 at 7:47 am
-- This is our data:
declare @Vals table (ID int)
insert into @vals
select 1 union
select 2 union
select 3 union
select 4 union
select 5
-- we need numbers, from 1 through 2 ^ (#...
December 13, 2004 at 7:40 am
Viewing 15 posts - 1 through 15 (of 66 total)