I am using SQL Server 2005 Express and Visual Studio 2008.
I have a database which has a table with 400 Columns. Things were (just about manageable) until I had to perform bi-directional sync between several databases.
I am wondering what arguments are for and against using 400 column database or 40 table database are?
The table in...
How can specify expression in LIKE operator
I want to select all row in table where column Name starts with a-zA-Z followed by # and does not have two dots together (..)
i tries this WHERE NAME LIKE '%[a-zA-Z]#'
...
I am getting the following error during the deploy task of an automated build (Team Foundation Build Server).
This deployment may encounter errors
during execution because
[dbo].[MyTableThatUsesHierarchyId]
depends on [sys].[hierarchyid] and
[sys].[hierarchyid] does not exist in
the target database
I can manually deploy ...
I've a large (1TB) table in SQL Server 2008 that looks something like this:
ID int | Flag BIT | Notes NTEXT
I need to search every row and set the Flag bit to 1 where Notes contains the word flip
Is
UPDATE Table SET Flag = 1
WHERE Notes LIKE '%flip%'
the 'best' way to do it?
I'm thinking that this could take days to run on such a...
I'm getting the following error when trying to execute a stored procedure which calls a .net assembly deployed within a SQL 2005 database:
Msg 50000, Level 16, State 1, Procedure usp_GetPrintFilePathandExecPrintJob, Line 63
Error (10314) has occured while executing the usp_GetPrintFilePathandExecPrintJob method. Reason: An error occurre...
Hello,
I have a contact DB that I created 3 years ago in MS ACCESS. After 1 year learning ASP.NET/C#, I'm comfortable witting application now for my office. So, I would like to create the same application in web (using ASP.NET/C#/SQL SERVER) so that anybody in my department can access. Meanwhile, there are at least 127 contacts, prevent...
We currently use the SQL Publishing Wizard to back up our database schemas and data, however we have some database tables with hashed passwords that contain the null character (chr(0)). When SQL Publishing Wizard generates the insert data scripts, the null character causes errors when we try and run the resulting SQL - it appears to ign...
I have a sproc that runs on many different servers. In the sproc I have a select statement that looks like the following.
select *
from my_table
where id = @my_id
and status in (1,3)
However, for one of the databases I need the second part of that where clause to only be for statuses equal to 1. So essentially...
select *
from m...
I am currently working on a project to parse an excel sheet and insert any values into a database which were not inserted previously. The sheet contains roughly 80 date-value pairs for different names, with an average of about 1500 rows per pair.
Each name has 5 date-value pairs entered manually at the end of the week. Over the week...
mdf file is working correctly under App_data folder but after attaching it to sql server give following error when running asp.net page.
Cannot open user default database. Login failed.
Login failed for user 'Domain\myUserName'.
[edit]
More information; SQL data source and connection string.
<asp:SqlDataSource
id="srcFiles"
...
If I have an SQL table with all default columns (e.g. identity column + any number of columns all with default values), what is the SQL statement to insert a row with no explicit values given?
insert MyTable /* ( doh, no fields! ) */
-- values( doh, no values! )
What's the trick?
...
Are there any gotchas to using a non-integer column for the id in an ActiveRecord model? We're going to be using replicated databases, with copies of a Rails app writing to those databases in different datacenters. I'm worried that with normal IDs we'll get collisions between newly created rows in different datacenters.
Our DBA has su...
Hi peeps,
On my form there is a datagridview that may get upwards to about 70k items depending on how scan happy our customers get. I also have a textbox which allows the user to search the datagridview using the textchanged event. I'm using a select statement with the like clause and filling the dataset. I dont think this will cut i...
I have 2 tables: Users and Roles, and I have a table that joins these together. The only thing in the join table is Ids that link the 2 tables.
What should I call this table? I've never really seen a good naming convention for this.
Conventions I've seen before:
UsersToRolesJoin
UsersToRolesLink
UsersToRolesMembership
UsersRoles
Ex...
I have been looking around the internet for a way to display specific content from a sql data table. I was hoping that I could display the Content column according to the Id column value.
...
what's the differece between a sql server type of:
float and numeric
...
I currently have a SQL Server 2005 database that is accessed by multiple users. Is it possible to have SQL give processing priority to specific users based on their login names? ie, if Alice and Bob are both running queries simultaneously, I want to ensure that Bob is given priority over Alice.
...
I am updating a piece of legacy code in one of our web apps. The app allows the user to upload a spreadsheet, which we will process as a background job.
Each of these user uploads creates a new table to store the spreadsheet data, so the number of tables in my SqlServer 2000 database will grow quickly - thousands of tables in the near t...
Actually, free is good enough, it doesn't have to be open source :)
I'm currently using the Schema Compare utility of VS2008, but it doesn't have a command line interface and has some other weaknesses as well.
I'm wondering what free tools others are using to provide command line schema comparisons/synchronizations?
Thanks.
...
I have a table regionkey:
areaid -- primary key, int
region -- char(4)
locale -- char(4)
The entire rest of the database is foreign-keyed to areaid. In this table there is an index on (region, locale) with a unique constraint.
The problem is that I have two records:
101 MICH DETR
102 ILLI CHIC
And I need to swap the (r...