Questions tagged as 'sql'

0
answers

PHP AND SQLServer

I need help to register data from PHP to a database SQLServer . These are the connection data: $ server: "10.10.2.120"; $ user: "admin"; $ pass: "123456"; <!doctype html> <html> <head> <meta char...
asked by 23.12.2017 / 03:34
1
answer

Error comparing data

In a form I am performing the UPDATE of a record in the DB. To do this: I select a record from a Datagreed- I insert the data in fields to be able to modify them. Along with this I pass the data to an arrangement. Then I modify the field...
asked by 08.01.2018 / 15:27
1
answer

Place in the same field where different value [closed]

I have the following query: (SELECT sno_hpersonalnomina.codnom, count(distinct(sno_hpersonalnomina.codper)), trunc(cast(sum(ABS(sno_hsalida.valsal)) as numeric), 2) as asigna from sno_hpersonalnomina inner JOIN sno_hsalida ON sno_hpersonalnom...
asked by 26.12.2017 / 20:38
1
answer

IF with Extending SQL in PostgreSQL Stored Procedure

I try to do this in postgres CREATE OR REPLACE FUNCTION public.busqueda_productos(_parametro character varying,_descripcion character varying,_estado character varying) RETURNS SETOF productos AS $BODY$ IF ($1 ='General' )then SELECT *...
asked by 17.12.2017 / 20:32
2
answers

count two fields of a table in php sql

I have a table called matriculas_2018 and two fields one of courses and the other of specialty . I want to put an accountant that tells me how many students of the THIRD-AVERAGE course correspond to the ADMINISTRATION specialty and a...
asked by 14.12.2017 / 16:09
1
answer

Trigger with compilation errors

Well it turns out that I want to make a trigger that when I update a column in a specific table records are annexed ie I have a table where articles when the sale is made and the quantity is discounted that information is given to a sales table....
asked by 17.12.2017 / 20:36
1
answer

I need to keep track record in postgresql

I am doing a database design in postgresql and I need to take the history of the patients, which can go through several categories, the complicated thing is that all the time I must know what were the data that the patient had in each category ,...
asked by 12.12.2017 / 19:48
1
answer

Error running Prodecure - Data types GEOMETRY - SQL SERVER 2014

Good afternoon, Create a Procedure that verifies if a point is inside or outside a Polygon. I have a polygon table and a point table (Float) I do all the conversions due. To be able to do it, use the GOEMETRY data types. When I ex...
asked by 13.12.2017 / 20:20
1
answer

Error creating table: "An identifier with more than 30 characters was specified"

I have problems when trying to execute the script to create the client table, I leave the code and the tables with which it interacts with its respective problem. CLIENT TABLE CREATE TABLE CLIENTE( RUT VARCHAR2(10) CONSTRAINT PK_CLIENTE PRI...
asked by 13.12.2017 / 20:40
1
answer

Select Rand () between From GroupBy and with OrderBy

I have a table with the following fields: id code category web_sales brand I want to show only random code in Laravel and group it by category but that the code is generated randomly. The problem is this: how do I group the cat...
asked by 19.12.2017 / 01:42