Skip to content

Tag: sql

Identify the pattern to get desired output

We have below table contains multiple code against the ID and CounterID. Need an output based on code and id. Condition: Against the ID and CounterID case 1 : if there is code CI and CO then no record case 2 : if there is code CI and CO and CI then last record with code CI case 3 :

Creating specific size

I have a table in html.I want to add that table with php on my database. The problem is with my table. I have done that I have 24 positions and that I want to give in my table that those 24 are that size,not 25 and going on..Second,I have B and R that it is the color (It is

fixed number format with different lengths in Oracle

I need help with a Oracle Query I have a query: scenario 1: select to_char(‘1737388250’,what format???) from dual; scenario 2: select to_char(‘173738825034’,what format??) from dual; scenario 3: select to_char(‘17373882’,what format??) from dual; I need a query to satify al…

Displaying multiple database tables in one table

I have multiple databases with the same table (an Eventlog with different values). The names of these databases are subject to change. I am trying to display the Eventlog tables in one consolidated table with the corresponding database name. I tried to using cursor and dynamic SQL statement to achieve this wi…