Questions tagged as 'sql'

0
answers

Does not show dates from PHP when consulting Oracle

I have an Oracle database that I can access through PHP and visualize information about it, through SQL Developer I have a statement that executes and returns these results: But executing the same sentence in PHP: $tsql= "select orden...
asked by 04.09.2018 / 15:18
0
answers

Security in my connection SQLServer and VB.NET [closed]

My question is to check if my connection is guaranteed to alleged attacks or is vulnerable to aspects that I can not identify. The structure that I manage in my projects is the following:    Connection class. Imports System.Data.SqlClie...
asked by 01.09.2018 / 18:21
3
answers

Relationship tables laravel

Good morning I have 2 tables clients and companies, in the second table I am trying to create the relationship but I get an error with the foreign key.    Illuminate \ Database \ QueryException: SQLSTATE [HY000]: General error:   1005 Can...
asked by 03.01.2019 / 03:09
1
answer

Avoid entering duplicate data in an Oracle table

I would like to know how to create a Trigger in Oracle that prevents data from duplicating data in a table. To start I have my temporary table: CREATE TABLE temporal( Nombre varchar(50), Tipo varchar(50), Pais varchar(50) ) That when you...
asked by 02.01.2019 / 03:39
1
answer

How to generate report in Jasper if the WHERE condition is not met

Hello community, I commented to you the problem that I have, I am generating a report of debts of clients with the following query: SELECT COALESCE(sum(F.total),0) AS Compra, CC.saldo - sum(F.total) AS deuda, C."razon_social" AS...
asked by 26.09.2017 / 18:22
1
answer

Estimated hours using a check

I have a table in which I have three fields which are: create table horas ( fechaEntrada datetime, fechaSalida datetime, horasEstimadas int ); and I have to make a restriction in the table that is, that the estimated hours shoul...
asked by 22.08.2017 / 03:54
1
answer

Variables in SQL Access

I have the following problem, I have tried to change the following statement sql in access to include variables, but I get an error. If I do not use variables, the query works without problems. SQL statement parameters @start da...
asked by 09.06.2017 / 11:39
2
answers

How can I compare range dates correctly php

If I have a date in the database 30-06-2017 and 25-07-2017. public static function getByBETWEEN($fecha1,$fecha2){ $sql = "select * from ".self::$tablename." where date_at > \"$fecha1\" and date_at < \"$fecha2\""; $query =...
asked by 10.06.2017 / 01:35
1
answer

Configure transactional replication for a group of Always on SQL Server 2016

I have the following environment: A server (A) that has a transactional publication, this server is not in the group of Always on Two servers (RT1 and RT2) that are in a group of Always on Listener (RT) RT1...
asked by 24.07.2017 / 19:50
3
answers

Improve SQL query to show results

I have two tables which one by means of RIGHT JOIN and the sentence is as follows: $sql= "select * from bookings RIGHT JOIN calendar ON bookings.date=calendar.day_Date GROUP by calendar.day_date"; I add an image with the structure an...
asked by 13.04.2017 / 21:16