473,405 Members | 2,176 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,405 software developers and data experts.

where should i put update with this count function?

1
hello,

i have these queries in oracle:
the first one i made it to get the count, and it is working. but when i try to run the second query in order to put records in count (*) to a.count it is gave me errors. also, a.count column is an empty column i wana transfer record from that logical count (*) to a.count.

Expand|Select|Wrap|Line Numbers
  1. select count (*), a.start_msisdn, a.end_msisdn,a.quantity, a.count
  2. from TMP_MSISDN a, dbdev.subscribers b
  3. where b.msisdn between a.start_msisdn and a.end_msisdn
  4. group by a.start_msisdn, a.end_msisdn,a.quantity, a.count

Expand|Select|Wrap|Line Numbers
  1. UPDATE tmp_msisdn a  
  2. SET a.count =  ( select count (*)
  3. from TMP_MSISDN a, dbdev.subscribers b
  4. where b.msisdn between a.start_msisdn and a.end_msisdn
  5. group by a.start_msisdn, a.end_msisdn,a.quantity)
  6. WHERE EXISTS
  7.   ( select count (*)
  8.     from TMP_MSISDN a, dbdev.subscribers b
  9.    where b.msisdn between a.start_msisdn and a.end_msisdn
  10. group by a.start_msisdn, a.end_msisdn,a.quantity);
Attached Files
File Type: txt Documen2.txt (608 Bytes, 281 views)
Oct 12 '11 #1
0 1574

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

Similar topics

1
by: Scott Castillo | last post by:
The following line prints something: echo $keywords; However, when I then use the count function as follows: $count = count($keywords); echo $count;
1
by: Irfan | last post by:
Hello, I am having some problem with count function. I have a report in which has grouping by a person wise and sub grouping in invoied status e.g.. the output will be Irfan Records (First...
1
by: Wayne Aprato | last post by:
I have a text box on the header of a continuous form which has =Count(*) as its control source. This is probably simple but how do I make it update the count of records each time I add a record. ...
0
by: ambika_se | last post by:
hi all I need a help to use count function. I want to make a query in which i want to search for some keyword so the query i made was for $x in doc("file:///C:/Package1.xml")//Package where...
1
by: Starke | last post by:
I have a table where Im counting records that have a two certain criteria. My Question is, If one criteria is met, but the other isnt instead of not retrieving the record can the count value...
7
by: wertqt | last post by:
Hi, i used the COUNT function to return the number of rows that satisfy the conditions set. This method works but when i press the load button again, it will still gives me another same set of...
3
by: atiq | last post by:
I am creating a report where i want to display the total number of students found for that query. i use the following but it displays #Error. =Count() Also on the same report, i have another...
16
by: lovecreatesbea... | last post by:
It takes mu so time to finish this C source code line count function. What do you think about it? / ******************************************************************************* * Function ...
3
by: Hussein B | last post by:
Hey, This is an example of a generator function: ===== def counter(start_at=0): count = start_at while True: val = (yield count) if val is not None: count = val else:
4
greeni91
by: greeni91 | last post by:
Hi There, I am currently having a problem with my database. I have a table that uses Lookup fields, to check another table, which is linked to my reporting form. I am trying to do a query where I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.