Archived Months
January 2003
March 2003
April 2003
May 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
April 2008
all groups > sql server programming > november 2006 > threads for tuesday november 28

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

Another silly newbie question
Posted by NevilleT at 11/28/2006 9:50:00 PM
I am developing a SQL backend for an Access project. If you want a laugh, read on. Here is a silly question from a newbie. I have two tables. One table determines who can look at what project (tblAvailProject) and the other is the project table (tblProject). I created a test stored pr...more >>


signal on Execution plan
Posted by Roy Goldhammer at 11/28/2006 9:49:00 PM
Hello there on the exetuion plan i see new sign "Segment". what it means? ...more >>

MSDE Instance
Posted by vbnetdev at 11/28/2006 8:36:09 PM
When I install my instance of NETSDK MSDE I am trying to get it to appear as the instance shown in the MSDE Explorer in the task bar. How can I do this? All I get right now is it saying it can't be connected. ...more >>

windows based authentication security
Posted by 912.gautam NO[at]SPAM gmail.com at 11/28/2006 8:25:34 PM
Hi, In an MS SQL server application using windows based authentication. There are 2 databases on the same server. There are many clients connecting to a server. On the client machine I have MS SQL client connectivity tools installed. On the server machine the entire server is installed. ...more >>

SELECT FROM statement
Posted by TBoon at 11/28/2006 7:48:00 PM
Does the order of Tables in SELECT statement effect the performance? E.G. SELECT * FROM Tab1, Tab2, Tab3; SELECT * FROM Tab3, Tab1, Tab2; ...more >>

What
Posted by Allen_N at 11/28/2006 7:12:01 PM
I have written a script that creates a sequence of temporary tables before creating a (permanent) table. When I run it repeatedly, I get messages such as: There is already an object named '#items_cost' in the database. I tried to drop #items_cost after testing for existence (using the Q...more >>

Search date for year portion?
Posted by ana9 at 11/28/2006 6:25:25 PM
I am trying to grab a years worth of data simply by letting the user enter the year in a parameter and then search the date like a string. The following works just fine: SELECT * FROM Sales WHERE Date_Close LIKE '%2006%' But when I try to modify it to: SELECT * FROM Sales WHERE Date_Close ...more >>

How to pass in a variable and use it as a column name?
Posted by Auutumn at 11/28/2006 6:17:00 PM
I have a stored procedure and I want to call it with a variable that will be the name of a column, any ideas on how to code this? Here's a quick example of what I'm working on. CREATE PROCEDURE spScoreCheck @subject varchar(10) AS SELECT @subject FROM db -- ==================== ...more >>



"Internal SQL Server error."
Posted by Mike C# at 11/28/2006 5:23:05 PM
"Server: Msg 8624, Level 16, State 7, Procedure p_get_LocalAuthor2, Line 58 Internal SQL Server error." ....and on that note, I'm going home. ...more >>

help with naming a constraint
Posted by Keith G Hicks at 11/28/2006 4:36:38 PM
I'm not following the help clearly in BOL on this. I'd like to add a column to a table and name the DF constraint myself. For example, when I run the following in QA: ALTER TABLE Customers ADD CustomerHeight INT NOT NULL DEFAULT 180 the default constraint ends up named something like this:...more >>

Error messages
Posted by Robert Bravery at 11/28/2006 4:08:21 PM
HI all, For a particular reason, I have a transaction, that has the possiblity of raising three error messages. I would like to combine this into one error message and pass it back to the client via one raiserror() throuhj a SP Thanks Robert ...more >>

Question regarding sp_fulltext_table
Posted by MuZZy at 11/28/2006 3:55:59 PM
Hi, If i run this proc twice: EXEC sp_fulltext_table 'ContactDocumentImage', 'start_change_tracking' ....the second time i run it i will get an error: Server: Msg 15631, Level 16, State 1, Procedure sp_fulltext_table, Line 239 Full-text change tracking is currently enabled for table '...more >>

TSQL varbinary and C# Byte[]
Posted by dev648237923 at 11/28/2006 3:48:32 PM
I have some varbinary data. In SQL Manager I do: update mytable set myfield = 0x0001 select * from mytable --this works and shows that the fields have 0x0001 Now in C# I do: byte[] buff = new Byte[2]; dr.GetBytes(1, 0, buff, 0, 2); When I do BitConverter.ToUInt64(buff, 0).ToString("X") the ...more >>

Converting Access Queries to SQL Server view.
Posted by Don at 11/28/2006 3:33:01 PM
Hello, I'm moving a access query to a SQL server view. In the access query it does some calculations early on in the query that are than referenced further down. Is there anyway to do this in SQL Server. select IIf([Mat_Config]="s",1,2) AS MatFactor, [Roll_Width]*([Draw]+[Size_Var])*[Mul...more >>

MI5 Persecution: Capital Radio - Chris Tarrant
Posted by MI5-Victim NO[at]SPAM mi5.gov.uk at 11/28/2006 2:41:52 PM
-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-= -= Capital Radio - Chris Tarrant -= -=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-= Capital Radio DJs have been "in on it" from the start. One of the first things I heard in the summer of 1990 was from a Capital DJ who said, "If he listens to Capital then he can't be a...more >>

copying table structure
Posted by qjlee at 11/28/2006 2:10:02 PM
Hi, I want to copy the table structure of table named T1 from database A to database B with the same table name (not exist in database B yet). How can I do that? Thanks in advance. ...more >>

On Delete Cascade
Posted by Sunny at 11/28/2006 1:32:31 PM
Hi Everybody, How do I programatically set "on delete cascade" to true in SQL Server? I have a Users Table and I have bunch of other tables which has Fkey for Users table, so I need to programatically set the "on delete cascade" to True. Any help or Idea is Appreciated. Thx, Sunny...more >>

sproc for querying null columns
Posted by Chuck P at 11/28/2006 1:07:02 PM
I need a sproc that return the rows from a table based on a nullable int column. The column contains values which are null or >=0 only. The user passes in an int parameter @StatusID 0 - all rows 1 - only rows where nullablecolumn is null 2 - only rows where nullablecolumn is not...more >>

Finding Illegal Characters in a String
Posted by scott at 11/28/2006 1:00:28 PM
I'm looking for a WHERE clause at the bottom of my code below that will return only records that contain "illegal" characters in the first 2 digits of the f1 field. What I mean by "illegal" is any character that is not a number or letter of the alphabet. I posted a similiar scenerio to filt...more >>

Selecting job history information from sysjobhistory in msdb
Posted by gv at 11/28/2006 12:02:25 PM
Hi all, using SQL 2000 When selecting "message" column from "sysjobhistory" table, doesn't contain the entire error message compared to the job history option, from right clicking on a certain job under SQL Server Agent - Jobs. For Example: under Job history when right clicking on a jo...more >>

Users not able to connect my local database
Posted by raju75 NO[at]SPAM gmail.com at 11/28/2006 11:50:00 AM
Hello All, I am having a winforms app in which am using my local database server as the database machine. It works fine when I run the application from my machine, but when I have the application run from other uses in my group they can't get to my machine. They get an error "Timeout expired. ...more >>

Get Least Number
Posted by Jay at 11/28/2006 11:16:08 AM
In a table like so: col1 varchar(10), col2 int with the following data: qwer, 2 asdf, 5 erty, 3 ghju, 1 edcv, 4 asdf, 3 I need to insert rows into the table and assign col2 equal to a number from 1 to 6 tht has the least amount of corresponding number already in col2. So in th...more >>

Difficulty with Data Types
Posted by Nicholas at 11/28/2006 11:16:02 AM
I have an SSIS package that I'm working on, and I'm having some difficulty with the DATETIME data type. The package is using a FOREACH Loop to traverse directories, and read CSV files. The date and time values look like this: 2006/11/11,13:01:05.703, I need to insert these values into ...more >>

comparing structures of 2 dbs
Posted by Keith G Hicks at 11/28/2006 10:51:49 AM
What's the best way to compare the structures of 2 databases that are supposed to be the same? I can script them (using the scripting feature in EM) and then run them through a text comparison tool but it seems that scripting does not always produce results of objects in the same order. This mak...more >>

Convert varchar field to numeric
Posted by MJ at 11/28/2006 10:09:37 AM
Hi, First off, thanks to everyone for replying to my earlier posts. Much appreciated! Second... I am at the point where I have some varchar values like so: 2.6 0.128 23 3.4 0.023 I do a case statement to check isnumeric and it typically is (if it isn't, I set the value to null). ...more >>

MS SQL vs MS Access ORDER by GUID field
Posted by TomH at 11/28/2006 9:56:02 AM
I have two tables: 1) SQL Database table with a field defined as a PK (data type is 'uniquidentifier', 16 chrs) 2) Access database table with a field defined as an autonumber (field size is Replication ID) I want to compare these two tables using these two fields. However, when I perform ...more >>

Design Question
Posted by Wannabe at 11/28/2006 9:22:02 AM
I have two tables. One table is located in our common database and has projects common to all other databases. Table One -- Projects ProjectID Name The other table is located in a specific database and has its own Projects table specific to this database and no others. Table Two -- Pr...more >>

transfer tempdb
Posted by FARRUKH at 11/28/2006 8:37:02 AM
I want to transfer my tempdb database in a bigger drive. I never done this thing before so I need help. Anybody has steps to follow when you move tempdb thanks Farrukh...more >>

Date Functions
Posted by BillyRogers at 11/28/2006 8:08:03 AM
I'm trying to write a formula that returns the date of the first day of the prior month. This works, but I'm wondering if there is a better way. I have lots of scripts where the dates are always the first or last day of the prior month. I want to turn them into functions so I don't have to ...more >>

Sending comma-delimited parameter to SP
Posted by VMI at 11/28/2006 7:50:02 AM
My SP uses the IN operator, and I want to send this SP a comma-delimited string that will then be used with this IN operator. if I call it this SP this way " usp_names 'John, Bob' " it doesn't return anything. If I call it in this format " usp_names ' ''John'', ''Bob'' ' ", it still doesn't...more >>

@@ROWCOUNT
Posted by Rob at 11/28/2006 7:10:02 AM
Hi, I have the following code where I check to see if bt_valid is not equal to 1 for a particular code. If the query does not return any rows, I spit out a message and exit. However, when I run the code, it print nothing and does nothing. IF (SELECT bt_valid FROM vw_bt WHERE code =...more >>

Switching position of two rows help
Posted by trint at 11/28/2006 6:27:41 AM
I have a variable in coldfusion which contains an id#. the variable is called #custCartQuery.id#. Here is what the table "custom_carts" looks like: id file_name description thumb_name name position 1 Bristol 06 AC 0105.jpg ...more >>

Underlying table for a view (sql2000)
Posted by Rippo at 11/28/2006 5:50:00 AM
Hi I want to be able to get ALL columns for a view that is either:- 1. The column in the underlying table is a priamry key 2. The column in underlying table is a foreign key with an index Does any one know how to do this? Thanks Rippo ...more >>

>> SQL Server 2005 Database Problem with ASP.Net
Posted by g n d z k d r at 11/28/2006 4:51:04 AM
hii all, im new on ASP.Net and working on a website project now. im using Visual Studio.Net 2005(c#.net) and SQL Server 2005. i made a connection to database from Default.aspx, and my connection string is myConnection = new SqlConnection("server =(local); uid =sa; password=bilsekbiz; dat...more >>

Assigning a determind value
Posted by redforest at 11/28/2006 4:31:09 AM
Hello I'm really stuck at the moment and in desperate need of help I am wanting to assign a value from a list depending on 2 factors, here's what I mean . . . I want to add a formula that will look at a list and determined the value, this would be P1 to P5 and within this rang...more >>

Help using ORDER BY clause in a function
Posted by Shawn at 11/28/2006 3:17:01 AM
HI; I'm trying to create a simple function that would extract some data from a table and order it. However when i try to execute the create it returns ... "Msg 1033, Level 15, State 1, Procedure ListEmployeeTelephones, Line 12 The ORDER BY clause is invalid in views, inline functions, derived...more >>

Cursor performance
Posted by mrshrinkray NO[at]SPAM googlemail.com at 11/28/2006 2:13:03 AM
It seems to be a well known fact that you avoid cursors when looping through data in TSQL, atleast that's what most performance tips tell you. Using while loops and temporary tables, subqueries and so on. So why does the MCAD/MCSE (SQL Server exam) preach the way of the Cursor when they are pe...more >>

Using SP to insert to another dynamic database????
Posted by Vanessa at 11/28/2006 12:02:12 AM
Hi, Does anyone know how to use Stoed Procedure to do any operation from one database to another database using SQL Server 2000. Eg , I have 1 server, inside got 2 database. The SP will do a insert from database 1 to database 2. However the name of database 2 is unknown at the point ...more >>

Calling function inside Select
Posted by italic at 11/28/2006 12:00:00 AM
Hi All, I have 1 table and 1 function. Function has one output parameter, and one normal parameter. I want to call function inside Select. I tried Declare @FunctionReturn varchar(256) Select MyFunction( Column1, @FunctionReturn output) from MyTable I received this error: 'Line 2: Inco...more >>

Dynamic Linked Server
Posted by CM at 11/28/2006 12:00:00 AM
Hi All, Consider a situation. We are developing an application that will syncronize two databases hosted on two different physical server (Assume DBServer1 and DBServer2). Further assume DBServer1 is our base database and DBServer2 is added as linked server. Now we have number of different...more >>


DevelopmentNow Blog