FROM keyword not found where expected Error in SQL

I've been working with our coder from another office over email, and we've hit a bit of a stand still with this code. I keep getting oracle errors whenever I try and execute the query. Below is the code I'm using: SELECT TALLY_TRAN_MSTR.SHIFT_DT, TA...
more »

2017-08-15 20:08 (1) Answers

VBA excel convert value

I am using a connection to a CSV file to get the information in a XLS macro file and I am having the issue with this query: DataQuery = "SELECT [LastName], [FirstName], [BadgeNum], IIF(IsNull([CaseDocs]), 0, [CaseDocs]),IIF(IsNull([CallCount]), 0, ...
more »

2017-08-15 20:08 (1) Answers

Error using radio buttons in a foreach statement

I am looping through database rows, for each result, there are 2 radio buttons that allows the user to either approve or reject that 'row'. When the user is done, he/she can then submit the form. This is what I have done. @foreach($items as $item) ...
more »

2017-08-15 19:08 (4) Answers

Dummy values from a list as a dummy column

I would like to provide a list of ids to a dummy column. This will help me in identifying those ids that are not present in a table. Example: I would like to generate hardcoded dataset below with 'WITH' clause ID 12345 23456 34567 Is this possib...
more »

2017-08-15 17:08 (2) Answers

Filtering Data from a Query with SQL

I'm really running into issues with this SQL code I'm using. I've been posying about this, but not really getting answers. I tried to adapt this code to what I am trying to do, but I keep getting the screen shot of the error message screen grabbed be...
more »

2017-08-15 16:08 (2) Answers

Using AND condition in decode

I have a scenario where I need to check the date and a value to determine the result. Ex- case when my_date > '10-01-2011' and my_value = 0 then 'Do this' else 'Do that' end I'm trying to use this in oracle SQL query, I was wondering if there...
more »

2017-08-15 11:08 (1) Answers

Php/PDO does user exist?

I know there are already some posts about it, but I got other solution than others: $sql= 'SELECT * FROM pr_users WHERE nick = :nick '; $sqldot = $db->prepare($sql); $checkif = $sqldot->execute(array(':nick' => $nick)); ...
more »

2017-08-14 22:08 (1) Answers

Filtering Data based on calculation in Excel

I have data coming in from a query. I originally filtered the data with SQL, but I'm not sure if what my boss would like me to do is possible in SQL. I would like to tally the value in column C if "LOAD_BEER" is in Column D. Group data by Person (C...
more »

2017-08-14 20:08 (1) Answers

How to filter out intraweek data in PostgreSQL?

I have a query that I'm leveraging for a dashboard visualization. The only issue with the query is that it includes data for the current week - which is problematic because the week is not fully baked. Ideally, I would like to add a filter that pulls...
more »

2017-08-14 18:08 (1) Answers

Oracle Apex: APEX version of ALL_TAB_COLUMNS

Is there a table that holds values of columns in APEX similar to all_tab_columns? all_tab_columns shows column headers like they are in a database, but on APEX, a lot of these headers are formatted to be a bit more user-friendly in interactive repor...
more »

2017-08-14 15:08 (2) Answers

Convert date format from selected results

SQL Noob here and can't seem to wrap my head around this. We have results in our database which is displayed at the MM/DD/YYYY format. However it gets recorded in the american date format when someone has it set on their PC. For example we have res...
more »

2017-08-14 14:08 (1) Answers

Convert delimited string to rows in oracle

I used to use below query to convert comma delimited string to rows - select regexp_substr('A,B,C,D','[^,]+', 1, level) from dual connect by regexp_substr('A,B,C,D', '[^,]+', 1, level) is not null; But, now my delimiter is - '~^' I am not able t...
more »

2017-08-14 12:08 (3) Answers

Default row for SQL

DB - Oracle create table customer_exercise( customer_id number, exercise_id number, cnt number, exercise_date date) Data 1000 10 3 14-AUG-17 1001 20 6 14-AUG-17 1000 20 2 14-AUG-17 Is it possible to get a default row when the...
more »

2017-08-14 10:08 (2) Answers

Splitting delimited table into rows

I've got some data very similar to this: ID STATUS EMPL 1 Created;Solved;Closed John;Terry;Martin Of course the number of values in each row can range from 1 to n. I found some advices on this for 1 column only (using Connect...
more »

2017-08-14 09:08 (2) Answers

How do I order two columns in SQL?

My output to the question was this:- FIRSTNAME COURSENAME ---------- -------------------- Anand C++ Bala C++ Dileep Linux and C Gowri Java Gowri Linux and C Gowri C# John C++ John Oracle Prem Linux an...
more »

2017-08-14 05:08 (1) Answers

Why this query requires group by clause in Oracle

can someone explain me why this query requires GROUP BY clause in Oracle while is perfectly fine in MSSQL, MySQL, Postgresql? select count(*) / (select count(*) from dual)from dual Oracle complains "[Error] Execution (1: 27): ORA-00937: not a si...
more »

2017-08-13 22:08 (1) Answers