Questions tagged as 'sql'

1
answer

Error connecting Netbeans with a SQL Server 2008 database

Good, I am wanting to connect Netbeans with a database but I have the following error    Can not establish a connection to jdbc: sqlserver: // CRONOPIO: 1433; databaseName = ppm using com.microsoft.sqlserver.jdbc.SQLServerDriver (The TCP / IP...
asked by 06.11.2016 / 17:51
1
answer

Doubt in query SQL group by and nulls

Fiddle to test queries: link    Let's say I have a table like that. +-------------+-------------+------------------+-------------+ | Cod | Provincia | Cliente | tlfn | +-------------+-------------+--------------...
asked by 09.03.2018 / 08:29
1
answer

call of a function from another php file

$bd= new DB(); $conectar = $bd->conectar(); function extFolio($folio) { $query = "select FolioParticipanteCG from participantes where FolioParticipanteCG = '".$folio."'"; $folio=mysqli_query($conectar,$query)or die("Error al selecci...
asked by 07.06.2018 / 20:26
1
answer

Selecionador Default option of a database

I have a table "put" this table contains the following fields id puesto 1 empleado 2 director 3 programador already having the ID correcpondiente to the user and the data contained by a submith in $id = $_GET['id']; I want my se...
asked by 09.08.2018 / 18:44
3
answers

Use LIKE or LTRIM - SQL

I am working with oracle and C # in Visual Studio 2015 and I have this query "SELECT * FROM TCTERCEROS WHERE TR_TERCERO = '" + TBNit.Text + "'" As I can apply a LIKE or LTRIM, TBNit.Text is what is said in the text box to see for example 12...
asked by 10.08.2018 / 15:35
1
answer

Update record comparing different columns

What I'm trying to do is generate an SQL statement that finds me the rows that have repeated data, and at the same time in different columns. My table is something like this: ID FECHA UNO DOS TRES ESTADO -- ---------- --- --- -...
asked by 19.02.2018 / 03:57
1
answer

Query without repeated data SQL Server

You will see I need to send to ask for an amount n of questions, where that amount is given by a parameter. The query is already functional and sends them to the parameter randomly. What happens now is that it shows questions that are repea...
asked by 03.10.2018 / 23:06
1
answer

debugging of SQL queries in PHP (var_dump and debugDumpParams)

When we are writing our SQL queries, we may need to check how the dynamic data we are sending is behaving, to validate that the result is expected. EXAMPLE I have the following script to bring all the posts of a certain user working 2 ta...
asked by 03.10.2018 / 03:40
1
answer

Null in SQL query

I'm doing an SQL query but I can not generate it correctly, these are the parameters that filter Area = cbbxArea.Text.Equals("Todas") ? System.Data.SqlTypes.SqlString.Null : cbbxArea.Text; Linea = cbbxLinea.Text.Equals("Todas") ? System.Data.S...
asked by 04.01.2018 / 01:00
3
answers

Consult 2 tables of 2 databases

How can I consult a table in one database and another table in another database, in sql server that is, I need to consult the company with the 2 databases I was doing it this way but I get error The databases are: Sk_BDDespachos...
asked by 05.01.2018 / 17:47