Column A (VAR CHAR) contains a UNC Path eg. lab03-app01\66\2016\10\3\LAB03-REC01\4989\1_6337230127359919046_6337230127366210371.wav Within the UNC Path is an index number 4989. I need to be able to update Column B (INT) to be equal to the value of In
i'm trying to transfer my data from TXT that i generate in a Data flow task to FTP library and can't do it If i use Execute Process Task i must execute a File1.bat: @echo off ftp -s:fileName.txt -n and fileName do it: open 172.16.60.223 user username
Need little help with date range conditions for two columns along with one extra condition on third column, I want to to apply range query on two columns. It works fine if I don't put third column for one more condition along with date, but if I put
Could anyone provide some guidance on how to use Table Value Parameters (TVP) with SQL Server JDBC? I am using the 6.0 version of the SQL Server driver provided by Microsoft, and I have reviewed the official documentation as well as the more helpful
I have been searched in the net and trying to create a query that contains a window function without a CTE but I couldn't get the result and I need some help this my query that I create with a CTE what I need is doing that in one query ;with cte(Gid,
I need to select and Get a single unique value from a table where the key has duplicate entries. For instance there is a Transaction ID(Id) and an AccountNumber(AccountNumber) and for each account number there are many entries but I have to get only
I use this query, but it does not work: create FUNCTION getUserCreditPayment ( @resellerCode int, @userCode int, @startDate datetime, @endDate datetime ) RETURNS TABLE AS RETURN( WITH Directories AS ( CASE WHEN (@userCode != 0) THEN (SELECT * FROM Us
I am trying to create a query of patients' last blood pressure values of 2015. When I use max(date) it includes values from 2016, but when I apply where date < '2016-01-01' it does not give me the values for those patients in 2015, but rather just de
I have two tables in SQL Server: EMP On_Vacation with colums EmpId, LeaveType, StartingFrom, EndingTo,RejoiningDate The On_Vacation table stores the information of employees who are on leave. I'm trying to query the table in such a way that my query
I am using SQL Server to create my database. I want to add a column to my Table which would calculate the number of NULL values in each row, like this: Column1 | Column2 | Column3 | Score a | B | C | 0 x | NULL | NULL | 2 Currently, I have this: Colu
I have value A of type DECIMAL(19,8) - the scale is 8, so the number of decimal digits that will be stored to the right of the decimal point is 8. Now, I am dividing A on B, where B is BIGINT. For, example: SELECT CAST(3 AS DECIMAL(19, 8)) / CAST(27
I have a requirement in my app where one user can send the friend request to another user. We use SQL Server database as the backend. The structure of the table is like this. CREATE TABLE FriendStatus (FriendStatusId BIGINT PRIMARY KEY IDENTITY(1,1),
I have been trying to get the rows where cell is empty but how can i get an empty cell Its not NULL over there, its like an empty string. 05J9LJ-E E004030 BGH/F.TB E004032 000080.KS 002X87-E E004033 018880.KS So second row, first column is like 8 spa
I have three tables in my database. Table one effectively contains two fields: |Datetime| |Set| Table two is a lookup table which matches a number of parts of a set to a set number: |Set| |Part1| |Part2| |Part3| |Part4| I want table 3 to have a recor
I'm using Spring connecting to Sql Server 2008 R2 via JDBC. All I need is to insert a large amount of data to a table in the database as fast as possible. I'm wondering which way is better: Use Spring batch insert mention here Create stored procedure
Hi I have two tables Table A and Table B . Table A has 3 columns id ,Location & name Table B has 3 columns id , location & address I need to join these two tables . I know we can use the location table to join . But in Table A say for Eg location
I am trying to write a join query but can't seem to filter it out. I'm selecting an invoice table and and applied payments table. I want to get the balance of all invoice totals amount - applied amounts. I can get the applied amounts fine using sum b
I'm not sure of the best way to ask this, so it will be through example. I have a good size database that contains about 800 tables each containing a key piece of information for all data - For the example we'll call it Department. This is part of th
I was wondering is there a way to retrieve, for example, 2nd and 5th row from SQL table that contains 100 rows? I saw some solutions with WHERE clause but they all assume that the column on which WHERE clause is applied is linear, starting at 1. Is t
I'm trying to fetch data from my Local-Server Using an Android App. I established this using jtds.jdbc Connection. In Emulator It's working fine and fetching Data. While tried to connect using Android device through USB it's Giving the Following Erro
I've successfully created a connection to an MSSQL database, executed a query and returned the results using mssql_num_rows. I'm able to get $numRows to echo and show "Rows Returned" on the page. The columns in the table have these names: employ
My normal process for inserting into one table and then getting the ID back so that I can insert into another table is like this in MSSQL: DECLARE @transactionKey uniqueidentifier SET @transactionKey = NEWID() INSERT INTO transactions(transactionKey,
I have two servers and I need to transfer all the details of a particular user from one server to another server. I selected row from one server and now I have to insert into another server of a table. I selected the row and I return it in datatable.
I want to insert text field values to database using javascript jQuery AJAX call to C# server method. Problem is that AJAX call run successfully but C# is not updating the database. What could be the reason? Please reply soon. ASP code is giving belo
We are writing a new application, and while testing, we will need a bunch of dummy data. I've added that data by using MS Access to dump excel files into the relevant tables. Every so often, we want to "refresh" the relevant tables, which means
I have a three tier system, SQL Server backend, hand written data access layer, and using stored procedures. I have a table called EventTable. Each row is an 'Event'. An Event has a primary key, and a start date. CREATE TABLE EventTable ( ID INT IDEN
I've been doing a lot of DB refactoring lately and synonyms have come in incredibly useful. When I originally put in the synonyms I was thinking they would be very temporary while I refactor. Now I am thinking there might be some good reasons to keep
I am stuck with a problem of implementing security at dimension level in SSAS. Here is what I did - 1. Defined a role in SSAS and applied security at dimension level (Unchecking cube dimensions that I don't want this role to access and setting Allowe
I have a query that runs each night on a table with a bunch of records (200,000+). This application simply iterates over the results (using a DbDataReader in a C# app if that's relevant) and processes each one. The processing is done outside of the d
I'm having trouble coming up with the proper syntax for allowing either a string or a NULL to be passed to the database. Here's my code: string insertString = String.Format( @"INSERT INTO upload_history (field1, field2, field3) VALUES ('{0}', '{1}',