January 2, 2009 at 10:41 am
I'm not getting the exact value when i tried to decrypt the encrypted value if i use int value.
SELECT seed_time,seed_encrypt,
CONVERT(int,DecryptByPassphrase(@pass, seed_encrypt)) AS Decrypt_Seedtime
FROM TestTable
if i use seed_time as varchar it is returning exact value.. if i use int data type for seed_time it's giving some other value not the exact seed_time value.
Please help me on this
January 4, 2009 at 5:30 pm
i want to compare the encrypted_seed_time value with compare_date. How should i write the DATEDIFF with the encrypted_seed_time (when seed_time is in seconds).
Below is the query where the seed_time is in seconds. and the query is working fine.
I want if the seed_time value is encrypted how we have to compare encrypted seed_time value with the datediff..
SELECT COUNT(prize_id)
FROM iw.prizes_seeds
WHERE prize_id = prz.prize_id
AND seed_time BETWEEN DATEDIFF(ss,@compare_date,pp.start_date) AND DATEDIFF(ss,@compare_date,pp.end_date)
)AS prize_count
Please help me on this.
January 5, 2009 at 12:16 am
try using CAST insted of CONVERT,
CAST(decryptbypassphrase(@pass, seed_encrypt) as int)
January 5, 2009 at 8:25 am
i tried with cast also.. but its not giving the same value..
please help me on this
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply