Skip to main content
0 votes
1 answer
70 views

I created a Linux DB2 stored procedure for the purpose of either dropping or adding 7 constraints over 5 tables. I always want to do all 7 and just report individual return codes (SQLCODE) from each. ...
Dave Clark's user avatar
0 votes
0 answers
40 views

Why does the same code work sometimes and doesn't others? Is it because I am using sandbox? Here is the code: SELECT * FROM `seraphic-plexus-404015.employee_data.departments ` I opened new ...
Praise Bassey's user avatar
-3 votes
1 answer
78 views

What could be the SQL Server stored procedure to select the highest three peaks separated by seven days. I have tried the below code: CREATE PROCEDURE SelectPeaksAndInsertIntoPeakFact AS BEGIN -- ...
Haya Alhuraib's user avatar
0 votes
0 answers
82 views

newbie here, I simply need to get an Oracle report, which I have successfully gotten to run weekly using code: CAST("AR Origination Date"."Day Cal Date" AS DATE) BETWEEN (...
Ogdog13's user avatar
0 votes
2 answers
157 views

I'm trying to rewrite two pieces of SQL Server code to PostgreSQL. The 1st one is: WHERE (DATEADD(S, Submit_Date, '1970-01-01')) >= DATEADD(d, -3, GETDATE()) OR (DATEADD(S, ...
Emma V's user avatar
  • 3
0 votes
0 answers
26 views

I have a table I am trying to connect to to give me a name (however this name table has multiply entries for a name). StaffName dateFrom dateTo JIAO-L 2023-03-17 NULL JIAO-M 2017-07-25 2023-03-16 I ...
oiocharoio's user avatar
1 vote
3 answers
135 views

I have the below table ID Week_No Value Available_Stock 1 1 200 1000 1 2 300 1000 1 3 100 1000 1 4 400 1000 1 5 500 1000 I want a table like this ID SUM(VALUE) Stock_Lasts_Weeks Available_Stock 1 800 ...
Anonymous's user avatar
1 vote
1 answer
266 views

code in oracle parameter info = in iv_column_1, in iv_column_2, inout iv_msg begin update main_table set column_1 = iv_column_1 where column_2 = iv_colmun_2; if sqlcode <> 0 then ...
ksm5654f's user avatar
0 votes
1 answer
427 views

How to use like clause with multiple values in DB2 version 12.01. SELECT t1.* FROM table1 t1 , ( select (pattern_col) as term from help_table ) t2 WHERE t1.col1 like t2.term Pattern_col contains n ...
Seema's user avatar
  • 1
-1 votes
1 answer
666 views

Unable to run the below code. Select Month(ROW_DATE) as Month, cast(sum(da.ASSISTS) as bigint)/cast(nullif(sum(da.acdcalls),0) as bigint) as [Assist%] FROM [D998AA0_TELECOM].[APD_TEL].[...
Riddhi Solanki's user avatar
2 votes
1 answer
433 views

For a single id column, we have sequence number 01, 02, 03 upto 99 repeating twice /thrice. Example: ID SEQ_NO ---------- 2 01 2 02 2 03 . . . 2 99 2 01 2 02 2 99 We have a requirement ...
abirami ramachandran's user avatar
1 vote
1 answer
4k views

I have to write a sql script to modify a lot of types of columns in my db2 database. Everything goes well excpet for one specific table (script used is the same as others tables) and db2 returns ...
EBruno's user avatar
  • 21
0 votes
1 answer
650 views

I need to extend an app written with Embarcadero Firemonkey for Windows to Android, so I need InterBase. Besides there is no tutorial (none found so far at least) on how to use Firebird under Android, ...
Giovanni Brambilla's user avatar
0 votes
2 answers
2k views

as Sqlerrm() returns message and code which is provided by orecle. exception 1: like for in implicit cursor when data not found error ouccers n we are writing exception handling like dbms_ou..(sqlerrm(...
harsha lohana's user avatar
-1 votes
1 answer
15k views

There are two columns having datatype Decimal (16,4) OwnedShares TotalOutstandingShares I am trying to compute percentage using these two columns and then converting it to Decimal(7,4). Code Being ...
Ankit Aakash's user avatar

15 30 50 per page