Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Trying to use a SELECT ...INTO Command with InterBase, Sybase, and Informix

Re: Trying to use a SELECT ...INTO Command with InterBase, Sybase, and Informix

From: Peter DeSimone <pdesimone_at_sageus.com>
Date: 1998/10/02
Message-ID: <6v3fuk$g08$1@news-2.news.gte.net>#1/1

The second SQL statement I using has that syntax. It still doesn't work.

Peter

fred wrote in message <907359367.364194_at_tango.news.big-orange.net>...
>The right syntax is:
>SELECT .....
> INTO ......
> FROM .......
> WHERE .......
>
>Good luck,
>
>fred
>
>
>Peter DeSimone wrote in message <6v31d6$e$1_at_news-2.news.gte.net>...
>>I am trying to run the following command:
>>
>>SELECT TSP_COMPONENTS.ID LEVEL0ID, TSP_COMPONENTS.NAME LEVEL0NAME,
>>TSP_COMPONENTS.ABBREVIATION LEVEL0Abbreviation
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=0))
>>INTO Level_0
>>
>>I want to take the data from the SELECT…FROM…WHERE SQL Statement and put
 it
>>into a new table called LEVEL_0. The Interactive SQL tool doesn’t like
 the
>>INTO command. Everything else in that SQL statement works fine.
>>
>>This statement works fine in Access and SQL:
>>
>>SELECT TSP_COMPONENTS.ID AS LEVEL9ID, TSP_COMPONENTS.NAME AS LEVEL9NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL9Abbreviation INTO Level_9
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=9))
>>
>>Any help would be appreciated.
>>
>>In the end I need the following script to work:
>>
>>DROP TABLE Level_0
>>SELECT TSP_COMPONENTS.ID AS LEVEL0ID, TSP_COMPONENTS.NAME AS LEVEL0NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL0Abbreviation INTO Level_0
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=0))
>>DROP TABLE Level_1
>>SELECT TSP_COMPONENTS.ID AS LEVEL1ID, TSP_COMPONENTS.NAME AS LEVEL1NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL1Abbreviation INTO Level_1
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=1))
>>DROP TABLE Level_2
>>SELECT TSP_COMPONENTS.ID AS LEVEL2ID, TSP_COMPONENTS.NAME AS LEVEL2NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL2Abbreviation INTO Level_2
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=2))
>>DROP TABLE Level_3
>>SELECT TSP_COMPONENTS.ID AS LEVEL3ID, TSP_COMPONENTS.NAME AS LEVEL3NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL3Abbreviation INTO Level_3
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=3))
>>DROP TABLE Level_4
>>SELECT TSP_COMPONENTS.ID AS LEVEL4ID, TSP_COMPONENTS.NAME AS LEVEL4NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL4Abbreviation INTO Level_4
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=4))
>>DROP TABLE Level_5
>>SELECT TSP_COMPONENTS.ID AS LEVEL5ID, TSP_COMPONENTS.NAME AS LEVEL5NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL5Abbreviation INTO Level_5
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=5))
>>DROP TABLE Level_6
>>SELECT TSP_COMPONENTS.ID AS LEVEL6ID, TSP_COMPONENTS.NAME AS LEVEL6NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL6Abbreviation INTO Level_6
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=6))
>>DROP TABLE Level_7
>>SELECT TSP_COMPONENTS.ID AS LEVEL7ID, TSP_COMPONENTS.NAME AS LEVEL7NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL7Abbreviation INTO Level_7
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=7))
>>DROP TABLE Level_8
>>SELECT TSP_COMPONENTS.ID AS LEVEL8ID, TSP_COMPONENTS.NAME AS LEVEL8NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL8Abbreviation INTO Level_8
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=8))
>>DROP TABLE Level_9
>>SELECT TSP_COMPONENTS.ID AS LEVEL9ID, TSP_COMPONENTS.NAME AS LEVEL9NAME,
>>TSP_COMPONENTS.ABBREVIATION AS LEVEL9Abbreviation INTO Level_9
>>FROM TSP_COMPONENTS
>>WHERE (((TSP_COMPONENTS.COMPONENT_LEVEL)=9))
>>
>>Peter DeSimone
>>pdesimone_at_sageus.com
>>
>>
>>
>>
>>
>
>
Received on Fri Oct 02 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US