Questions tagged as 'sql'

2
answers

Error adding ForeignKey in Oracle

create table LUGAR_PERSONA ( lugar_id NUMBER(8) not null, personal_id NUMBER(8) not null ) nologging; alter table LUGAR_PERSONA add constraint FK_lugar FOREIGN KEY (lugar_id) REFERENCES lugar(lugar_id); add constraint FK_personal FOREI...
asked by 02.02.2017 / 18:17
2
answers

string within a query

I am creating a package with dynamic queries to which I want to make a selection from an input parameter Table. Inside the procedure I have: querysql varchar2(100); BEGIN querysql := 'SELECT RPAD(NVL(description,' '),20,'n') FROM '||Tabla...
asked by 13.01.2017 / 10:00
3
answers

Duplicate records in query using SQL Server

I want the month to show the field EstadoMateria of the table AlumnoMateria without duplicate records and the ones that are not showing anything, as is done in the expected result photo. This is the result query obtained (which...
asked by 06.01.2017 / 22:59
2
answers

Error converting nvarchar data type to date - SQL Server

I am generating a cross table where I show the operators and every day of the week with the number of tickets they attended per day, in this case I am creating a function that receives a date parameter and calculates each day of the week for so...
asked by 11.01.2017 / 00:54
1
answer

How to make an SQL server select that only takes

I have in a table SQL server PosZ column PosZ 103.111005555 1.55689866 95.3655523 SELECT PosZ FROM Table My question is how do I get only the first number before the Point (.) so that of this result: PosZ 103 1 95     
asked by 30.12.2016 / 20:46
2
answers

Connection to SQL VB.net

On a simple page in VB ASP.NET I get an error with the SQL connection:    The multi-step operation of OLE DB generated errors. Check the OLE DB status values if possible. No work was done. I am new in the VB language, I leave a sample of...
asked by 19.12.2016 / 03:46
1
answer

Storage procedure with case

I have this Stored Procedure where I need to search by maternal or paternal surname Bearing in mind that in my grid both concatenated are shown as surnames, as is in the select But doing it with the case complicates me since I can not have...
asked by 19.12.2016 / 22:04
1
answer

executeUpdate - incompatible types: int can not be converted to java.sql.ResultSet JAVA

I am trying using a JDialog of a high vehicle form to make an insert in a table in the database. Pressing the " Enviar/OK/Insertar " button to add it to the database gives me the following error: Uncompilable source code - incompa...
asked by 28.12.2016 / 14:01
1
answer

Variables and temporary tables in SQL, exercise

This exercise was presented to me: Show students who have enrolled in more courses than Antoine de Saint-Exupery. Show all the data of the students, the number of courses to which they enrolled and how many times more than Juan Perez. The...
asked by 16.12.2016 / 19:14
1
answer

SQL statement with INNER JOIN to pull a column of two tables in Java

I need help with a SQL statement. I have never worked with INNER JOIN and I can not do it correctly. As you can see in the previous image, what I'm looking for is this: Save the id_invitacion of the table invitacion...
asked by 05.12.2016 / 04:40