Hi,
Is it possible to get the query result in .CSV file format from SQL SERVER 2000 and above versions?
If so can we use this feature from an asp.net application to get the result in CSV format?
If so how can we do this?
...
Greetings,
I would like to include CASE Statement inside my where statement as follows:
SELECT a1.ROWGUID FROM Table1 a1
INNER JOIN Table2 a2 on a1.ROWGUID=a2.Table1ROWGUID
WHERE a1.Title='title'
AND (CASE WHEN @variable is not null THEN a1.ROWGUID in (SELECT * FROM #TempTable))
However, this 'CASE' statement does not work inside 'W...
I am trying you insert some string which is not in English (other language). when i fetch back they are not correct. They comes like "?????".
But at the same time when I enter the string through the SQL Server UI (SSMS) to enter the string, it works OK.
What could be the solution please?
...
Hi Experts,
I am working with linq to entities where I have a stored proc which returns an enetity based on some parameters. I can get this result in program. Now I want to join this resultset with similar entity on a common field.
my entity
Books
{
BookId,
Title
}
Stored Proc
GetFilterBooks(someparam)
(
Select * from books wher...
Will the performance of a SQL server drastically degrade if the database is bigger than the RAM? Or does only the index have to fit in the memory? I know this is complex, but as a rule of thumb?
...
Let´s be frank, my knowledge regarding SQL language is very low.
Nevertheless, my boss gave me the task to build a database application using the following tools: SQL Server and Visual Studio 2008; C#. I use the VS DataSet as a local mirror of the SQL Server.
And let´s be frank again, my understanding of the VS Query builder is also ve...
Hi all,
I am building an asp.net application, using II6 on windows server 2003 (vps hosting).
I am confronted with an error I didn't receive on my development machine (windows 7, iis 7.5, 64 bit).
When my wcf service tries launching my query running against a local sql server this is the error I receive:
Memory gates checking faile...
Hi,
There are a number of questions about this and a number of possible causes and thus far ive tried them all with no success.
situation:
i have an app that needs a db to work, onstartup it does a SmoApplication.EnumAvailableSqlServers(false) to get all the instances on the network, shows the user a dropdown, they pick one and i go con...
I have a database FooDb with a schema BarSchema that contains a table Tbl (i.e. FooDb.BarSchema.Tbl)
I am also logged in as a user with BarSchema as default.
This query works fine
SELECT * FROM FooDb..Tbl
I also have a synonym for this table in another db
CREATE SYNONYM TblSynonym FOR FooDb..Tbl
But now I get an error "Invalid ob...
I have a field varchar(14) = 20090226115644
I need convert it to -> 2009-02-26 11:56:44 (datetime format)
My idea. use cast and convert.. but I always have errors.
Conversion failed when converting
datetime from character string.
I made this, but don`t like it..
SELECT
SUBSTRING(move,1,4) + '-' + SUBSTRING(move,5,2) + ...
Hi Guys,
I am attempting to get all records where and Id field exists more than once, trouble is my query is returning nothing and I have no idea as to why!? And this is the only method I know.
Some more information:
There are up to 8 of the same Order Numbers
Each set is grouped by ProcessOrder, I require the lowest value of these b...
I need to insert binary data from a file into a varbinary(max) column in SQL Server as a part of my deployment script.
The file is on the local machine, SQL Server is on the remote.
Here is the data table definition
CREATE TABLE [dbo].[Config] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (50) NOT NULL,
...
I have two tables, Customer and CustomerPhone.
Single record in Customer can have multiple CustomerPhone records. As you see in the image below, Phone and Fax resides in CustomerPhone table whereas the rest of the fields resides in Customer table. If user want to edits a customer record, obviously i will have to update the record in Cus...
I have a requirement in which, i need to upload an excel file into SQL Server database. It is working well till this point.
But sometimes i am getting excel file in such a way, that the first 2 rows and columns are empty rows. That is not even fixed every time. so the format of the table after upload is not as expected. It is assigning...
I have a table (that relates to a number of other tables) where I would like to filter ONE of the columns (RequesterID) - that column will be a combobox where only people that are not sales people should be selectable.
Here is the "unfiltered" query, lets call it QUERY 1:
SELECT RequestsID, RequesterID, ProductsID
FROM dbo.Requests
I...
Ok so I'm developing a WPF application that makes heavy use of SQL Server.
I've been asked to create an installer package that checks whether the client already has SQL Server Express 2005 already installed, his operating system (64bit Vs x86) and install the required SQL Server instance if needed.
I'm then required to automatically map...
I have a table that I need to get some specific data from for a view. Here's the base table structure with some sample data:
| UserID | ReportsToUserID | Org ID |
-------------------------------------
| 1 | NULL | 1 |
-------------------------------------
| 2 | 1 | 1 |
-----------------------...
What is the best way for developing a database based application? We can have two approaches.
One common database for all the developers.
List item Separate database for all the developers.
What are the pros and cons of each? And which one is better way?
Edit: More then one developer is supposed to update the database and we alrea...
Hey, I've just finished writing a VB.NET application. Now I want to package the executable and the database ofcourse into a single installer file. I tried using QSetup, InstallShield to make SQL Server embedded into the setup file, and finally after hours of try&fail I have no idea. Anyone?
...
I have a power function call inside of a sql function. What is the correct way to handle overflow and underflow conditions since I cannot use a Try Catch inside of a function. I am also trying to avoid modifying the ARITHABORT, ANSI_WARNINGS, and ARITHIGNORE settings in the calling code.
GO
CREATE FUNCTION TestPow()
RETURNS DECIMAL(30,...