Suppose I declared some variables in SPs.
DECLARE _R1 VARCHAR(25);
DECLARE _R2 DECIMAL(4,0);
DECLARE _R3 DECIMAL(3,0);
DECLARE _R4 DECIMAL(2,0);
How do I get their dimensions like 25, 4, 3, 2?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One option is to create a really long value.
Than put in the variable, and run the length() function on it. As it will keep only as much value as the definition says it returns the correct length.
Now remains to find out how to do this without affecting the current value.