Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


Archived Months
January 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


all groups > sql server (alternate) > december 2006

Filter by week: 1 2 3 4 5

PIVOT
Posted by Nassa at 12/29/2006 10:22:18 PM
Hi everyone, I have 3 tables: Telbook(Id:int,Name:char,address:char,comment:ntext,owneruserid:int), PK:id TelNumbers(telbookid:int,telno:char,telNotype:int,syscode:int),PK:syscode,F= =ADK:telNumbers.telbookid=3Dtelbook.id Teltypes(teltypes:char,fk:int),FK:telnumbers.telnotype=3Dteltypes.fk...more >>

argue why sql2005
Posted by fireball at 12/29/2006 5:25:37 PM
well, I need to justify to my client, why to switch to sql2005 form 2000. I know a lot of 'why it's better', but my client don't really care most of those aspects. I need to argue, my client's business gains on that. Thnaks in advance. ...more >>

when to use fully qualified names ([database].[schema].object)
Posted by fireball at 12/29/2006 4:53:43 PM
I wihsh to discuss whether to use fully qualified names: [database].[schema].object of objects to operate (create, query..) on is good or not? If someone change order of sql code blocks in my script - this may cause lose of it's context (like: use master / use <mydb>..). I wish to have m...more >>

does ms sql support two phase commit protocol
Posted by amoon.ljlj NO[at]SPAM gmail.com at 12/29/2006 3:13:51 PM
Hello , My question is: does ms sql support two phase commit protocol? and Why if no. How if yes. Thank you ...more >>

Bulk Insert Questions
Posted by Jennifer at 12/29/2006 3:02:02 PM
I'm using Bulk Insert for the first time and have a question. I'm getting an error message about a field being truncated: Bulk insert data conversion error (truncation) for row 2, column 12 (Depleted) The data type for the "Depleted" column is Char(1). Looking at the file, there is indeed...more >>

Which SQL Server
Posted by Igor at 12/29/2006 1:46:40 PM
On Win2000 or Win2003 you can use SQL Server 2000 Desktop Edition. On WinXP you must use only SQL Server 2000 Developer Edition. Which SQL Server 2005 I can use on WinXP? ...more >>

Crosstab. 2 totals ?
Posted by Jim Andersen at 12/29/2006 12:22:47 PM
Hi, Am using robvolks crosstab-procedure to generate a crosstab query. I get this result: Total A B C juli 455 1 107 347 okt 83 1 9 73 aug 612 1 113 498 juni 451 1 108 342 So I get a total for each month. But I would als...more >>

SPID in Blk By is itself
Posted by Absinthe at 12/29/2006 11:31:06 AM
I am seeing intermittent blocking problems. The strange part of it is, that the SPID listed in the Blk By column is the same as the SPID that is being blocked. Has anyone seen this before, or have any idea what this may suggest? ...more >>



SS 2005 Express- Allowing null values and Foriegn Key Constraints
Posted by Rico at 12/28/2006 7:57:13 PM
Hello, I have a foreign key constraint between two tables (Appointments and MissedAppointmentReasons) and I'd like to allow null values in Appointments table for the field containing the MissedAppointmentReason, but currently, I get a Foreign Key Constraint Error when I try to add a record ...more >>

Connection SQL Server 2005 with DNS hostname mismatch
Posted by Mark Delaney at 12/28/2006 4:33:26 PM
When using the MS SQL 2005 JDBC driver, I now need to have the DNS name resolution to the client correctly set up. If not I get the following error: SQLState: 08S01 SQLError: 0 Message: hostname : hostname Where "hostname" is the client host name. It doesn't seem to matter if I use an IP...more >>

Picture in database
Posted by Igor at 12/28/2006 3:55:35 PM
Can i put picture in sql server database but not filename and path. I want to put complete picture in field in database. Is it possible? ...more >>

Convert from Access to SQL Server
Posted by Igor at 12/28/2006 2:01:41 PM
Can I convert .MDB file to SQL Server database or I need to develop SQL server database from begin, every table, every field? ...more >>

Document Search for CMS
Posted by StevePBurgess NO[at]SPAM gmail.com at 12/28/2006 6:32:54 AM
I have a database which stores documents (e.g. policies and guidelines) in our content management system. The follow relationships exist: Documents (1-to-Many) LinkTableKeywordLink (Many-to-1) Keywords Documents (1-to-Many) LinkTableAttachments (Many-to-1) Attachments Documents (1-to-Many)...more >>

putting names of objects to control-flow loop creating objects
Posted by fireball at 12/27/2006 6:03:20 PM
please help newbie I need to create a lot of objects the same type (let's say: schemas) I wish to use paramerized block in loop to do so. - how to put names of my objects to such control-flow? belss you for help ...more >>

how to try-catch 'sp_addrolemember'?
Posted by fireball at 12/27/2006 3:36:53 PM
how to try-catch sp_addrolemember? ...more >>

Question: re-associate dbo with sa??
Posted by BD at 12/27/2006 3:36:46 PM
Hi all. Running SQL2K SP4 on W2K3 Standard, SP4. I have just refreshed a database on one server with a backup from another. The database had existed previously on the target server, and I am just refreshing its contents. I used the following approach 1) From the target server, create a SQ...more >>

server version
Posted by fireball at 12/27/2006 3:35:05 PM
I need to test, wheather my scripts run under proper instance version (ie. if it is 2005). I only know @@VERSION, but taht's not it. Any suggestions? ...more >>

Site Search Code Help
Posted by EvoEight NO[at]SPAM gmail.com at 12/27/2006 10:25:21 AM
I'm writing a search for our site and I'm running into a few problems. When I run the query like this, it runs just fine: Declare @Keywords varchar(2000) Select @Keywords = 'modern trial advocacy canada' Select product_id, name, count(name) hits FROM estore_products INNER JOIN sequence ...more >>

MI5 Persecution: Capital Radio - Chris Tarrant
Posted by MI5Victim NO[at]SPAM mi5.gov.uk at 12/26/2006 6:38:08 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 >>

help me plz!!
Posted by frien at 12/26/2006 1:01:25 PM
I am pretty new to the subject...i would really appreciate if you could help me with this doubt... I need to write a C# code which performs the following: a) connects to the sql server database( I dont know the procedure to connect to the data base) b) on a web page i need to display the ...more >>

Connections
Posted by Marcelo at 12/26/2006 12:33:13 PM
Hi I would like to know about connections of sa, where SQL store the number of connections ...more >>

Dynamically Changing the length of a varchar(n) field
Posted by John at 12/26/2006 3:46:45 AM
Hi Everyone, I have a question about dynamically changing the length of a varchar(n) field, in case the value I'm trying to insert is too big and will give a "truncated" error, but before the error is given! i.e. Is there some kind of a way to "test" the length of the field while Inserting the...more >>

Fetch Query that triggered the TRIGGER
Posted by Anubhav at 12/25/2006 11:13:19 PM
Hello The problem is need to find out the querry that has updated or inserted into the table and in turn 'Triggered the Trigger'. I have the user name, the machine name, Application name, but not the query. The update is not desired and the application is doing it but the application being so...more >>

http://www.dbahub.com
Posted by dbahub.com at 12/22/2006 12:03:47 PM
Hello Folks, I have been compiling this new site www.dbahub.com, from a couple of weeks. I am trying to get most of the popular databases under one site, where all DBAs can find relevent information. I encourage to register with this website and submit documents, scripts, tips etc. and I will m...more >>

ORDER BY CASE
Posted by Sharif Islam at 12/22/2006 11:13:25 AM
this is my query= "SELECT i.itemid,title,SortKey from Items AS i JOIN Links AS L ON (i.ItemID=L.ItemID) WHERE L.instructorID='12232' AND courseID='12' AND type='Audio' order by CASE WHEN Sortkey is not null then 1 else 0 end" My SortKey can be NULL. Here's the output I am getting: (the ||...more >>

Stored Procedure Range Not Working
Posted by red vertigo at 12/22/2006 1:33:31 AM
Hi All, I am trying to write a basic stored procedure to return a range of values but admit that I am stumped. The procedure syntax used is: ALTER PROCEDURE Rpt_LegacyPurchaseOrderSp( @StartPoNumber PONumberType = 'Null', @FinishPoNumber PONumberType = 'Null') AS SET @StartPoNumber ...more >>

How to search binary fields?
Posted by Mintyman at 12/22/2006 12:00:00 AM
Hi, I want to run queries on a table that has binary fields in it. How do I filter on a binary field? E.g. One of the fields is called 'Account_Manager_ID' which is binary - I would like to do a simple Select * from company where Account_Manager_ID = 'blah blah blah' When I do this, it r...more >>

Script to combine multiple rows into 1 single row
Posted by Mintyman at 12/22/2006 12:00:00 AM
Hi, I'm working on a system migration and I need to combine data from multiple rows (with the same ID) into one comma separated string. This is how the data is at the moment: Company_ID Material 0x00C00000000053B86 Lead 0x00C00000000053B86 ...more >>

protecting functions from view it
Posted by Pulpet at 12/22/2006 12:00:00 AM
Hello, I wrote some complicated functions (and stored procedures) in database at my work. System administrator (and every db user) can view codes (in Enterprise Manager for eg.). My employer needs periodic modifying of code and so I'm required to do it. But I can loose my job :) because users...more >>

[scripts] prompting user
Posted by fireball at 12/21/2006 10:26:40 AM
please, how to promt user in mu sql 2005 script? For example, I need user to confirm some operations.. . Thx in advance ...more >>

Problem with trigger
Posted by Jimbo at 12/21/2006 9:26:27 AM
Im having problems with an after insert trigger... Im trying to join the INSERTED table with other tables to retrieve data....Some of these tables it must link to get data inserted into them at the same time my original table does...my question is why when the trigger runs, my sql statement ge...more >>

Writing file from SP with text column
Posted by pablo.erba NO[at]SPAM gmail.com at 12/21/2006 3:49:59 AM
Hi Everyone, I=B4m new to this group, I=B4m trying to write a text files adding content from a text column (more than 8000 characters), I found code how to write files and it works but i have the problem when added the text column to the body of the file. any idea? tip?=20 thanks in advance...more >>

The Process Could Not Log Conflict Information
Posted by Benzine at 12/20/2006 9:22:15 PM
I recently setup merge replication and for each subscriber I add an try and synchronize I get the following error message: "The Process Could Not Log Conflict Information" When I view the details of the error it states the following: "The Process Could Not Log Conflict Information. (Sourc...more >>

sp_executesql vs. EXECUTE
Posted by fireball at 12/20/2006 6:50:10 PM
please, in simple words, what is difference between : sp_executesql and EXECUTE in sql2005 ? ...more >>

if exists condition..
Posted by fireball at 12/20/2006 6:17:24 PM
which is more proper: if DB_ID(@db) IS NOT NULL or IF EXISTS (SELECT name FROM sys.databases WHERE name = @db) ? regards ...more >>

2-3 words in field name
Posted by Goran at 12/20/2006 9:42:29 AM
Can I define field names with more words in Access and SQL Server like field: "Bus station" instead "BusStation" or "Bus_Station"? I have had problems because of this in VB6. Can I have problems in VB 2005 or C# 2005 and SQL Server? ...more >>

Security Tips
Posted by coosa at 12/20/2006 5:50:15 AM
Dear all, I'm designing a system including the database and the security represents the most crucial aspect of the system; hence for the database security i have implemented the following aspects and need your advise on further aspects or perhaps corrections where by the system is web based u...more >>

Problem with CCommand::Open when query str is too long.
Posted by TheOne at 12/20/2006 1:08:26 AM
I'm using OLE DB model to insert long texts into ntext field. My code looks like : == BOOL COleDBRowData::Execute(CString strSQL) { if(!m_bIsOpen) return FALSE; CCommand<CNoAccessor, CNoRowset> rs; HRESULT hr = rs.Open(m_session, strSQL); if(FAILED(hr)) return FALSE; rs...more >>

Max. number od users in SQL server
Posted by Goran at 12/19/2006 3:26:07 PM
How many users can access to SQL server at the same time with web aplication written in C# 2005? What if my database is 1GB and 1000 people access at 1 second - some simple query. My web hosting acc will be http://www.webhost4life.com or something simmilar! ...more >>

string function
Posted by TGEAR at 12/19/2006 2:48:36 PM
select distinct(f.agency+y.year+s.type) as SDNF In this select clause, I try to use the last 2 digit of year for y.year value. which function should i apply to it? ...more >>

SQL 2005, "build" scripts?
Posted by Eric J. Holtman at 12/19/2006 1:45:16 PM
Am I missing something obvious in the 2005 Visual Studio portion of SQL Server? I have a database design, with a bunch of tables, views, stored procedures, etc, etc. I want to store each object in a separate file, so I can keep them in Source Safe. Is there a command that will "rebuild" ...more >>

pagefile and memory advice??
Posted by tlyczko at 12/19/2006 6:48:59 AM
Hello, I've been reading about this topic, and I've gotten myself more confused, not less. We have a single-processor license SQL Server Standard 2005 (xeon 2.8 ghz) with 4 GB RAM in Windows Server 2003 SP1 Standard. I turned on the /3GB switch in boot.ini but not PAE or AWE, would it be go...more >>

Conditional query results
Posted by msrviking NO[at]SPAM gmail.com at 12/19/2006 3:33:45 AM
Hello everybody, After several attempts of writing the query, I had to post my requirement in the forum. Here is what I have, what I need and what I did. Table A Col1 Col2 1 Nm1 2 Nm2 3 Nm3 Table B Col1 Col2 10 100 20 200 Table C Col1 (A.Col1) Col2 (B.Col1) 1 10 2 10 Ta...more >>

A question about an error message
Posted by Comagmbh NO[at]SPAM gmx.de at 12/19/2006 1:22:57 AM
Hello! I am new to this group and I hope anyone can help me. I have an error message which is very complicated to me. Okay this message is very simpel, but I don`t understand how to build my SQL statement. I use MsSQL 2000 and I am new to Microsoft SQL. I have searched the web and read the on...more >>

a question about Exec
Posted by findu_2005 NO[at]SPAM yahoo.com at 12/18/2006 1:25:09 PM
Hi, When I run the following command on sql server: exec ('print "OK"') go This message appears: Server: Msg 128, Level 15, State 1, Line 1 The name 'OK' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted. Why? T...more >>

Replacing NULL value in multiple columns in a table
Posted by BF at 12/18/2006 12:50:43 PM
Hi, I have some tables where I import data in, lots of field have gotten a NULL value which the application can not handle. Now can I replace each NULL value with '' in a columns with: update <table> set [<column>] = '' where [<column>] IS NULL But because there are lots of columns this i...more >>

xp_cmdshell
Posted by tolcis at 12/18/2006 9:54:56 AM
Hi! I have a batch file (.bat) that I need to execute inside my stored procedure (SQL 2000). I am trying to call that batch file using xp_cmdshell command. I am probably not using it the right way but I am trying to pass a path of the batch file into xp_cmdshell and it doesn't recognizes it ...more >>

Split Data file into multiple file groups..!
Posted by Query Builder at 12/18/2006 8:45:40 AM
I have one of our production Accounting Databases starting from 2 GB now grown into a 20 GB Database over the period of a few years... I have been getting timeouts when transactions are trying to update different tables in the database.. Most of the error I get are I/O requests to the data f...more >>

Help!? Combining SQL Queries? Can it be done??
Posted by isdeveloper NO[at]SPAM hotmail.com at 12/18/2006 8:13:59 AM
Hi All, I have a problem with a table that I want to get nice data out of in a single query. The guys here reckon it can't be done in a single query but I wanted to prove them wrong !! Essentially, I want to get the same column out of the single table, but in one case the column must have a w...more >>

Weird millisecond part of datetime data in SQL Server 2000
Posted by aling at 12/18/2006 4:48:54 AM
Execute following T-SQL within Queary Analyzer of SQL Server 2000: ======================================= DECLARE @dTest DATETIME SET @dTest='2001-1-1 1:1:1:991' SELECT @dTest SET @dTest='2001-1-1 1:1:1:997' SELECT @dTest SET @dTest='2001-1-1 1:1:1:999' SELECT @dTest =======...more >>


DevelopmentNow Blog