Viewing 15 posts - 676 through 690 (of 1,923 total)
But i must say, dont pad zeros to the cast values and store. Let the values be cast to interger and stored. This will give you lot of flexibility. Padding...
August 29, 2011 at 7:50 pm
Try this newer version
DECLARE @TabValue TABLE ( Value NVARCHAR(50) )
INSERT INTO @TabValue
SELECT '1239484848484848484'
UNION ALL SELECT ' ...
August 29, 2011 at 7:48 pm
Check this out :
DECLARE @TabValue TABLE ( Value NVARCHAR(50) )
INSERT INTO @TabValue
SELECT '1239484848484848484'
UNION ALL SELECT ' 12345'
UNION ALL SELECT '1234567890'
UNION ALL SELECT '12345 ...
August 29, 2011 at 7:31 pm
How about this?
; WITH CharsConvertedToDate AS
(
SELECT ID , SomeValue , FourCharDate ,
RN = ROW_NUMBER() OVER ( PARTITION BY SomeValue ORDER BY CAST...
August 29, 2011 at 5:49 pm
The solution is going to be very very tough and even if it does, it wont scale up at all..
August 29, 2011 at 11:07 am
And this:
SELECT cast( (( 10 * 1.0 ) / 50 ) AS DECIMAL(4,2))
August 29, 2011 at 10:53 am
Try this:
SELECT ( 50 * 1.00 ) / 100
And are u sure 50/100 is 0.2 ?? 😀
August 29, 2011 at 10:52 am
We can. TO add to what i already said, it is going to be a complicated method, and it will get ugly when we have inconsistent number values for each...
August 29, 2011 at 10:41 am
I second Lutz here, it is pure Permutation problem. Unless we have predefined rules on what to be chosen first when a Permutation Sum is matched, it is a painful...
August 29, 2011 at 10:40 am
Possible, but will not scale that better. I can think of one solution
1. UNVPIVOT all rows
2. Collect DISTINCT Data Values
3. Use CASE Statements to PIVOT them back.
You able to get...
August 29, 2011 at 9:22 am
Check these out ( comment out NULLs in the table and see for yourself how things behave )
declare @FirstTable Table( A int )
insert into @FirstTable
...
August 27, 2011 at 10:41 pm
August 27, 2011 at 10:24 pm
Try LEFT JOIN with NULLs
SELECT @newProjectId,project.id
FROM project
LEFT JOIN ProjectControl
ON ProjectControl.ProjectId = project.id
WHERE project.id IS NULL
{Edit : Gave a...
August 27, 2011 at 10:20 pm
Which one you want to be chosen ? Session_id = 2 or Session_id = 3 ?
August 26, 2011 at 4:12 pm
And i am NOT quite clear with ur ask.can you elaborate more?
August 26, 2011 at 3:39 pm
Viewing 15 posts - 676 through 690 (of 1,923 total)