i was just working with cursor in SQL 2008 but i face some problems.
the first is that with the line i declared the cursor every time i execute the query it gives me an error. which says the cursor with such a name already exists. i want to offer me a way that if the cursor exists do not create it and if it is not defined yet sql creates...
I need to create a test database out of a huge database where the most data is contained as filestream data.
I need to test not filestream related data, so what I'd like to do is to remove the varbinary(max) info.
These are the fields I have in my FILE_REPOSITORY_TABLE table:
[ID_FILE] [int] NOT NULL,
[FILE_DATA] [varbinary](max) FILE...
I've been trying to get a java application connecting via the jtds jdbc to a couple of SQL servers. I have to connect via windows authentication.
The connection string specified is:
String connectionString = _"jdbc:jtds:sqlserver://"+server+":"+port+"/"+database+";domain="+domain;_
and I am getting the connection via:
con = j...
Hello,
I'm trying to increase the time between dates by a set amount. For example, I want to add two months to the time between date 1,2 and 3. I'm having trouble incrementing my 'date counter'...
DECLARE @monthDiff int
SET @monthDiff = 1;
UPDATE [Table1]
SET [Date] = DATEADD(MONTH, (SET @monthDiff = @monthDiff + 1), [Date])
WHERE ...
Hi people,
please help me with this one,
i want to convert a value from Bigint to datetime.
For example im reading HISTORY table of teamcity server, on the field *build_start_time_server* i have this value on one record 1283174502729.
How can i convert to datetime value???
Thanks
...
After asking this question it is clear to me that I need to be able to perform the garbage collection in the fastest possible time.
How is it possible to tell SQL Server filestream's garbage collector to delete all the files with high priority?
I tried with the CHECKPOINT statement, even by setting a duration (CHECKPOINT 100), but noth...
Hi,
I'm developing a application that's for SQL-surveillance, it's just a console application that will run each 5min on a bunch of servers. It has a config file with connection string and sql query. The thing is I would like the program to accept SELECT queries only.
I colleague told me he thought I could set something in the SqlComma...
I am a bit confused about de default collations when creating a database. The data stored in the database will be in different languages. The main users of the database will be using the spanish language, but it will also be used in english, french...
As the spanish default collation is Modern_Spanish_CI_AS, and the english, french itali...
Is it a good practice to create an index to every foreing key in my database?
...
I have installed Team Foundation Server 2010 (basic configuration) on a Windows Server 2003 without any problems. But when I go to administer the Team Foundation Server Administration Console, I get the error when in the press "Administer Security" or "Group Membership"
Server was Unable to process request. ---> Team Foundation services...
I have a stored procedure (see below) which inserts data into a physical table and then joins information with sys.databases. I was thinking that would it be better to not have a physical table for data insertion? Would it be better to fetch these results into a table variable within this procedure? If so, how to do that?
CREATE PROCEDU...
Hi everyone.
I'm using SQL Server (2005).
Today i have some tables that everytime the data inside them changes i get DB trigger
(implemented via the sql server trigger mechanism) and handles it.
the problem is that the trigger mechanism has bad performance and handling with it is not exaclly afun thing to do. now to my question. is anyb...
Hello, in our company's product, we attach a database to SQL Server, and we need to add credentials to some accounts to the catalog.
Currently we're using SMO to do this, but this gives us problems (x86 vs x64, SQL Server 2005 vs 2008, etc)
Is there's anyway of adding a login (to the server) and a user (to the catalog) using SQL?
This...
Can anybody tell me how to save newline in database and also retrieve it in a same manner using asp.net.
...
I need to implement custom security for SQL Server Reporting Services. To do this, I would like to add some configuration into the web.config of the SSRS' Reports Server web application.
My question is - is it safe to do this? Might my custom configuration be overrun by some SSRS process? Or by an automatic update to the SSRS?
...
Howdy,
this should be a fairly simple question but I know very little about SQL. I have a database which has the following fields:
client_id, scheduled_amount, deposit_amount, message_code_id, note_text, system_date
now I wish to select all the records that are less than 1 year old from when the sql statement is run. I know I should u...
Hey guys,
Oracle has a CLOB type and the function EMPTY_CLOB().
I'm looking for an alternative for use in SQL server.
Thanks in advance.
...
So I'm moving my Asp.net mvc web app over to Arvixe shared hosting. This is the first time I've deployed an MVC app. I have been using SQL Server 2008 Express for the development database. Arvixe provides SQL Server 2008 or MySQL hosted databases.
A couple questions:
1.Can I use the mdf files from my Express database with the new No...
Possible Duplicate:
Need help with a SQL query that combines adjacent rows into a single row
So this is how my table looks.
..and I need to write a query to get the output like this:
This is not a homework question.
...
I would need to make a DB select that will behave differently when number or text is entered, just different condition should be used. I think it should be done but not quite sure with the syntax (MSSQL). Thank you
I would need:
SELECT *
FROM X
WHERE (IF value passed is numeric = "ID" ELSE "NAME") = Value //ID or Name are columns
...