April 19, 2007 at 7:38 pm
hi pipz,
i have read this article and it helped me a lot.. tnx
Querying System Tables
Regular Columnist : Raj Vasant
Posted: 10/20/2006
i have created a dynamic function that created at runtime a block of code(it is an insert statement) that can be used in different tables in our database because, you see i have been making insert, update and delete procedures for each modules for the past one year, actually it very tiring and time cosuming.. and i have come to think, "what if i will create a function that returns a varchar value and if called, will be executed". I will only pass parameters like the datable name, where i can get the columns of the table using syscolumns.name and other details.
i vae successfully created a function for insert, but as i review the code, (xml implementation)
...
WITH(
DesignationId int, SalaryPeriod int, DepartmentId int, PayrollPeriod varchar, Remarks varchar )
..
as your have notice the datatype for the column PayrollPeriod and Remarks is varchar, the problem is it does not specify the length , i need the length of the datatype varchar? how can i get it? it is stated that the default length of a varchar datatype is 50, but user-defined length for each column..
tnx..
Godbless
April 19, 2007 at 10:22 pm
Please don't cross-post...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply