Questions tagged as 'sql-server'

2
answers

Select non-NULL records within a CASE

You can help me with the following, I currently have a query from a table sql-server which brings me the records depending on a condition in WHERE and classifies those records into 4 categories which are' Contrato ',' Otrosies...
asked by 13.08.2018 / 15:57
3
answers

Query with inner join and LIKE operator

I have the following tables with their respective data Table1 +----------+------------+ | IdTabla1 | Velocidad1 | +----------+------------+ | 1 | 123.51 | | 2 | 123.55 | | 3 | 125.23 | | 4 | 125.87...
asked by 11.08.2018 / 10:05
2
answers

Trying to get property of non-object in line 18

In the line that there is error is in this: if ($resultado->num_rows() > 0) ... This is my code: <?php $mysqli= new mysqli('localhost','id5840508_root','******','id5840508_hospital '); $salida=""; $query="SELECT*FRO...
asked by 20.05.2018 / 21:30
1
answer

What can be done to simulate a MS SQL try catch but in PostgreSQL?

What can be done to simulate a Microsoft SQL Server try catch but in PostgreSQL? BEGIN TRY BEGIN TRANSACTION IF EXISTS (SELECT * FROM USUARIOS WHERE ID_USUARIO = @ID_RESPONSABLE) BEGIN DECLARE @ID_CLIE...
asked by 20.04.2018 / 23:43
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

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
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

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
1
answer

Render HTML saved in a SQLServer database field

I have HTML saved as Varchar in a SQL Server database. I'm trying to insert this HTML in a view but in doing so, it is passed as text and not as HTML (BUT, HTML adds double quotes at the beginning and end, which does not allow rendering. Th...
asked by 14.02.2018 / 18:08