Questions tagged as 'sql-server'

1
answer

Web API authenticate with SQL Server users

Hello,   I currently have an offline application that uses SQL Server users to login to the application. What I want to do is to use the same users to generate an authentication Token in an Asp.net Core Web API. How can I generate this Tok...
asked by 14.07.2017 / 19:54
1
answer

SQL to count records that have a field

Good afternoon, I do not know how the rules of the topic work, I asked for help on a previous topic and one of the members ended up helping me, but I wanted to get one more question about the help. The query he helped me with is below and...
asked by 25.07.2017 / 20:11
1
answer

Incremental ordering of columns, but per result line

I have the following table structure and results: Ineedtocreateanefficientstatementthatcansortvaluesinascendingorder,buttheyshouldbesortedbycolumn/rowandnotjustbycolumn.Intheexampleabove,theexpectedresultwouldbe: Thanks in advance for y...
asked by 25.07.2017 / 16:15
0
answers

Help with dats sql server and android

I have this code to do a search to SQL Server database but give me error:    Incorrect syntax near '19' Here is the search code: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); String currentDateandTime = sdf.for...
asked by 10.07.2017 / 21:36
1
answer

SQL SERVER Count of items in a Calculated Field [duplicate]

Good afternoon, I'm having trouble counting items in SQL SERVER, I need to perform the count of a column that I EVEN CREATE, where there is a rule, and there are several errors in my tests, errors in GroupBy among others, I need to count th...
asked by 10.07.2017 / 21:50
1
answer

Regex function whitespace SQL Server 2008 [duplicate]

Hello, Within a specific table in my DB, I have certain fields that have been registered by others, so some fields instead of having a simple space ' ' , have spaces of the most diverse types! I do the Javascript treatment as follows:...
asked by 17.07.2017 / 16:16
0
answers

Shopping cart error in array when retrieving last id sqlsrv_fetch_array 11- is not a valid ss_sqlsrv_stmt resource in

I am putting together a shopping cart but I am facing the following error which I mentioned in the title. The method receives 2 parameter $ listProducts is an array as all purchase information and the $ Total parameter receives $ _SESSION of the...
asked by 23.07.2017 / 16:50
3
answers

Doubt SQL Query d

I am wanting to perform the calculation in the sql query where the result is the amount of open calls divided by the number of weekdays chosen period. Ex: 200 calls have been opened in the month and there are 17 working days in the month of May,...
asked by 30.06.2017 / 16:13
1
answer

Pulling the last information from a table [closed]

I wanted to know how to pull the last information that was registered in the bank, but I can not use the ID. In my Route table you have the columns Id (PK), Date, Current_Malue, Combustivel and NVeiculoId (CK). In this table I need to get...
asked by 03.07.2017 / 21:31
1
answer

SQL to check skipped number

I have a table with 12,560 records from 5 years ago, that is, it does not have such a good modeling and it has a field called 'code' that the user filled with something like CA-0001. The problem is that at some point in the history of this datab...
asked by 23.06.2017 / 18:32