dbTalk Databases Forums  

Table name starting with prefix tbl

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Table name starting with prefix tbl in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
plmanikandan@gmail.com
 
Posts: n/a

Default Table name starting with prefix tbl - 03-21-2007 , 10:39 AM






Hi,
I would like to know details about the table name starts with prefix
in sql server 2000.
Actually i'm working on existing code.
The existing code insert a record into a table, but the table name in
the code and table name in database are different
Table name in database : tbl_mmm_ox
In coding they are using table name as mmm only, the records are
properly inserted into mmm table
is it possible?
The sample code is like that(using ado object)
oCmd.CommandText = "INSERT INTO mmm (no,name) values (1,"mm")"
The above code is perfectly working and inserting record into
tbl_mmm_ox.
Could anybody explain how is it possible?
whether we can leave the prefix(tbl) and suffix(ox) and sql server
take care of this?


Thanks & Regards,
Mani


Reply With Quote
  #2  
Old   
AlterEgo
 
Posts: n/a

Default Re: Table name starting with prefix tbl - 03-21-2007 , 11:01 AM






Mani,

Someone probably created a view called mmm that points to the tbl_mmm_ox
physical table.

-- Bill

<plmanikandan (AT) gmail (DOT) com> wrote

Quote:
Hi,
I would like to know details about the table name starts with prefix
in sql server 2000.
Actually i'm working on existing code.
The existing code insert a record into a table, but the table name in
the code and table name in database are different
Table name in database : tbl_mmm_ox
In coding they are using table name as mmm only, the records are
properly inserted into mmm table
is it possible?
The sample code is like that(using ado object)
oCmd.CommandText = "INSERT INTO mmm (no,name) values (1,"mm")"
The above code is perfectly working and inserting record into
tbl_mmm_ox.
Could anybody explain how is it possible?
whether we can leave the prefix(tbl) and suffix(ox) and sql server
take care of this?


Thanks & Regards,
Mani




Reply With Quote
  #3  
Old   
Jack Vamvas
 
Posts: n/a

Default Re: Table name starting with prefix tbl - 03-21-2007 , 01:45 PM



Sounds like a View

--

Jack Vamvas
___________________________________
Advertise your IT vacancies for free at - http://www.ITjobfeed.com



<plmanikandan (AT) gmail (DOT) com> wrote

Quote:
Hi,
I would like to know details about the table name starts with prefix
in sql server 2000.
Actually i'm working on existing code.
The existing code insert a record into a table, but the table name in
the code and table name in database are different
Table name in database : tbl_mmm_ox
In coding they are using table name as mmm only, the records are
properly inserted into mmm table
is it possible?
The sample code is like that(using ado object)
oCmd.CommandText = "INSERT INTO mmm (no,name) values (1,"mm")"
The above code is perfectly working and inserting record into
tbl_mmm_ox.
Could anybody explain how is it possible?
whether we can leave the prefix(tbl) and suffix(ox) and sql server
take care of this?


Thanks & Regards,
Mani




Reply With Quote
  #4  
Old   
plmanikandan@gmail.com
 
Posts: n/a

Default Re: Table name starting with prefix tbl - 03-21-2007 , 02:26 PM



On Mar 21, 7:45 pm, "Jack Vamvas" <DEL_TO_RE... (AT) del (DOT) com> wrote:
Quote:
Sounds like a View

--

Jack Vamvas
___________________________________
Advertise your IT vacancies for free at -http://www.ITjobfeed.com

plmanikan... (AT) gmail (DOT) com> wrote in message

news:1174495141.918629.74950 (AT) d57g2000hsg (DOT) googlegroups.com...

Hi,
I would like to know details about the table name starts with prefix
in sql server 2000.
Actually i'm working on existing code.
The existing code insert a record into a table, but the table name in
the code and table name in database are different
Table name in database : tbl_mmm_ox
In coding they are using table name as mmm only, the records are
properly inserted into mmm table
is it possible?
The sample code is like that(using ado object)
oCmd.CommandText = "INSERT INTO mmm (no,name) values (1,"mm")"
The above code is perfectly working and inserting record into
tbl_mmm_ox.
Could anybody explain how is it possible?
whether we can leave the prefix(tbl) and suffix(ox) and sql server
take care of this?

Thanks & Regards,
Mani
Thanks friends.It's view only.find that view after posting this
message.
Is it wise to use a view to insert the record.
Is there any performance issue may come due to this view.
I would like to know the opinion on this?

Thanks & Regards,
Mani





Reply With Quote
  #5  
Old   
Jack Vamvas
 
Posts: n/a

Default Re: Table name starting with prefix tbl - 03-21-2007 , 02:52 PM



what would be the goal of inserting via the VIEW rather than inserting into
the underlying tables?
it depends on the complexity and who your users are?

--

Jack Vamvas
___________________________________
Advertise your IT vacancies for free at - http://www.ITjobfeed.com



<plmanikandan (AT) gmail (DOT) com> wrote

Quote:
On Mar 21, 7:45 pm, "Jack Vamvas" <DEL_TO_RE... (AT) del (DOT) com> wrote:
Sounds like a View

--

Jack Vamvas
___________________________________
Advertise your IT vacancies for free at -http://www.ITjobfeed.com

plmanikan... (AT) gmail (DOT) com> wrote in message

news:1174495141.918629.74950 (AT) d57g2000hsg (DOT) googlegroups.com...

Hi,
I would like to know details about the table name starts with prefix
in sql server 2000.
Actually i'm working on existing code.
The existing code insert a record into a table, but the table name in
the code and table name in database are different
Table name in database : tbl_mmm_ox
In coding they are using table name as mmm only, the records are
properly inserted into mmm table
is it possible?
The sample code is like that(using ado object)
oCmd.CommandText = "INSERT INTO mmm (no,name) values (1,"mm")"
The above code is perfectly working and inserting record into
tbl_mmm_ox.
Could anybody explain how is it possible?
whether we can leave the prefix(tbl) and suffix(ox) and sql server
take care of this?

Thanks & Regards,
Mani

Thanks friends.It's view only.find that view after posting this
message.
Is it wise to use a view to insert the record.
Is there any performance issue may come due to this view.
I would like to know the opinion on this?

Thanks & Regards,
Mani






Reply With Quote
  #6  
Old   
Roy Harvey
 
Posts: n/a

Default Re: Table name starting with prefix tbl - 03-21-2007 , 04:00 PM



On Wed, 21 Mar 2007 20:52:37 -0000, "Jack Vamvas"
<DEL_TO_REPLY (AT) del (DOT) com> wrote:

Quote:
what would be the goal of inserting via the VIEW rather than inserting into
the underlying tables?
it depends on the complexity and who your users are?
I rather suspect the reason for the views in this particular case was
to be able to avoid the silly tbl prefix and _ox suffix without
breaking something else.

Roy Harvey
Beacon Falls, CT


Reply With Quote
  #7  
Old   
Hugo Kornelis
 
Posts: n/a

Default Re: Table name starting with prefix tbl - 03-21-2007 , 04:53 PM



On 21 Mar 2007 13:26:33 -0700, plmanikandan (AT) gmail (DOT) com wrote:

(snip)
Quote:
Is it wise to use a view to insert the record.
Hi Mani,

A common reason to do this is if the table holds more columns than the
view. For instance audit columns, that are filled with a DEFAULT
constraint and that should not be overwritten by the INSERT statement.

Quote:
Is there any performance issue may come due to this view.
Probably not, but it depends on how the view is defined, if it's updated
through a trigger and if so, how the trigger is written.

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis


Reply With Quote
  #8  
Old   
DickChristoph
 
Posts: n/a

Default Re: Table name starting with prefix tbl - 03-25-2007 , 09:56 PM



Hi

Quote:
Is it wise to use a view to insert the record.
Is there any performance issue may come due to this view.
I would like to know the opinion on this?
Well you can set up partitioned Views when the view is the Union of many
tables. The tables can then be stored on multiple physical drives. and the
partioning takes care of putting the data in the right table based on the
partioning column.

-Dick Christoph


<plmanikandan (AT) gmail (DOT) com> wrote

Quote:
On Mar 21, 7:45 pm, "Jack Vamvas" <DEL_TO_RE... (AT) del (DOT) com> wrote:
Sounds like a View

--

Jack Vamvas
___________________________________
Advertise your IT vacancies for free at -http://www.ITjobfeed.com

plmanikan... (AT) gmail (DOT) com> wrote in message

news:1174495141.918629.74950 (AT) d57g2000hsg (DOT) googlegroups.com...

Hi,
I would like to know details about the table name starts with prefix
in sql server 2000.
Actually i'm working on existing code.
The existing code insert a record into a table, but the table name in
the code and table name in database are different
Table name in database : tbl_mmm_ox
In coding they are using table name as mmm only, the records are
properly inserted into mmm table
is it possible?
The sample code is like that(using ado object)
oCmd.CommandText = "INSERT INTO mmm (no,name) values (1,"mm")"
The above code is perfectly working and inserting record into
tbl_mmm_ox.
Could anybody explain how is it possible?
whether we can leave the prefix(tbl) and suffix(ox) and sql server
take care of this?

Thanks & Regards,
Mani

Thanks friends.It's view only.find that view after posting this
message.
Is it wise to use a view to insert the record.
Is there any performance issue may come due to this view.
I would like to know the opinion on this?

Thanks & Regards,
Mani






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.