Skip to content

Tag: stored-procedures

Returning Json string from oracle procedure

I need to have a stored procedure in PL/SQL that return a string containing a json object. This object must be a list of object representing rows a table. For example I have the table MY_TABLE(ID, TB_VALUE) The output must be : My stored procedure looks like that : What’s the best way to achieve this ? …

SQL query join tables data

I have 2 tables Users and TimeSheets, Timesheets table has column UserId which is users id form users table obviously 🙂 Logic And I’m trying to get all data of Timesheets table plus just name of user from users table but somehow it seems like my query is other way around! Now I know this might be a simp…

SQL copying data with new foreign keys

I have a very tricky problem here. I have two tables. One is dependent on another by foreign key. Table 1 Table1ID Instance ID ModifiedBy 1 1 yevhen 2 1 yevhen 3 1 yevhen Table 2 ID Instance ID Table1ID 1 1 1 2 1 2 3 1 3 These are taken as datasets for something named “Scenario”. When somebody