Thread: 2 questions
View Single Post

   
  #1 (permalink)  
Old 05-02-2008, 05:05 AM
F Tahbaz
 
Posts: n/a
Default 2 questions

1) How can I insert a column into my table DATA, and make it my
primary key (that will just be a number starting at 1 and increasing n
+1)...

2) I have a column named DATEID in a table DATA that contains the
following format connected to each other(date and name):

20071030Jones
20071020Smith
20070918Rogers
20080122Williams
etc..

What would the syntax be to insert a column to the right of this one,
and extract the first 8 digits from the data in the DATEID column and
insert that into the new column DATE, therefore making it easier for
me to query against an actual date?

Thanks
Reply With Quote