View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 07:14 PM
Omavlana
 
Posts: n/a
Default Creating temporary table

Hi,

How can I create a temporary table say "Tblabc" with column fields

ShmCoy char(2)
ShmAcno char(10)
ShmName1 varchar(60)
ShmName2 varchar(60)

and fill the table from the data extracted from the statement...

"select logdetail from shractivitylog"


The above query returns single value field the data seperated with a '·'

Ex:
BR··Light Blue Duck··

in this case I should get
ShmCoy = 'BR'
ShmAcno = ''
ShmName1 = 'Light Blue Duck'
ShmName2 = ''

I want to do this job with single SQL query. Is it possible. Pls help.


Herewith I am providing the sample data

BR··Light Blue Duck··
·0234578···
BR··Aqua Duck··
·0234586···
UB··Aqua Duck··


Regards,
Omav
Reply With Quote