Category "sql"

How to filter out NULLs in a Hive query?

Table is: Result should be: How can I solve this query? hive\> select \* from xyz; OK xyz.col1 xyz.col2 xyz.col3 NULL b c a NULL c a b

How to use Python-Operator % for multiple values?

I'm trying to fill an SQL database with soma data, measured by an bme680. Therefore I'd like to format the measured values like this: print ("Temperatur: %0.1f

Query for parting columns by theys dates

I already asked my question but I will try to give more detail and explication. So I need to do somme report on a SAP Web Intelligence systems. I can import my

Is it possible to write a comment after a ';' in an SQL query?

In this code: SELECT * FROM Customers ORDER BY CustomerName ASC; -- some comment If a comment is not part of the query/code, why can't I write it after the ';'

how to get weeklytotal and yesterday record in mysql in one table

Hi Everyone i am trying to implement query to get weekly and yesterday data in same table, dummy output i have shared below, if yesterday not exist as per emplo

How Create a hive external table with parquet format

I am trying to create an external table in hive with the following query in HDFS. CREATE EXTERNAL TABLE `post` ( FileSK STRING, OriginalSK STRING, F

Can you run or debug a SQL Server stored procedure without side effects? [closed]

I would like to be able to see the effects of running a Stored Procedure that someone else has written or other SQL code on a production datab

Problems with Ajax calls on a shared server

I've a web site with one particular page that has worked well for a few years but my host has recently moved me to a new server which is a shared platform. I do

How to convert varchar2 input parameter to timestamp in stored procedure

We are using a proprietary product to develop our application. This product is capable of connecting to Oracle DB and executes SQL queries and stored procedures

How to get dropdownlistFor selected value in controller in form of string in MVC

enter image description here Instead of "A+" i need that value which is selected by user from dropdown list.

SQL Server: UPDATE based on whether a value is greater or lesser than another value, in a single query

I'm looking to update SQL Server in a single query based on a date, however the value updated depends on whether it is greater or lower than a provided value (i

Problems with SQLRPGLE and CCSID in JSON_TABLE

I have a problem with one program, and it is related with the Source File CCSID. I need to generate a JSON field. In the original program, it was an INSERT from

The best way to convert VB6 code to SQL Query

I'm not a VB 6 programmer and I'm struggling to pull the SQL out of this VB 6 form. Any tips would be greatly appreciated. I removed some DIM statements. Basica

How sum certain duplicated data?

I have a list of ids, some ids can be duplicated. How to sum values for the same id in one query? SELECT SUM(`power`) FROM `stats` WHERE `template` IN (489191,

why does it keep giving me errors?

SQL table: CREATE TABLE Application ( App_ID number(5), Child_Name varchar2(15) CONSTRAINT pk_Application_App_ID PRIMARY KEY, Child_Weigh

SQL query based on another table

I have tables like this: table 1: FNAME ID1 FID BREAD XYZ 18BREAD FISH ABC 45FISH BREAD_OLD BNQ 18BREAD_OLD BACON TBG 77BACON EGGS CGS 99EGGS BANANA BHG BANANA

Given a string path, find the leaf node

I am using this table and data where all children of a parent node are uniquely named. CREATE TABLE [dbo].[Resources]( [Node] [hierarchyid] NOT NULL, [N

SQL Consecutive value meet certain threshold [closed]

I have a table like below. Table A |id |value1| -- ------ |123| 89| |123| 8| |123| 90| |123| 6 | |123| 100| |123| 45| |12

Using this JS function, how can I store in a SQL database TMDB fields?

I'm currently developing a project that will be Client on Java and Admin on PHP. For this purpose, I would like to store the API's data in a SQL database, so th

Liquibase Formatted SQL and SQL Server Stored Procedures

My team is trying to get Liquibase-formatted SQL to work with SQL Server Enterprise. We have no problem creating tables, but whenever we try to create a stored