I have a scheduled task with a .bat file that downloads some files from a web server every day by the morning then process the data and UPDATES a database. Then it triggers another .bat file to SELECT …
Tag: oracle
Fetch Substring in Oracle
I have a string as – V_TAG_B = utm_source=google_search&utm_medium=cpc&utm_term={Keyword}&utm_campaign=home-|-SBI-|-search I need to break this string into 4 small parts as – I need to do this because the string can be in any order such as utm_campaign coming first and utm_source is co…
How to select every Friday for the last six months?
I am working on the currency table. I need to get every Friday for the last six months. My query selects every day between two dates. Here my query OUTPUT OUTPUT(Should be) Thanks for helping. Answer Not clear if you are looking for Oracle or MS SQL-Server. In case you need it for Oracle you can use
Oracle: How to change column data type from VARCHAR to NUMBER without losing data
I have the following columns in my table: ID – NUMBER(10,0) NUMBER – VARCHAR(255) All data in the NUMBER column are numbers. I would like to change the VARCHAR type to Integer Number type. How to do it without data loss? Answer Oracle does not allow modification of data type of the column if it is…
Problem when trying to create a table on SQL DEVELOPER [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 2 years ago. Improve this question I was trying to create a table on SQL Developer, and I had the error …
Unique constraint violated while insert
I’m running this code INSERT INTO ADW12_DW.WC_MFG SELECT * FROM ADW12_DW.WC_MFG_bkp; COMMIT; Prior to this, ADW12_DW.WC_MFG was truncated to update column size. So ADW12_DW.WC_MFG is empty before …
multiple selection in the where clause
I need to do multiple selection in the where clause select * from BATS where REASON in case when :P12_REASON = ‘Rejects’ then (‘online’, ‘offline’) else ” end and case when :P12_REASON = ‘…
Oracle Database Object SQL query
In Oracle Database. There are two object tables SHOPS(S_NUM, S_NAME, TEL). And PRODUCTS(P_NUM, P_NAME, P_VAL, P_PRICE, SHOP_NUM). How to write in Oracle Object SQL language query to get how much there …
Sql syntax error while doing left outer Join in SQL
I’m using oracle database and trying to delete duplicate records from that. For the same I’ve written a below query but getting this error Its giving red indicator under outer keyword in Left outer join in query. Query: Answer Oracle does not permit JOINs in DELETE queries. This is clear if you lo…
Which is the correct form to create one to many relationships between two tables on a Oracle database
I have a Oracle database in which I have two tables, RegistroPPL and Alias. One RegistroPPL can have multiple Aliases. Now, my question is, what is the right way to create this relationship, using a bridge table like this: or creating a direct relationship like this What is the best way to create one to many …