sql-server

Stumped on ServiceModel.FaultException forever...

So I'm still not sure if this is on my side, the service side, or both sides. I have NO idea where the main source of the issue is coming from, but I will try and do my best to explain the steps I have taken and what has happened so far so you guys have all the info you need to bang your head against this with me. So we have a Web Servi...

Size limit problem with ntext in Sql Server CE 3.5 and Visual Studio

I am experiencing some strange behavior with SQL Server CE 3.5 SP2. I have a table with 2 columns; one of type int named ID, which is the primary key, and one of type ntext named 'Value'. The 'Value' column is supposed to contain rather long string values. However, when I try to store a string that is longer than 4000 characters, the v...

dbo.dbo is this valid?

Hello all, Is this valid dbo.dbo, if so what does it mean? I have spoted this on a query that someone else wrote: from dbo.tmp_BDCode aob inner join dbo.dbo.tmp_BDCode_03 ao Would it have an adverse effect on a query, because dbo just means its a global object. Thanks all for clarification on this. ...

When does MS-SQL maintain table indexes?

Hi, For arguments sake, lets say it's for SQL 2005/8. I understand that when you place indexes on a table to tune SELECT statements, these indexes need maintaining during INSERT / UPDATE / DELETE actions. My main question is this: When will SQL Server maintain a table's indexes? I have many subsequent questions: I naively assume th...

SQL Server search for a column by name

I'm doing some recon work and having to dig through a few hundred SQL Server database tables to find columns. Is there a way to easily search for columns in the database and return just the table name that the column belongs to? I found this, but that also returns Stored procedures with that column name in it... ...

How to set-up a database diagram from existing tables?

Hi all. I have a database which has almost 300 tables, I've just come across with a problem that I've added almost 60 tables into my diagram. I can only view the entire page if I set the page zoom to %10 and it's not really useful. Anyone has any suggestions for the problem? I need to view the diagram which is able to view more useful wa...

SQL Server table relationships practice

What is the recommended way in this situation: Customer ..* <-------------> 0..1 Car So there is a Customer table and a Car table, Customer can have zero or one Car, the Car can be linked to many Customer tables. Should I add a nullable CarID column to Customer or Should I create a Customer_Car_Map table containing CustomerID and Ca...

is it possible to format the data before going into the DB?

i have an access front end for a sql server database my question is: is it possible to format/input mask the data in a datasheet before it goes into the DB? for example, if i want to enter zip codes into the database. is it possible to set the length in ACCESS to be only 5 digits? how about a phone number? ...

adding a new column in SQL SERVER but it is not showing up in access

access is the front end and sql server 2008 is the backend i am opening the specific table in access. i have no problem editing data in this table using sql server and then displaying the changes in access; however, when i add a new field in sql server, the changes are not reflected in access. i am opening the table as a datasheet and ...

is there a simple front for sql server?

i am in a multi-user environment i am using access as a front end connecting to sql server database. i am allowing users to edit only one table in sql server. i dont want to continue using access to edit a sql-server table. can someone recommend another tool to do this? ...

many to many select query

I'm trying to write code to pull a list of product items from a SQL Server database an display the results on a webpage. A requirement of the project is that a list of categories is displayed at the right hand side of the page as a list of checkboxes (all categories selected by default) and a user can uncheck categories and re-query th...

SQL Query to get table name and number of rows based on column name"

Hello Everyone, I have declared a Cursor to get table names and no of columns in that tables based on column names.Please find the below query table name is not get inserted.Please suggest. Create table #t ( tabname varchar(500), NoOfRows bigint, ) Declare @Namee Varchar(500) Declare @GetName Cursor Set @Getname = Cursor for Sele...

Create a SQL table with a varying number of columns

I have two tables, say teacher and student. I want to build a third table called class. The class table will have one column for the teacher of the class. But I want too see if their is an elegant way to represent the students. My first thought is to have say 30 columns.. student1, student2 and have quids for each of these that tie back ...

Reading AND Writing Access 2 with SSIS

I went for a job interview this morning, and one of the scenarios that the IT manager (a former programmer) told me about was the following .... If anyone could give me any pointers that I can email him pointers to tomorrow (Wednesday 22nd) it may just help tip his decision in my direction. So there's beer in it if you answer a relevent ...

Does anybody know of a proc to turn a row into an INSERT statement?

Does anybody know of a proc or script which will generate any row into an insert statement into the same table? Basically, I'd like to call something like exec RowToInsertStatement 'dbo.user', 45; And the following code would be output insert into dbo.MyTable( FirstName, LastName, Position) values( 'John', 'MacIntyre', 'Software Con...

How can I get the 'External name' of a SQL CLR trigger?

I have created a SQL CLR trigger with the follow SQL: GO CREATE TRIGGER AuditAccountsTable ON [dbo].[Accounts] FOR INSERT,DELETE,UPDATE AS EXTERNAL NAME namespace.Triggers.AuditTrigger I am trying to query: select * from sys.triggers Is there a way to find the: EXTERNAL NAME namespace.Triggers.AuditTrigger on the trigger fro...

Appropriate SQL Server approach for retrieving this grouped data?

Hi everyone, I have a table (AU_EMPLOYEE) with two columns named EmployeeID (int) and LastModifiedDate (DateTime). Along with those columns are others containing additional employee data. This is an audit table and every time an employee's data changes in some way a new row is added. So it's quite likely a given employee will have mu...

compare two queries

How can i compare query X and Y and say that X is better then Y when they both take almost the same time in small cases scenarios??? the problem is that i have 2 queries that are suposed to run on a very big database, so run a evaluate is quite not a option (aka try and fail method), so we created a small database to perform some tests....

what does the access 2007 runtime enable me to do?

i have an access front end. the backend is a sql server database. can i have users download the runtime and have the full functionality of being able to edit the sql server database from the access front end? why is it free? what makes it different from the whole version? ...

Create an aggregate function for GROUP BY?

I have a query that outputs results as follows: Person Food ====== ====== Abner Apple Beth Banana Beth Peach Carlos Grape Carlos Kiwi Carlos Strawberry . . . . Namely, it associates a person with one or more foods. I'd like the functionality of an aggregate function to choose a food, but none of the built-in ...