Sunday, March 11, 2012
Apply Your Thought On Char To Int
IS THERE ANY PERFORMANCE IMPACT WHEN I USE "CHAR" AS A DATA TYPE INSTEAD OF USING "INT" FOR RETRIEVING DATA OR FOR SOME COMPLEX QUERY.
THANKS
WITH BEST REGARDS,
DHIRAJYes - and the result may not be what you expect since char comparison are different from numeric comparisons - if in your example you are storing only numbers in a char field.|||Originally posted by rnealejr
Yes - and the result may not be what you expect since char comparison are different from numeric comparisons - if in your example you are storing only numbers in a char field.
THANKS FOR YOUR KIND REPLY.
I WANT TO STORE ONLY THE NUMBER IN DATABASE.
IF I USE CHAR DATATYPE INSTEAD OF INT AND ALSO USE INDEX ON THAT FIELD.
THEN WHAT HAPPEN.. IS THERE PERFORMANCE IMPACT ON QUERY OR NOT.
PLS I WANT TO CLEAR THAT ACTUALY I ALWAYS USE INT WHEN I WANT TO STORE NUMBERIC(INT) DATA.
ONE FELLOW TOLD ME THAT NEVER USE INT. ALWAYS USE CHAR. IT IS GOOD PRACTICE. OTHERWISE U WILL FACE SO MANY PROBLEM IN FEATURE. IS IT CORRECT?????
I REPLY HIM THAT ONLY BECAUSE OF PERFORMANCE I USE INT INSTEAD OF CHAR.
THANKS
DHIRAJ|||A lot of accounting systems treat numbers as text,, sortof. The numeric data is stored in char fields. One of the big differences as mentioned in a previous post is the sorting. As Int fields 1, 2, 3, 10, 100, 101, 1000 get sorted ascending in that order, if stored as char the same numbers would be sorted ascending as 1, 10, 100, 1000, 101, 2, 3 (I may have 101 and 1000 swapped but you can still see the difference). If you have to connect to an accounting system to update/retrieve data that might influence decisions on which datatype to use. Personally I prefer the int value.
Apply code to parameter before query execution
retrieving the data set? I have a table with an encrypted account number
field. The encryption is done at the application level using the .NET
encryption libraries. I need to prepare a report retrieving the transactions
for a particular account. Obviously, I cannot use the plain text account
number as the query parameter. I need to take the user input, encrypt it, and
then use the encrypted value as the parameter. I could perform the encryption
on one of the asp.net pages and pass the encrypted value as a url parameter,
but I would prefer to allow the users to type in the account number on the
report page itself. Is there a way to do this? (I am using SQL Server 2000
Reporting Services, not 2005) Thanks!No problem. When you tie a report parameter to a query parameter you can
first manipulate it in an expression. The fact that they are two different
things (query parameter versus report parameter) is very important.
In the dataset tab click on the ..., parameters tab. This is where the
mapping occurs. On the right instead of selecting the parameter select
expression.
Your expression would look like this:
= Code.Mycode(Parameters!MyParam.value)
You can do code behind report or you can use custom assemblies. Search books
online using the work Code.
There are hoops to go through with custom assemblies, mostly dealing with
permissions. I haven't done this myself but plenty of people have.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Joel Daniels" <JoelDaniels@.discussions.microsoft.com> wrote in message
news:DE91CBA6-67D0-4EBD-A07B-9F6B770DEFF9@.microsoft.com...
> Hello, is there any way to perform custom calcuations on a parameter
> before
> retrieving the data set? I have a table with an encrypted account number
> field. The encryption is done at the application level using the .NET
> encryption libraries. I need to prepare a report retrieving the
> transactions
> for a particular account. Obviously, I cannot use the plain text account
> number as the query parameter. I need to take the user input, encrypt it,
> and
> then use the encrypted value as the parameter. I could perform the
> encryption
> on one of the asp.net pages and pass the encrypted value as a url
> parameter,
> but I would prefer to allow the users to type in the account number on the
> report page itself. Is there a way to do this? (I am using SQL Server 2000
> Reporting Services, not 2005) Thanks!
Thursday, February 9, 2012
Anyone who can help me the solve the strange problem
Hi,
i encountered a very strange problem when using SSIS, the oledb source convert some fields in retrieving the data from oracle database,the datatype of the target field is NUMBER(5,1), and all the data retrieved from it have the uniform 'x.y', and remained same when i previewed the data in the oledb source,but the output of the data changed to 'x', the data converted to integer, anyone knows how to solve the problem please let me know, thanks a lot.
Where is this output that you are looking at ? The output of the OLE DB Source?
If so, it could be that the externl columns have been mapped to the wrong pipeline types. Check this out in the OLE DB Source Advanced Editor.
-Jamie
|||Do you have anything between the source and destination that might be converting the data?|||
Jamie Thomson
thanks for your kindly help, the problem i mentioned above has been solved.
|||icewill wrote:
Jamie Thomson
thanks for your kindly help, the problem i mentioned above has been solved.
Icewill,
I 've the same problem, question how did you solved it?
Thanks in advance.
Olaf
Anyone who can help me the solve the strange problem
Hi,
i encountered a very strange problem when using SSIS, the oledb source convert some fields in retrieving the data from oracle database,the datatype of the target field is NUMBER(5,1), and all the data retrieved from it have the uniform 'x.y', and remained same when i previewed the data in the oledb source,but the output of the data changed to 'x', the data converted to integer, anyone knows how to solve the problem please let me know, thanks a lot.
Where is this output that you are looking at ? The output of the OLE DB Source?
If so, it could be that the externl columns have been mapped to the wrong pipeline types. Check this out in the OLE DB Source Advanced Editor.
-Jamie
|||Do you have anything between the source and destination that might be converting the data?|||
Jamie Thomson
thanks for your kindly help, the problem i mentioned above has been solved.
|||icewill wrote:
Jamie Thomson
thanks for your kindly help, the problem i mentioned above has been solved.
Icewill,
I 've the same problem, question how did you solved it?
Thanks in advance.
Olaf