473,383 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Oracle Question - Using Toad (application)

Hello, I am trying to write a very simple sql. I have a single table that i want to query. What I want is.......a list of Provider_ids where the provider_id has more than one national_identifier

I am a Business Analyst that can write only the most basic type sql...as you can see...even this one I dont trust myself

I tried something like this but the results were wrong

Select COUNT (PC.PROVIDER_ID, PC.NATIONAL_IDENTIFIER)
From TALBE A
Where NOT (PC.NATIONALA_IDENTIFIER -' ') And having Count (PC.NATIONAL_IDENTIFIER)>1

Can someone help me??? Anyone familiar with Toad?
Oct 4 '07 #1
2 2316
debasisdas
8,127 Expert 4TB
Question moved to Oracle Forum.
Oct 4 '07 #2
amitpatel66
2,367 Expert 2GB
Hello, I am trying to write a very simple sql. I have a single table that i want to query. What I want is.......a list of Provider_ids where the provider_id has more than one national_identifier

I am a Business Analyst that can write only the most basic type sql...as you can see...even this one I dont trust myself

I tried something like this but the results were wrong

Select COUNT (PC.PROVIDER_ID, PC.NATIONAL_IDENTIFIER)
From TALBE A
Where NOT (PC.NATIONALA_IDENTIFIER -' ') And having Count (PC.NATIONAL_IDENTIFIER)>1

Can someone help me??? Anyone familiar with Toad?
Try below code:

Expand|Select|Wrap|Line Numbers
  1. SELECT COUNT(PC.NATIONAL_IDENTIFIER),PC.PROVIDER_ID FROM TABLE PC
  2. GROUP BY PC.PROVIDER_ID
  3. HAVING COUNT(PC.NATIONAL_IDENTIFIER) > 1
  4.  
Oct 4 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
1
by: Achille Carette | last post by:
Hello all, I noticed a difference in the explain plans between JDBC using bind variables (PreparedStatement) and SQLPlus for the same query. The query made through JDBC using bind variables...
7
by: vnl | last post by:
I'm trying to run a SQL query but can't find any records when trying to select a certain date. Here's the sql: SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time =...
2
by: Christian Brennsteiner | last post by:
hi all ms sql specialists..... i am a newbie on ms sql but i am used to oracle and toad ... and now a question (i guess this was asked xxx times befor but i couldn't find the answer easilly)...
28
by: prunoki | last post by:
Hello, I am an SQL server newbie. Our company has a massive application written in PL/SQL. I need to port parts of it to SQL Server. - Which SQL server version should I choose, to have a...
8
by: berj | last post by:
How difficult is this? I'm having a tough time getting a simple select to work. I am using MS Access 2002 and Windows XP. What do I have to do to make a simple select statement like this...
0
by: AZNewsh | last post by:
The code I am using to download blobs from an oracle database giving an open or save option is given below, This code seems to work fine with files of type .doc or graphics files but when I tried a...
0
by: jen78 | last post by:
Hi, I am new to Oracle administration and hope someone can help me out on this as i am struggling to make it work.... I am doing development work using oracle database on my own development...
0
by: piyushdabomb | last post by:
Hi Oracle Gurus!! Before I proceed, as per the moderators request, I would like to mention that I have already taken a look at the other threads pertaining to a similar issue which I am having and...
6
by: greenMark | last post by:
I have installed Oracle 9i on my PC and able to logon in SQL plus without the host string part. The user name and the password are 'scott' and 'tiger'. When ever I put my host string 'ORAP' it gives...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.