SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Parenthesis error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

fredcote54
Starting Member

3 Posts

Posted - 05/29/2013 :  12:22:51  Show Profile  Reply with Quote
Hi people,

I'm new with SQL coding and i need help. When I run the code below, this error pop-up = ORA-00907 : Right parenthesis is missing

I think this is because i made a syntax error but I'm not able to find it and i looked almost everywhere on the net :p

Tks for answering,

CREATE TABLE MinLTDOpenDate AS (
SELECT case_number, MIN(ltd_open_date)
FROM disabled_life_reserves
GROUP BY case_number
ORDER BY case_number
);

CREATE TABLE SummaryLTDOpenDate AS (
SELECT DISTINCT case_number, region_cd, id_no, disa_eff_date, ltd_open_date
FROM disabled_life_reserves
ORDER BY case_number, region_cd, id_no, disa_eff_date, ltd_open_date
);

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1054 Posts

Posted - 05/29/2013 :  12:26:25  Show Profile  Reply with Quote
table never gets created in this way. for details of how to create table check .. http://www.w3schools.com/sql/sql_create_table.asp

And that, what are you actually trying to accomplish?

Cheers
MIK
Go to Top of Page

fredcote54
Starting Member

3 Posts

Posted - 05/29/2013 :  13:06:58  Show Profile  Reply with Quote
Actually, I am not even sure of what I'm trying to accomplish so I know It is going to be difficult for you to help me. In fact, my job is to run a code that as been written by another guy (unavailable for the moment) to extract data that i need. These lines are the only ones who are not working.

I have already visited the link you gave me, but there is no information about CREATE TABLE AS. I know this is a function that do exist because i found some information in other links. DO you have any Q ?
Go to Top of Page

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1054 Posts

Posted - 05/29/2013 :  13:16:44  Show Profile  Reply with Quote
The link I provided is for Create Table. You may google for what is a Table. And that, I don't know any Create Table syntax of this type. May be you have meant it to be a View? http://www.w3schools.com/sql/sql_view.asp

try clearing yourself on the requirements, which would make it easier for us to help you exactly what you're looking for.

Cheers
MIK
Go to Top of Page

fredcote54
Starting Member

3 Posts

Posted - 05/29/2013 :  13:26:04  Show Profile  Reply with Quote
Take a look of this link plz http://www.techonthenet.com/sql/tables/create_table2.php

Does it remember you something ?
Go to Top of Page

MuMu88
Aged Yak Warrior

547 Posts

Posted - 05/29/2013 :  13:48:02  Show Profile  Reply with Quote
OR-00907 is a ORACLE error.
This is a Microsoft SQL Server Forum.
You will have better luck posting your question on an Oracle Forum.

This might help you some:
http://www.dba-oracle.com/sf_ora_00907_missing_right_parenthesis.htm
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000