I am trying to pass the values from the parameters to a dynamic sql and I get syntax error.I have many parameters like this and need to build a query depends on parameters passed, any help is appreciated.
CREATE PROCEDURE Test.Search ( IN P_number varchar (50))
DYNAMIC RESULT SETS 1
P1...
I created database design in Microsoft Visio Professional 2003 and wanted to migrate entire schema into DB2, how shall I do it. Any help is appreciated.
I want to convert rows into columns. Can anyone help me writing the query.
I have table like this:
Trype Index Value Id
A 1 19223 13758834.01
A 2 Account Type1 13758834.01
A 3 USD 13758834.01
A 4 2% 13758834.01
A 5 13758834.01
A 6 13758834.01
A 7 1000482 13758834.01
A 8 19223 13758834.01
A 1...
I have few XML files to be loaded in SQL Server 2005. Do I have to use Integrated Services to load these or do I have to write a VB code?
Thanks for any help.
I have about 100 MSAccess tables which needs to migrate to DB2. What is the best way to do it. I migrate to SQLServer 2000 sucessfully, but my goal is DB2.
Any help is appreciated.
My Sql server 2000 database goes down very frequently, when goes down I have to restart the entire server. I tried to stop and restart service, but never stops.
I am calling stored procedure from my .net application to save a record into a table. I got following error message.
Our server is Windows 2003 server and SQL Server is SP4. My stored procedure takes ntext as a input parameter and program is sending an XML string through the input parameter...
I have a procedure it takes long time to run this procedure
alter procedure test as
declare @Id int,@Type char(10),@total_created int,@total_orders_created int,@total_completed int,@log_total int,@log_aging int
declare c1 cursor for
select Id,Type
from temp1
open c1
fetch next from c1 into...
I have query like this
select t.Id,case when t.type ='19' then 'A1'
when t.type ='22' then 'A2'
else 'A3' End Actual_Type,count(t.type) record_count
from temp t
group by Id,t.type
Gives me results like this
ID Actual_type record_count
1 'A1' 1
1 'A3' 1
But I want...
I installed SP4 successfully one of my development server. But My application gives error while saving into the table.
The error is:
Table data couldn't be saved. Error in table.save.
A severe error occurred on the current command.
Also, I checked in the event viewer the error says:
An error...
I have two select statements
select top 5 t.field1, flag = case when f2='a' then 1 else 0 end
order by flag asc
which gives me
1 0
2 0
3 0
4 1
5 1
select top 2 t.field1, flag = case when f2='a' then 1 else 0 end
order by flag asc
which gives me different results
8 1
10 0
Basically it...
My Analysis Services show two different versions.
Analysis Manager tree, right-click the Analysis Servers node, and then click About Analysis Services shows the version 8.0.760. But while Analysis Manager-- Help --About Microsoft SQL Server Analysis Services-- it shows version 8.00.382.
Which...
My log shipping monitor shows out of sync alerts. Seems
last_copied_last_updated, last_loaded_last_updated fileds in the log_shipping_secondaries not getting updated. I updated these fields manually with latest date but still it is showing out of sync. I increased out of sync threshold with...
I have a table called local_time which has two int fields hour and min. I need to get records between hour and time.
Here is my query.
select convert(nvarchar(10),local_time.Hour) + ':'+
convert(nvarchar(10),Local_time.Minute)
from local_time
where convert(nvarchar(20),local_time.Hour) +...
I have query like this and takes more cpu usage, Can any one suggest better way of writing this query.
IF EXISTS(SELECT Id FROM dbo.Q1
WHERE Code NOT IN (10, 17, 152) AND getdate() BETWEEN Startdate AND Enddate)
Thanks for help.
Hi, I am getting error while restoring log shipping.
My History shows like this:
copy succeeded Tlog_1400
Load Succeeded Tlog_1400
Copy Suceeded Tlog_1430
Load Failure Tlog_1400
Copy Suceeded Tlog_1500
Load Failure Tlog_1400
It loaded last 2 days transaction logs. Today it is giving errors...
Hi
We have several servers dev/staging/prod. Right now our client don't have any security policy, so all developers have sa privileges in all servers. I want to revoke sa privileges to all the developers and assign limited privelges. What are the industry standards to follow and what is the best...
Hi
alter procedure dbo.delete_nod
@table_name nvarchar(255),
@pk_fld_id nvarchar(255),
@pk_value numeric,
@project_id numeric
AS
declare @delete_tree_node bit
Begin
select @delete_tree_node = isnull(delete_tree_node,0)
from projects where project_id = @project_id
End
print @table_name
if...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.