Skip to content

Tag: sql

Query response in JSON format without column name

My table schema is something like this, Initially, my procedure was returning with data as After processing the data, to the web page is sent as If I use the result will be like So what I need to get is the same response but without column name, as front-end lib uses the JSON array without keys. SQL Server ve…

SQL group by (count,sum)

Hello i need help abou SQL a have this table and i need this result. thanks for your attention and your answers. select to_char(r.date,’yyyy’) YEAR, sum(1), sum(r.cafe) cafe, sum(r.drink) drink, …

SQL Select in an Insert statement

How can I combine these two scripts? I basically don’t want to hard code the number 34 in Query 2. I want the script to take the next number of job_id. Query 1 returns 34, so Query 2 should take 35 as …