Questions tagged as 'sql-server'

0
answers

How do I use the IDENT_CURRENT () to know the last record modified in table with multiple keys?

The function works perfectly when it comes to finding out the last updated record of a table. But so far, this function only works on tables with only one primary key. How do I do this same thing but in a table that has three primary keys? Since...
asked by 31.01.2018 / 15:33
0
answers

Manage Spaces in SQL Server 2008 R2 Database Hosting Units

I need to have a criterion (I can not find official good practice ) documentation on how to value the ESTADO column in the following table. And especially if there is any documentation on the official website to manage the size of the...
asked by 02.02.2018 / 22:26
0
answers

Problems with transactions codeigniter

my doubt is that I am executing the following code in codeigniter, it consists of executing the procedure in the SQLServer that returns a value (output), but in codeigniter I always get this error message: $data = array( $this-...
asked by 12.02.2018 / 21:51
3
answers

Like: validate through textBox the existence of a record in the database. C #

I would like to know: How to validate from a textBox the existence of a record stored in the database? That is, write in the textBox the name of the record and when you press the "Search" button, I get a message that tells me that the reco...
asked by 08.02.2018 / 16:04
1
answer

Add SQL Rows with DatePart

I have this query that brings me the minutes of each day, however I want to add them all, but it returns me values different: SELECT DATENAME(WEEKDAY,DateOpen) as Dias, SUM(DATEPART(MINUTE, CONVERT(Datetime,MTTA))) as Minutos...
asked by 26.01.2018 / 21:57
0
answers

how to make a relation of a table in a column? Sql Server

I want to know if you can make a table save data that configures the visualization of a table. these are the columns that it carries, missing the one that identifies which table has that configuration This table is an example, I want that...
asked by 26.01.2018 / 14:29
1
answer

Add SQL rows

Hi, I have the following problem, I want to add rows of the following query: SELECT AreaName,CASE WHEN datename(WEEKDAY,DateOpen)= 'Sunday' THEN DATEPART(MINUTE, CONVERT(Datetime,MTTA)) END Domingo, CASE WHEN datename(WEEKDAY...
asked by 26.01.2018 / 17:54
0
answers

Error executing sql queries with api sqlsrv driver from php

Hi, I'm working with php5 and sqlserver 2008 database mounted on a xampp server install the driver to work but I get the following error when I run: //conBD <?php $server='x.x.x.x'; $bd='PruebaO'; $coninfo= array("Database...
asked by 26.01.2018 / 19:07
0
answers

Change type of column SQL server

Is there any way to change the type of column in an SQL server? I have seen this but it does not work because it does not save it correctly link The problem that I have is that all the text changes keep them as char, so when I select...
asked by 23.01.2018 / 11:47
1
answer

Generate report in txt with query in SQL Server from PHP

From the following function queryMonth I want to generate the results of the query in a TXT. queryMonth function: public function queryMonth($fecha1,$fecha2) { $res = array(); $rowres = ""; $stmt = sqlsrv_query( $this->conn,"with ct...
asked by 24.01.2018 / 00:14