Under IPv4 I have been parsing the string representation of IP addresses to Int32's and storing them as int's in SQL Server.
Now with IPv6 I'm trying to find out if there's a standard or accepted way to parse the string representation of IPv6 to two Int64's using C#? Also how are people storing those values in SQL Server? As 2 fields of...
I have the same problem as described in this question, but there it's SQL Server 2005 and the "accepted" answer doesn't work in SQL Server 2000.
Specifically: I'm trying to run ALTER TABLE foo DROP COLUMN bar, and it's failing because there's a "default constraint." Meaning, I have a default value on that column which SQL Server implem...
I have a database where I need to query to get records from one table and then lookup on another table to see if that value exists there. That table might return multiple records and I want the one with the most recent date.
So table 1 is basically:
ID (Primary Key)
Name
Test_Score
And Table 2 is
Test_Id (Primary)
Student_ID (Forei...
Hi,
I've been racking my head trying to get Nhibernate to work with a byte
array as version mapping to an sql timestamp. I'd implemented an
IUserVersionType but Nhibernate was creating varbinary in the database
rather than timestamp. Inspired by a blog post by Ayende recently on
concurrency, I changed my mapping to specify the sql-type t...
I can't remember how to do this in a TSQL query. It was a one-liner, good for testing before running DML. The query was something similar to SELECT IS_DBO() or SELECT IS(DBO).
...
In Object Explorer you can right click on a table and select Edit Top 200 Rows. When you do it opens the table in Edit Mode.
Does anyone know the syntax of how to write that in a query so you do not have to right click and select Edit Top 200 Rows?
Thanks
...
In a .NET project I need to verify if a string is a valid Microsoft SQL Server 2005 parameter identifier.
Example: SELECT * FROM table WHERE column = @parameter
Is there a runtime class method to validate a string for being a parameter, or is there a regular expression that verifies the rules? (see below)
From the documentation on ide...
All,
Sorry in advance - I'm a novice in most of the topics below (SQL, ASP). Anyway...
I've got a pretty simple web app that requires users to log in with a user name and password.
The front end creates a salted SHA1 hash of the password, and posts it (along with the user's name) to an ASP page.
That ASP page takes the data, calls a...
In a web application architecture with 1 app server (IIS) and 1 database server (MSSQL), if you had to pick one server to virtualize in a VM, which would it be: web or db?
Generally speaking of course.
...
Data in Table :
ItemCode ItemName ItemGroup
SFD Softdrink NULL
CCL Coco Cola SFD
FNT Fanta SFD
SPR Sprite SFD
ACL Alchol
TQL Tequila ACL
VDK Vodka ACL
When user find "Softdrink" then the result will be:
...
I have a SQL Server 2005 database which holds a fairly basic schema.
I'm fine with accessing it through Management Studio, but I need to be able to provide read-write access to other internal staff so they can modify the contents of certain tables.
Can anyone recommend a tool (preferably free) that can look at a SQL Server database and...
Dear All,
I want to know what's the best way to search a DB table using a stored procedure (let's say text search)?
What are the points I should look at?
Let me know if you guys want more information.
...
Are any SQL Server Database standards & best Practices documentation that I can use as reference for naming conventions, security, using schemas, etc?
...
I have set up the full-text search functionality in SQL Server 2008 express. This is what I did:
-- STEP 1: Create catalog
create fulltext catalog HtmlSearch
-- STEP 2: Fill catalog
create fulltext index on docs
(WordHtml)
key index IX_docs_1
on HtmlSearch
with change_tracking auto
-- STEP 3: Search
select * from docs
where freetext(*...
So I have this weird problem with an SQL Server stored procedure. Basically I have this long and complex procedure. Something like this:
SELECT Table1.col1, Table2.col2, col3
FROM Table1 INNER JOIN Table2
Table2 INNER JOIN Table3
-----------------------
-----------------------
(Lots more joins)
WHERE Table1.Col1 = db...
I need a free tool or some kind of tip/technique to compare the structure of two Microsoft SQL databases. Preferably MS SQL 2005.
The technique I tried to make work was generating scripts from both databases and then comparing the two files but SQL Server generates object in random order.
...
I have two sets of data which I need to join, but there is an added problem because the data quality is not great.
The two data sets are Calls (phone calls) and Communications (records created about phone calls). They have ID's called call_id and comm_id respectively. The communication records also have call_ids to perform the join. The...
txtname.Text.Trim().Replace("'", "' + char(39) + '")
the above statement is not working for stored procedure
...
Working with SQL server with isolation level "read committed snapshot", we routinely write data to the database and read it further on in the context of the same transaction. Usually when reading from the database we see our own uncommitted changes but only committed changes made by others. We assumed that this is the expected behavior ....
Hi,
In MICROSOFT SQL SERVER have the following table:
CREATE TABLE [T1]
(
[ID] int IDENTITY (1, 1) NOT NULL,
[col1] int NOT NULL,
[col2] int NOT NULL,
[col3] int NULL,
[col4] datetime NOT NULL DEFAULT (getdate()),
[col5] datetime NOT NULL DEFAULT (getdate())
)
I want to write an insert statement that select 2 columns from anothe...