Questions tagged as 'sql-server'

1
answer

Best database for Android application [closed]

Well, I have a question on which database to choose for an android application: Sql Server or Sqlite? I have a small Crawler, which does not need to run every time, just once, and when there is an update, it happens rarely.     
asked by 28.09.2016 / 21:06
1
answer

C #, Returning a Sql Server query on the Grid View date [closed]

I have a bizarre problem, I have a table in the database Sql Server , where it has a bit field, I'm pulling data from this table, which actually is a View . I make my statement Select , and execute by SqlDataReader...
asked by 27.07.2017 / 02:26
1
answer

Using multiple Schemas with Entity Framework 6

I'm starting to work with the Entity Framework, and I need some example of how I can define for my tables the Schemas that each is contained. My database was created as in the example: /*schema [Pes] -> relativo ao contexto Pessoa*/ Pes.Pes...
asked by 07.10.2016 / 21:55
1
answer

How to return only the data ref. to logged in user

I have a table that returns the following data from a SQL Server database: Initial KM; Final KM; Liters; Value R $. ButIwouldliketoonlyreturntherefvalues.totheloggedinuser.InthetableintheDB,Ihaveacolumnthatsavestheusername(Note:Ikn...
asked by 01.12.2016 / 10:52
1
answer

Return a CURSOR of a SqlServer procedure with dynamic sql (sp_executesql)

In oracle I can do as follows: OPEN MY_CURSOR FOR 'SELECT * FROM MY_TABLE' How to get this result in SqlSever? I want to return a cursor by mounting a dynamic sql in the procedure. I'm currently using it like this: CREATE PROCEDURE MY_PRO...
asked by 13.07.2016 / 13:39
2
answers

Related Tables: What is it? How is it? What's the use? What justifies its use? [closed]

I would like a better explanation of this strategy (if so called) and what makes its use justified since I see some trading systems using it. Complementing the question: Well, I had never seen it myself either, I had only heard of it (if I...
asked by 21.10.2016 / 05:25
2
answers

Check for index?

Is there any way to use a Script that checks whether an index already exists in a table? I have the following script that generates an index in a table: CREATE NONCLUSTERED INDEX [meu_indice] ON [dbo].[MinhaTabela] ( [Id] ASC, [Chave_Id...
asked by 26.08.2016 / 14:36
1
answer

Query in SQL Server

When doing the following query select * FROM conta It brings up the columns, with id_fornecedor coming from the fornecedor table id | id_fornecedor | conta_status 1 | 1 | S I'd like to bring the name...
asked by 25.05.2016 / 13:55
1
answer

SQL Server SQL query with COUNT and INNER JOIN

I have a page in PHP where I have to return data from two tables that are in a SQL Server database. One of the banks is from registered sellers and the other is from the categories where they are registered. I need to make a comparison and...
asked by 14.04.2016 / 20:43
1
answer

How to set the initialization value of a PRIMARY KEY field defined as IDENTITY in SQL Server?

In MySQL when creating a table with an AUTO_INCREMENT field being PRIMARY KEY it is possible to define what will be the initialization value of the first record of it, as follows the script below: CREATE TABLE IF NOT EXISTS 'tb_exemplo' ( 'i...
asked by 12.02.2016 / 02:25