Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL Create Table for phone number formatting

Author  Topic 

tinamiller1
Yak Posting Veteran

78 Posts

Posted - 2014-07-15 : 13:58:25
I am trying to get my SQL create table to work for my phone number formatting and it is not. When I create the below code, the default is set to 3 numbers only.


CREATE SET TABLE dl_qpt_cqe.contacts, NO FALLBACK ,NO BEFORE JOURNAL,NO AFTER JOURNAL
(contact_id integer not null ,contact varchar(50) , jobtitle varchar(50), dept varchar(50), phone integer format '999-999-9999', phone_ext varchar(10), email varchar(50), constraint pk primary key (contact_id));


Is there some other way I need to format the phone portion so the default is 999-999-9999?

tina m miller

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-07-15 : 14:16:07
It appears you are not using Microsoft SQL Server. You will find better answers on a site that specialized in the technology that you are using.

I would imagine that the data type is the problem though as dashes are not valid integer characters.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -