Hi
1)I'm using SQl server 2000,how can I use dynamic sql to pass different
tables' name in a sql statement,I'd be thankful if you give an example.
2)I want to use the calculate field to join some columns instead of
concatination of them in different views,at first: is it a good idea?,
second: does it reduce the speed of fetching data when I'm selecting from
that table?
example: emp(emp_no,emp_name , emp_family, emp_desc)
insted of selecting emp_no + emp_name ,make emp_no + emp_name as a
calculated field.
Thanks,> 1)I'm using SQl server 2000,how can I use dynamic sql to pass different
> tables' name in a sql statement,I'd be thankful if you give an example.
Check out http://www.sommarskog.se/dynamic_sql.html before you go down that
slippery slope.
> 2)I want to use the calculate field to join some columns instead of
> concatination of them in different views,at first: is it a good idea?,
> second: does it reduce the speed of fetching data when I'm selecting from
> that table?
> example: emp(emp_no,emp_name , emp_family, emp_desc)
> insted of selecting emp_no + emp_name ,make emp_no + emp_name as a
> calculated field.
It's generally best to request columns individually and format data in the
presentation layer. This will make your application more scalable.
Hope this helps.
Dan Guzman
SQL Server MVP
"maryam rezvani" <rezvani@.parskhazar.net> wrote in message
news:%23$qrByADFHA.3688@.TK2MSFTNGP14.phx.gbl...
> Hi
> 1)I'm using SQl server 2000,how can I use dynamic sql to pass different
> tables' name in a sql statement,I'd be thankful if you give an example.
> 2)I want to use the calculate field to join some columns instead of
> concatination of them in different views,at first: is it a good idea?,
> second: does it reduce the speed of fetching data when I'm selecting from
> that table?
> example: emp(emp_no,emp_name , emp_family, emp_desc)
> insted of selecting emp_no + emp_name ,make emp_no + emp_name as a
> calculated field.
> Thanks,
>
No comments:
Post a Comment