Hi everyone,
I've written a stored procedure on SQL Server to return an xml that then is shown on a Web Service, and is caught by a LineChart in Flex to show its values.
The problem is I need to show different values for each period(I have three different periods: Current, 6 month, 1 year) and it's getting hard for me to generate the x...
Is it possible to display all but first row from a table in sql server 2005?
I have this data:
---------------------------------
| ID | Name |
---------------------------------
| 1 | John Smith |
| 2 | John Doe |
| 3 | John Thatcher |
---------------------------------
In ...
I have been trying to defrag indexes in SQL Server 2005 and nothing seems to work. I have created multiple Maintenance Plans using the wizard but the job always fails. I have run the script from this site, which is originally from Microsoft:
http://blog.sqlauthority.com/2008/03/04/sql-server-2005-a-simple-way-to-defragment-all-indexes...
I have following script.
I dont know how to create new database in sql server 2005.
I run following scirpt, and it create tables under model instead of seperate databse. it look massy.
how can i create seperate databse.
I am copy some script here for your adive and course of action.
-----------------------------------------------------...
Hi,
I am working on SQL Server 2005 tables. Here I need to add a column named ‘ID’ as ‘IDENTITY’ column (With starting and incrementing values as 1, 1).
Now my problem is that these tables already have thousands of records. So could you please suggest the best and easy way to perform this job?
Many Thanks,
Regards.
Anusha.
...
I have a query:
select event_type,
department_name,
effective_time,
row_number() OVER (PARTITION BY event_type,department_name ORDER BY effective_time) row
from a
order by effective_time
It returns a row set:
event_type department_name effective_time
3 A 02/10/09 13:12:00
3 B 02/10/09 15:44:00
3 B 02/10/09 20:...
Hi,
I am working on SQL Server 2005.
Here I need to pass an array (2 dimensional, E.g: Emp No, Emp Name ) having multiple records from my ASP.NET application to a Stored Procedure.
Would you please let me know if there is a way to do it?
Many Thanks,
Regards.
Anusha.
...
Why won't this piece of code work for me? It gives the error Must declare the scalar variable "@y".
DECLARE @y int
DECLARE @dbname VARCHAR(50)
SET @y = -1
SET @dbname = 'SomeDb.dbo.'
SET @sql = 'SELECT @y=1 from ' + @dbname + 'Respondent'
exec(@sql)
...
Hi,
I've both VS2008 and SQL Server 2008 Express installed in my computer. When I try create a new DB or attach an existing one, I get the following error message:"This version of server is not supported - Only versions up to 2005 are supported."
From that, I'd like to know:
Is it possible that VS2008 with SP1 be not able to support...
Hi I have a which references itself and I need to be able to select the parent and all it's child records from a given parent Id.
My table is as follows:
ID | ParentID | Name
-----------------------
1 NULL A
2 1 B-1
3 1 B-2
4 2 C-1
5 2 C-2
So ...
Here is the scenario. I have a SQL Server 2005 production database/server. It currently has developers and supporters who can connect to it. I need to create a security module that gives developers read-only access to all areas of the database. This means that a developer should be able to view all objects as well as scheduled activities...
Hi,
My table value is
Esino ym workeddays name
1 200906 25 a
1 200907 24 a
1 200908 27 a
2 200906 22 b
2 200907 25.... b
I nedd out output is
Esino ym1 ym2 ym3 w1 w2 w3 name
1 ...
I've got a content management system that contains a hierarchical structure of categories, with sub-categories subject to different ordering options at each level. Currently, that's retrieved by a (rather large) series of queries...but I'm attempting to speed things up by using a recursive stored procedure.
(As I understanding, using CT...
I have a particularly troublesome xml column to query data from. The schema is fixed by the Quebec Ministry of Revenue so "it is what it is"
The important part of the query looks like this:
with XMLNAMESPACES(default 'http://www.mrq.gouv.qc.ca/T5')
select xmldata.value('(//Groupe02/*/Montants/B_PrestREER_FERR_RPDB)[1]', 'decimal(16,2)...
Hi,
Can anyone please point out what im doing wrong with this Stored Procedure please. I cant get it to compile and my software isnt giving any useful clues as to what is wrong with it.
CREATE PROCEDURE web.createSubscriptions
(
@Member_Id BIGINT,
@Trans_type VARCHAR(100),
@Payment_Status VARCHAR(100),
@Payment_Date DATE...
Hi SO, I am currently working on a particularly complex use-case. Simplifying below :)
First, a client record has a many-to-one relationship with a collection of services, that is, a single client may have multiple services associated with it.
Within my trigger, I am writing a Query that returns a client's id based on certain criteria....
I have recently created a DataPump for connecting 2 SQL Servers together but it isn't working.
Is there any way to test that the pump is working properly as I wish to eliminate from the list of possible things that may not be working?
...
Hi,
I'm having issues with font displaying in my report. The report has a header and 2 table in it.
I set the font in the header and both 2 table to
FontStyle-Normal,
FontFamily-Times New Roman,
FontSize- 8.5pt for Header, 6pt in one table, 6pt and 5.5pt in the other table.
FontWeight- Normal
The report font settings looked correct ...
I want to do some quick inserts but avoid duplicates into a Table.
For argument's sake lets call it MarketPrices, I've been experimenting with two ways of doing it but not sure how to benchmark which will be faster.
INSERT INTO MarketPrices (SecurityCode, BuyPrice, SellPrice, IsMarketOpen)
SELECT @SecurityCode, @BuyPrice, @SellPrice, @...
If I raise an error in an AFTER UPDATE trigger in Sql Server 2005, will that cause the update which caused the trigger to be fired to roll back, even if the statement was not executed within a transaction?
Thanks.
...