Questions tagged as 'sql'

1
answer

Update in date field updating calculated field

I have in my table a field of DtManagement of type DateTime. In addition to this I have three other fields computed as follows: DAY: (datepart (day, getdate ()) MONTH: (datepart (month, getdate ()) YEAR: (datepart (year, getdate ())...
asked by 05.08.2015 / 14:52
2
answers

Display zero in group by SQL Server

I have a table that calls Ordem , it has a field that represents the Status of the service order (0 to 7), I need to plot a graph in Ireport, but I wanted to display in the caption the name of the status when the value is zero. The sele...
asked by 17.08.2015 / 15:26
1
answer

Pass multiple parameters to an SQL query

Let's say I have the following CPF's: 65568752877 86924355382 55317961378 82331493146 I would like to pass them as a parameter in a query SQL , I am trying as follows: SQL Excerpt ... " AND Beneficiario.Codigo IN ('"+codig...
asked by 07.08.2015 / 14:15
1
answer

Class C # as parameter in SQL Server [closed]

asked by 12.04.2017 / 01:39
1
answer

When relating two tables, is the correct side of SQL, PHP or whatever?

I have this doubt of what it is preferable to do when I need data from the two tables to get the result. I always did the comparison in PHP, but I learned the SQL relationship commands that could help. What is the most correct way to do it, p...
asked by 17.12.2016 / 21:44
2
answers

What is the difference between SCHEMA and DATABASE?

I had never used the MySQL Workbench and it instead of database, gives me the option of SCHEMA. What's the difference between the two? Does it give one or the other?     
asked by 18.07.2018 / 15:54
1
answer

What is the best way to update multiple tables using a trigger?

I have a trigger for After insert notes After delete notes After update notes You need to update multiple tables like sales, sales, sales. I tested using a cursor for each table, at first it worked normally, my question is about performanc...
asked by 25.07.2018 / 17:24
3
answers

Calling attributes of an object in another class in python

I'm a beginner in python and I wanted to know how I call attributes of another object in another class, because in Java, for example: package model; import java.util.ArrayList; import java.util.List; public class FuncionarioDAO { Produt...
asked by 17.07.2018 / 22:04
2
answers

SQL decode function applied DATES

I'm having a doubt, I need to do a select where I need to show if a customer's registry is active or not, in the database it is treated as follows, there is an exit date field if the field is blank the registration is active now if the registrat...
asked by 13.01.2017 / 18:05
3
answers

Disable SQL Server Column Identity

How do I disable the identity property of a column in SQL Serve r? I've tried: SET IDENTITY_INSERT ON/OFF But it did not work. I do not know if it only serves for insertion, but I need to do an update.     
asked by 10.10.2016 / 14:50