bst365体育投注网址大全

Questions tagged [sql]

Structured Query Language (SQL) is a language for querying databases. Questions should include code examples, table structure, sample data, and a tag for the DBMS implementation (e.g. MySQL, PostgreSQL, Oracle, MS SQL Server, IBM DB2, etc.) being used. If your question relates solely to a specific DBMS (uses specific extensions/features), use that DBMS's tag instead. Answers to questions tagged with SQL should use ISO/IEC standard SQL.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

MySQL is there a way to check if a string is present in a field before update it?

This is my code: mysql.query("INSERT INTO CategorieItems (productid, title, image, rating, price, reviews, nodes) VALUES ? ON DUPLICATE KEY UPDATE title=...
0
votes
1answer
9 views

create calendar table in SQL Server

I am using Microsoft SQL Server 2012 and I am creating the following table: Clinic_code Clinic_name D D_days_passed A123 NAME1 2018-12-01 1 A124 ...
0
votes
0answers
7 views

GeoSpark librairy using Spark Java

I have the following dataframe o spark : __________________________ │Longitude │latitude | ├────────────┼─────────────┼ | -7.07378166|33.826661 | └────────────┴─────────────┴ I ...
0
votes
1answer
17 views

Join SQL select statements using Union

I am trying to join three select queries using Union All but the error is displayed. It is working fine when I join the first two select statements. As I added the third statement I am not able to ...
0
votes
1answer
17 views

How to do the sum for each row of the values of a column?

I have a SQL table containing a column of list of int, like this Index Column to sum 1 1:5:13:3:6:7:11:2:4:1:2:5 2 1:7:2:1:1 3 19:05:05 4 2:1:1:5:1:4:64:177:86:75:2:83:2:57:1 5 43 6 1:1:...
0
votes
1answer
8 views

Get record for a key but display value for a separate key in DB2 SQL

So I have a table which has a composite primary key for SHIP# & REF#. Each SHIP# has two codes for REF# which are BM and PO. BM field is mandatory but the PO field only gets populated when the ...
0
votes
1answer
7 views

Manually writing Json into SQL column using SQL Functions

Hello I need to write a JSON into a SQL column during a insert in a stored procedure. Something like: INSERT INTO TableA (ColumnA) SELECT '{"PropertyA":' + '"' + valueA + '"' + ',...
0
votes
1answer
8 views

Create separate column based on email address, using Excel or SQL

I have a column in Excel with the following Employee Mickey D. Mouse mickey@disney.com I want it to look like Employee || Email Mickey D. Mouse || mickey@disney.com In Excel, if I use Text to Column ...
-1
votes
1answer
15 views

Declaring cursor in a PL/SQL stored procedure

printf('local_time_greeting'); Having some trouble getting a stored procedure to run with SQL Developer. Below is an example patterned exactly like the first few lines, with variable names changed for ...
0
votes
0answers
4 views

mySql INSERT query doesn't return nothing, even after res.json() in node

I'm recently started with node and I found myself in the middle of a problem. I'm trying to Insert a product in my table, but for the id of the product i did not set as auto-increment, so for me to ...
0
votes
1answer
17 views

How to change time_format so i can also have it with Date

I want get in my report date+time but i cannot figured out how to replace the time_format to get date also there. time_format( t1.Date,'%d/%M/%Y - %H:%i:%s') create VIEW `test` AS with cte as ( ...
0
votes
1answer
12 views

Get the count based on column in the table in SQL Server 2008R2

Need to get the ColumnName2 values when the right columns having > 1 'Y' value from the below sample table. ColumnName1 ColumnName2 ColumnName3 ColumnName4 ColumnName5 ColumnName6 ----------- --...
0
votes
4answers
16 views

MySQL Set all values of the collum value to be 0 exept id 4

I want to set all values of the column value to be 0 except id 4. Is it possible to do this in one query? I want something like this: UPDATE table SET value = 0 WHERE id != 4 and SET value = 1 WHERE ...
0
votes
0answers
24 views

Using python to split sql commands in a large sql file

I'm trying to create an SQL file that will contain a handful of SQL commands inside of it(commands generally aren't 1 line). I'm going to be using python to parse the file and execute the commands in ...
0
votes
2answers
19 views

Msg 7202, Level 11, State 2, Line 1 Could not find server 'acct' in sys.servers

Would you know what could be the code error on query with my tables and server database connection, I normally list my query in the following format and today it provides me with the same continued ...

15 30 50 per page
1
2 3 4 5
36722