Category "sql"

Count field, joins, multiple selects

I have three tables. Estimates, Estimate_versions, and customers. Here is some SQL SELECT estimates.id, estimates.estimate_number, estimates.description, est

Date to String format in Firebird

How can I customize CAST (TimeStamp TO STRING) format in Firebird? cast (<DateField> as VarChar(25)) It does not work as I want. I do as I wish with t

ORA-03150: end-of-file on communication channel for database link

In an Oracle database there's a big PL/SQL procedure being executed periodically that copies data from one DB to another one through a database link and it is f

Use OR operand on BOOL (tinyint(1)) Fields MYSQL

Is it possible to use the OR operand when comparing two boolean values? Using MYSQL 5+ Ex. ON DUPLICATE KEY UPDATE table1.3_InMarket = (table1.3_InMarket OR

deleting sql code with python and selecting from JOIN

I have just started with Python and am already aware of the basics of SQL. In this code I'm trying to join tables and just test out python however I have two pr

Generate sql insert script from excel worksheet

I have a large excel worksheet that I want to add to my database. Can I generate an SQL insert script from this excel worksheet?

DNN - Add or create a Role in DotNetNuke with SQL

I need to add a new DNN role in SQL. If I add a new record to the dbo.roles table, it does not seem to create the role in the Security Roles page domain.com/Adm

How to highlight SQL syntax of Room Dao in Android Studio

With new Room, How to highlight SQL Syntax in Dao Interfaces? For example @Query(SELECT * FROM user) is it possible to highlight the words SELECT, FROM with a

Deadlock involving SELECT FOR UPDATE

I have transaction with several queries. First, a select rows with FOR UPDATE lock: SELECT f.source_id FROM files AS f WHERE f.component_id = $1 AND f.a

SQL for ordering by number - 1,2,3,4 etc instead of 1,10,11,12

I’m attempting to order by a number column in my database which has values 1-999 When I use ORDER_BY registration_no ASC I get…. 1 101 102 10

postgresql sequence getting max_value

How to get max_value and min_value Postgres sequence? I created the sequence using this statement create sequence seqtest increment 1 minvalue 0 maxvalue 20;

Fully dynamic Stored SQL Procedures?

Is it possible to have fully dynamic SQL Stored procedures? I've read up on dynamic SQL for the past few hours but couldn't find the "fully dynamic" solution th

SQL Server convert select a column and convert it to a string

Is it possible to write a statement that selects a column from a table and converts the results to a string? Ideally I would want to have comma separated value

How to pass a dynamic parameter as SQL query in Azure Data Flow?

I am trying to run dynamic queries with a parameter in Azure Data Flow but I continue to get the "Column operands are not allowed in literal expressions" error.

How to execute sql query in elasticsearch Nodejs

Am using Elasticsearch in nodejs using npm elasticsearch, Here, how can i execute sql queries in elasticsearch? Is there any npm modules or plugin to execut

SQL STATE 37000 [Microsoft][ODBC Microsoft Access Driver] Syntax Error or Access Violation

Good day! I get this error: SQL STATE 37000 [Microsoft][ODBC Microsoft Access Driver] Syntax Error or Access Violation, when trying to run an embedded SQL s

db2 list of stored procedure in a database

I would like to have the list of stored procedure created in a certain database. I tried db2 "display procedure MyDb.*" But I get error DB21034E The comman

JDBC Derby driver not found

I've followed the JDBC tutorial at: http://docs.oracle.com/javase/tutorial/jdbc/basics/gettingstarted.html, and managed to build and create my own JDBC database

How can I have IS NULL condition in TypeORM find options?

In my queries I'm using TypeORM find option. How can I have IS NULL condition in the where clause?

How to cast a datetime format to date as string in SQL Server

I am struggling to find a solution for the below issue. date1 = 31-08-2017 12:10:00 I want to cast it as string and need to take date (31-08-2017) alone. Th