I have a table that looks like this:
Slug | Parent | MetaTitle | MetaDescription | MetaKeywords
The Url's on the site are built by appending the slug to the parent as long as the parent is not null. So if I have data like so:
Slug | Parent
-----------------------------------------
Home null
About n...
Hi,
I insert some data into a sql server 2005 database using NHibernate. Before I insert an object I check whether it already exists based on its primary key. Every 100000 or so lookups this seems to throw some exception (if I do the same via sql it takes ages as well). A defragmentation of the hard disk seems to help but seems a bit st...
Hi All,
I am in a situation where I need to find the Changes happened to the database since last migration.
Eg: Changes happened to the Stored Procedure,and Views and functions.
How Can I find these Changes.
We are not using any third Party Tools.
Please can any one help me out on this.
Thanks in Advance.
Venkat
...
I have two databases, with the following tables:
DatabaseA
TableA
ColumnA (varChar(10)
DatabaseB
TableB
ColumnB (varChar(10)
I need a query that:
Ignores NULLs or empty strings
Finds rows where the value of ColumnA does not exist in columnB
In this case, replaces the value of the non matching row in ColumnA with '' (empty string)...
OK, here we go, after reading a couple of related questions, I haven't ended into a real productive solution for my thoughts.
Thoughts:
As we all developers creating applications, then these apps going into production, the client after couple of days demands additional features.
Great! you open your database through Server Explorer, c...
I have an automated process that inserts an XML document into SQL Server 2008 table, the column is of Type XML. There is a lot of duplicated data, I wonder if anyone can recommend a good way to delete non-distinct values based on the XML column? The table has thousands of rows and each XML document is about 70k.
Each XML document looks ...
What is wrong with the syntax in this function? I am getting the following errors:
ALTER FUNCTION [dbo].[udf_ReportingLevelStructure2]
(
@CompanyID INT
)
RETURNS @result TABLE
(
CompanyName VARCHAR(300),
[rl_Index] INT,
[rl_Addr1] VARCHAR(MAX),
[rl_Addr2] VARCHAR(MAX),
[rl_DisplayName] VARCHAR(MAX)
)
AS
BEGIN
...
I have a SQL Server 2008 database where all access to the underlying tables is done through stored procedures. Some stored procedures simply SELECT records from the tables while others UPDATE, INSERT, and DELETE.
If a stored procedure UPDATES a table does the user executing the stored procedure also need UPDATE permissions to the affec...
Is there a way to get the database column DataType length information given a table's EntityType?
Example SQL (SQL Server) that you can run to see precisely what information I am looking for:
select
sys.tables.name as 'Table Name',
sys.columns.name as 'Column Name',
sys.systypes.name as 'DataType',
sys.columns.max_l...
i want to be able to edit a table in a sql server database using c#
can someone please show me a very simply tutorial on connecting to the DB and editing data in a table
thank you so much
...
When i try to establish a connection with SQL Server 2008 i am getting:
The server version is not supported. only servers up to SQL Server 2005 are supported.
What's wrong with this? is there a patch?
...
I have two tables in my database and the t1 table primary key is uid, t2 table a foreign key name desg. now I want to delete or update this uid in one table give error that
Now row was updated. data in the row
was not committed. error
source:.netSqlclient data provider.
error message: the update statement
conflicted with th...
I have a dataset that gets populated from a stored proc in sql server. I have a column that has lets say has a set of values. I do not know what those values are. All I know is that they of the type "string". I want to extract all the distinct values from that column.
...
I need to add a autonumber column to an existing table which has about 15 million records in SQL 2005.
Do you think how much time it'll take? What's the better way to do it?
...
i am running a script from visual studio 2008 to a sql server 2008 connection
i am getting this message when i build:
to debug this project you must enable sql/clr debugging for the connection. note that during debugging all managed threads on the server will stop.
is this dangerous to do given that i have other databases on this ser...
I have 3 ways I want to filter:
by name
by list
and show all
I'm using ASP.NET 3.5 and SQL Server 2008. Using ADO.NET and stored procs.
I'm passing my list as a table valued parameter (but I'm testing with a table variable) and the name as a nvarchar. I have "show all" as ISNULL(@var, column) = column. Obviously the way I'm query...
I am using Visual Studio 2008 and I am a beginner.
I am connecting to a SQL Server 2008 database.
I would like to display data from a table.
How do I do this? Can someone please show me an easy tutorial?
...
I am developing a Job application which executes multiple parallel jobs. Every job will pull data from third party source and process. Minimum records are 100,000. So i am creating new table for each job (like Job123. 123 is jobId) and processing it. When job starts it will clear old records and get new records and process. Now the probl...
I would like to call an "update" stored procedure which won't necessarily include all columns.
There is probably a better way to handle this....
As you can see, if I do not pass in the column parameters their value is NULL. Then, using the ISNULL, I set the columns either to their new values or their existing values.
CREATE PROCEDURE [d...
I have a database where all access is controlled by stored procedures. The DBA would like to avoid giving users direct read/write access to the underlying tables, which I can understand. Hence all updating and selecting of data is done via stored procedures. Basically he has created one role that has EXECUTE permissions to all the stored...