I have a table of the following style
Father
|----|------- |-------|
| id | precio | tabla |
|----|------- |-------|
|1 | 50 | sxt |
|----|------- |-------|
|2 | 45 | ext |
|----|------- |-------|
then I have other tables...
As part of my database I have 2 tables (clients and loans), of which I am interested in operating with the following fields:
LOANS: (Customer ID, Loan Amount)
CLIENTS: (Customer ID)
Consider that a client can have several loans....
I want to verify if there is a database BDDATOS1, if it exists I create a table in this database BDDATOS1, otherwise I create a table in database BDDATOS2.
When I run the following
IF EXISTS(SELECT * FROM master.dbo.SYSDATABASES WHERE NA...
I have a table with the following structure:
codigo / periodo / signo / importe
I want to get the following:
codigo / saldo_anterior / cargo_actual / abono_actual / saldo
The period field is integer (YYYYMM)
If for example I am in the...
Good day I have a table where I have to make a query between two columns of type date, the problem is that the end date column can have null data, is there any way to perform the query ???
Here my query
SELECT ACC INTO OUT_M1_PRIMNIV...
I am having problems updating the rows of a table due to a necessary trigger that I have. The error is that of the mutant tables and I do not know how to modify my trigger so that it does not happen.
The structure of the table is as follows:...
I need a constraint that allows only the values NULL or a valid DNI (from Spain) to be inserted. I do not know how to add the one that is also worth the null value, I leave my constraint to see if they can finish it.
Thanks.
ALTER T...
I have this script at the moment of executing it shows me error
Tables:
Controller
$menu=DB::table('menu')
->select('menu','url','id_menu')->get();
$submenu=DB::table('sub_menu')->join('menu','...
I'm new to sql and I do not know how to address this problem.
I have a table that stores citations with a atributo hora of type varchar2 .
I need a trigger that avoid the insertion and update of hours that are not in the...
How can I show all the clients and if they did not buy on that date, change them to null?
Enclosed consultation that shows me only the customers who bought on February 12, 2016
SELECT clienteid ,productoid , fechaorden
FROM Ventas.Ordenes...