I'm a coding newbie, so this may be sort of a dumb question. I was working on an SQL project to learn the language and I wanted to know if there was a way to do
I have a business requirement to select records based on two fields in one table: code1 and code2. The selection is complex and hard-coded, with no codeable rhy
I'm trying to use INSERT statement to add values to a few columns in a new table depending on the value of a column in another table. I'm writing in SQLite. I w
I have a VARCHAR which will return the value something like this '40/4'. Is there a way to convert this VARCHAR to an INT? I tried casting but it is not working
I am defining the prefix of an address and then trying to remove it from the address. How can I define a variable using an if statement or case statement in the
Imagine this is my query : query = ''' SELECT * FROM table WHERE id = {{myid}}''' params = {'myid':3} j= JinJaSql(param_style='pyformat
I have 2 tables named tblDemo and tblSubDemo; tblDemo havve 2 columns _id and _name. tblSubDemo have 3columns, ID,Name, Demo_ID(it is the primary key of tblDemo
I'm using node-mssql 3.2.0 and I need to INSERT INTO a table and return the id of the inserted record. I can successfully use sql.Transaction() to insert data,
Hello infinitely more knowledgeable stack overflow community. I am trying to accomplish the following: There is this quick form a user fills out and part of tha
I tried to get the row number using ROW_NUMBER() but it shows the following error: can't format message 13:896 -- message file C:\WINDOWS\firebird.msg not
I'm trying to get monthly production using group by after converting the unix column into regular timestamp. Can you please tell how to use group by here in the
I'm running MySql Server 5.7.11 and this sentence: updated datetime NOT NULL DEFAULT '0000-00-00 00:00:00' is not working. Giving the error: ERROR 1067 (420
I am running the following query and it's taking more than 12 sec on my local system. SELECT DISTINCT entity_id_0 FROM (SELECT DISTINCT c0_.enti
I need to pull out first date and last date of the month from the given from_date and to_date as input, For Example:- I have my psql output table as the followi
I have two config tables. The structure is as below: Table 1: Client_Config id, name, value, type, description Table 2: App_Config name, value, type, descript
I have a pretty big query (no pun intended) written out in BigQuery that returns about 5 columns. I simply want to append an extra column to it that is not join
In my web application, I have 3 tables: TAB A: Recipes (id, name) TAB B: Recipes_Ingredients(id, fk_recipe,fk_ingredient, quantity) Bridge table TAB C: Ingredie
I have a table having a JSON datatype column which contains JSON array consisting of IDs for another table. I want to return matching rows from that other table
I would like to create the dynamic partition in one of my SSAS tabular model. To do so I found one approach with SSIS package which involves the "Analysis Servi
I want to merge two tables with different columns mysql. For e.g. Table 1 : ------------------------------------------------------------- item_id title sl