I have a table that looks as follows: I need to unpivot the Rating and the Comments as follows: What is the best way to do this in Snowflake? Note: there are
I want to post data to the url and getting Null pointer exception My JSON URL contains { "Details": [ { "Status":"NO UPDATES" }
I'm trying to create a sub-table from another table of all the last name fields sorted A-Z which have a phone number field that isn't null. I could do this pret
I need to skip a While...Do loop iteration inside a stored procedure like this While (v_counter <= :v_total) do begin If (<condition>) then continue
I need to skip a While...Do loop iteration inside a stored procedure like this While (v_counter <= :v_total) do begin If (<condition>) then continue
I have two tables CREATE TABLE person AS ( id INTEGER, sa VARCHAR2 ) CREATE TABLE sampletest AS ( sa VARCHAR2, cell VARCHAR2, pd
I have the following table table x labref name repeat_status 111 L 1 111 L 1 111 K 1 111 K 1 111
Context When a function returns a TABLE or a SETOF composite-type, like this one: CREATE FUNCTION func(n int) returns table(i int, j bigint) as $$ BEGIN RETUR
I am trying to get a cell drop-down values in Excel from a SQL Server. I don't want to use the method of putting all the data to another sheet and the use data
I'm currently struggling with a query and need some help with it. I've got two tables: messages { ts_send, message, conversations_id } conversations {
I have a Python script which creates a large SQL insert file of about 300,000 lines. The problem with this is that the last line of the file ends up looking lik
All, How can I check if a specified varchar character or entire string is upper case in T-Sql? Ideally I'd like to write a function to test if a character is u
I'm trying to access a position of a associative array which is inside of another array. Here is my array: Array ( [order_data] => stdClass Object
Query the name of any student in STUDENTS who scored higher than 75 marks. Order your output by the last three characters of each name. If two or more students
So I need help in trying to make a database field where it's default 7 and each day minuses 1 until its 0 then the day count starts again from 7. Is it possible
I have two database tables. First table: | ID | Sub-Name | Marks | 01 | french | 50 | 01 | russian | 50 | 02 | french | 30 | 02 | russian
I want to select only one row from a table. This row holds the maximum number in the table. I have tried to use MAX Fun but it didn't work for me. I use two ta
I'm trying to average a set of columns and exclude rows with zero from the denominator by using a case statement within an AVG() function. I read that avg() exc
What I currently have is: UPDATE card, records IF(records.date_returned == null) THEN SET card.last_seen = records.date_loaned ELSE SET card.last_seen = records
I was hoping you could help me figure this out. I would like to run a query that would search a table and all it's rows and the date matches the current month.