I was looking to create a pre-build method for a web application using SQLMetal to bring any changes since the last build into my DBML file. Since we are just starting out with LINQ most of the large database is not in the DBML. Is there any way to use SQLMetal to just regenerate a handful (less than 10) of tables and about 3 SPROCs or...
I recently developed an SSIS package on my dev machine using the 2008 version.
Later I foud the customer had Sql server 2005 and doesn't plan to upgrade anytime soon.
Is there a way to turn the 2008 package into a SSIS 2005 package, like a downgrade wizard?
...
Using Sql Server 2008. Pretend I have a publisher and 2 subscribers A and B. The replicated table has a guid on it and also a primary key that is not the guid. Frequently, updates happen at both subscribers near simultaneously generating 2 different guids but the same primary key. Then when they go to syncronize I get primary key vio...
As the title says, I'm using SQL Server 2008. Apologies if this question is very basic. I've only been using SQL for a few days. Right now I have the following query:
SELECT TOP 10 p.id, pl.nm, pl.val, pl.txt_val
from dm.labs pl
join mas_data.patients p
on pl.id = p.id
where pl.nm like '%LDL%'
and val is not null
What I wan...
I have a bunch of tables and I need to create basic INSERT stored procedures for all of them.
Does anyone have anything that does this or a good start to do this?
...
I have an Excel source going into an OLE DB destination. I'm inserting data into a view that has an INSTEAD OF trigger that handles all inserts. When I try to execute the package I receive this error:
"Failure inserting into the read-only column ColumnName"
What can I do to let SSIS know that this view is safe to insert into be...
create procedure USP_Insert_Update_emp(@IntId int ,@chvmobile (20),@Chvename varchar(20),@intOutparameter int)
as
begin
if (@IntId = 0) --Means user want to insert. /*
/* Then I check here that, if mobile already
exists then (In table id is auto generated) and
for inserting user will enter @...
I want to use something lighter than adventureworks. Is there an alternative at all? I have had a look at the Chinook database, but I just want see if there is an alternative. Google search doesn't help either.
...
I have create a stored procedure with VB.NET
This procedure goes to a remote Server (for the moment on my near server Win 2003)
until now everything are ok
The procedure is created and i call her from my program
The name is sp_AddStreamDB
mycommand = new sqlcommand("EXEC sp_AddStreamDB 'C:\sqlDATA\', 'RemoteDB'",RemoteSQLConn)
myComm...
I'm relatively inexperienced at SQL Server, but am trying to troubleshoot some of the (non-SQL Server-related) logic and UI issues in a Delphi app someone else wrote which uses it. Currently trying to get the dev environment functioning.
Here's the environment:
Dev machine: Virtual machine (VMWare) running Windows XP, using Bridged Net...
Hi everyone,
A while ago i read the article for Trigger in SQL Server, and it said that i can use the Logical Table "Updated" for updated rows... And i got error:
System.Data.SqlClient.SqlException: Invalid object name 'Updated'.
After a while of google, i found out some more post that said only 2 logical tables available are: Insert...
Cannot use text, ntext, or image columns in the 'inserted' and 'deleted' tables.
What should be the workaround in this case? :(
...
I'm trying to make a detailed search engine for my web site.
The keywords are being searched in multiple fields and tables. For example, using keywords:
uludag
university
These keywords are being searched in the education, address, contactname, and contactsurname fields in my Members table.
I have to do it so because there must b...
Hi,
Thanks to everyone who helped me with my last question. This is a similar question, but now I have a better idea of what I want. Again I'm using MS SQL Server 2008, and I'm trying to figure out a query that is a little beyond my week of SQL experience.
Right now I have the following simple query
SELECT pl.val, pl.txt_val, pl.id
FR...
tblCurrent_locations
Id BusNo Date Time
1 mh30q121 2009/12/18 11:00:00
2 mh30q121 2009/12/18 1245:30
3 mh30q121 2009/12/18 11:30:00
4 mh30q121 2009/12/18 1015:00
5 mh30q121 2009/12/18 11:00:00
6 mh30q121 2009/12/19 13:00:00
7 mh30q121 20...
Whith the assistance of a very good fellow from this forum (Mr. DJHnz) i solve my first issue regarding the creation of a stream database
Now i'm facing another issue
I'm giving you the code:
USE [master]
GO
/****** Object: StoredProcedure [dbo].[sp_AddStreamDB] Script Date: 12/21/2009 09:55:47 ******/
SET ANSI_NULLS ON
GO
SET QUO...
Hi All,
I’m looking for idea’s/solution to the following problem.
Require a stored procedure that accepts a single parameter (array, list, collection, xml, etc…). For each item in the array/list/collection/xml it will execute a query like this:
Select * from <some table> t
Where t.Name = Parameter.Name and t.datetime = Parameter.dat...
I'm trying to restore backups of our production databases to our development server. When I run the following script which has previously worked:
RESTORE DATABASE M2MDATA01 FROM DISK = 'C:\Install\SQLBackup\M2MDATA01.SQLBackup' WITH REPLACE,
MOVE 'M2MDATA01' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\M2...
I want to inner join with a child table based on ID and get the top Row of the child table,
I am not joining to take any data out of the child table, its just to validate that child table record exists for parent table.
If I dont include TOP row there is chances of getting multiple rows of parent in the result set.
-- Chances of multipl...
Hello,
We have several ASP.NET applications that use a sitemap which is populated via a VB.NET implementation of the SqlSiteMapProvider example found at Wicked Code. It is compiled to a DLL, then installed and referenced from the GAC on the servers and from our locals as well. It has been working in production just fine for a few months...