Category "sql"

How do I select the columns of a table in databricks sql?

I can use: show columns in table_name but this does not allow me to use the output in a query? This throws an error: SELECT * FROM show columns in table_name

How to find all paths recursively from relational table in SQL Server using transitive property?

I would like to be able to recursively find all relationships in a table. I have a relational table, and essentially I would like to apply the transitive proper

comment SQL query with variables in python

I'm working with Cloud Function. I have the following query working correctly: # this is working q = """ SELECT col1, col2 FROM `my_table` WHER

Write a Query in MySql server that prints a list of employee names who have been employed for less than 10 months having salary>2000

I want a SQL query that prints a list of employee names who have been employed for less than 10 months having salary>2000. Sort this result by ascending emp_

need the dv/dt for the below table

How to get the dv/dt of the below table in psql Concept is linear regression - but to determine the slope is the what I am facing issue with. voltage || time

Byte to Varbinary(max) to Base64

Ok so i generate an img in c# and save it as follows: ... using (MemoryStream ms = new MemoryStream()) { bitMap.Save(ms, System.Drawi

Take the nearest row by condition in date, student frame

I am struggling to get the nearest 'Math Test' or 'Biology Test' in (+/- 3 hours) from Test= 'Marked A+' including TestOrder ordering. If 'Math Test' or 'Biolog

SQL Convert numbers into Date

I'm a beginner in SQL and I need your help please! I have a project which is convert Social Security Numbers into birth date. In the database, I have a column M

Error handling block not executing in snowflake using SQL

I'm trying to implement error handling in snowflake using Try Catch block. Enclosed SQL queries in javascript for applying error handling. When I execute the qu

MySQL format number with unknown number of decimal places

In MySQL, I only want to add thousand separator in the number like 1234.23234, 242343.345345464, 232423.22 and format to "1,234.23234", "242,343.345345464", "23

How to use ISO-8601 date in flink SQL?

Based on my research Flink SQL accepts "0000-01-01 00:00:00.000000000" as the timestamp format, but my timestamps in kafka are coming in "0000-01-01T00:00:00.00

Creating procedure that add value when it doesn't exist (Syntax error)

I'm trying to create a procedure that add a value that doesn't exist but I'm currently getting a syntax error. I don't know how to correct the error. Any help w

Anonymous access to azure table

Please can someone give me guidance on how to set up anonymous read-only access to one specific table in Azure. I have a table that I want Power BI students to

How to merge multiple tables in postgreSQL (using wildcard)

There are 163 tables, and I want to add two columns in all. And columns should be added from the front. Please tell me how to do it on postgreSQL This is a tabl

How can I update time by condition?

Hi everyone please i need you're help. What i want is when the input field is updated with this value: Résolu --> update column date with date now. I

How to insert multiple rows in Visual FoxPro?

I'm using Visual FoxPro on my Classic ASP website, and I want to achieve the SQL syntax below to FoxPro version 6. INSERT into users (id, name) VALUES (1, 'jo

Removing duplicates returned based on the column value

This SQL gives me the blog comments that contain just the banned words defined in my table. I only get the EXACT matches and it removes duplicate rows. It also

IF statement sub query optimisation in MySQL

select if(`num`>99, (select `value` from `sub` where `id`=`main`.`num`), "") as `result` from `main` This all works fine but MySQL is very inefficient as i

IF statement sub query optimisation in MySQL

select if(`num`>99, (select `value` from `sub` where `id`=`main`.`num`), "") as `result` from `main` This all works fine but MySQL is very inefficient as i

Display percentage of registered members that have not rated a Movie

I have the following three tables. See full db<>fiddle here members member_id first_name last_name 1 Roby Dauncey 2 Isa Garfoot 3 Sullivan Carletto 4 Jac