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


all groups > sql server mseq > february 2004

Internal SQL Server Error on indexed views
Posted by skissane NO[at]SPAM iips.mq.edu.au at 2/25/2004 6:49:29 PM
Hi, I am getting an "8624 - Internal SQL Server Error" on SQL Server 2000 SP3 when inserting into a table which is used as the source of an indexed view. Without the indexed view being defined, the INSERTs work fine. I believe this is a bug in SQL Server. How can it be reported to Microsof...more >>

Arithmatic overflow with AVG?
Posted by Mike Hoyt at 2/24/2004 12:51:07 PM
I've created a temp table with an int type field on which I am then trying to perform an AVG. I get: Server: Msg 8115, Level 16, State 2, Line 1 Any ideas?...more >>

Execute a stored procedure and place results in a temporary table
Posted by Alastair Bell at 2/24/2004 9:26:05 AM
Could someone please advise me on the syntax in Transact SQL to execute a stored procedure (that returns records) and then place the results in a temporary table Thankyou - Alastair...more >>

INSERT
Posted by Darren at 2/20/2004 7:14:08 AM
I have ten tables. There is an ASP web front end. This is a work order and each table represents a page of the work order. They fill out the first form which is all of the customer info. There is an identity field that autoincrements the work order number. When they are done fil...more >>

cannot select chinese records
Posted by Jerry Lee at 2/19/2004 9:00:09 PM
Hi all, I have some problem when selecting records starting with chinese characters in my SQL Server All records can be displayed when I type 'Select * from [Table]', But when I just want to select some chinese records and I typed 'Select * from [Table] where [Field1] like '中&#...more >>

intersect function
Posted by burke at 2/19/2004 3:15:31 PM
i just came across the "intersect" function and can't get it to work. i'm familiar with "union". i've copied the example from books online and i get the following error: [Microsoft][ODBC SQL Server Driver]Syntax error or access violation i've tried to substitute "union" with "inter...more >>

Script to copy table between databases
Posted by newbie at 2/18/2004 12:11:05 PM
I'm trying to write/find a script that will copy all data from a table in database1 to the same table in database2. The databases are on the same server and the destination table already exists and is identical in design. I need to overwrite the destination table data if it already exists Thanks...more >>

Split Field or Extract a part
Posted by Robert at 2/18/2004 8:05:00 AM
I have been trying for some time to capture a part of a string to convert and sum a number accross my result set. The string looks like this: "abc,1 def,10 R-@@,xyz". I have been looking for a way to split the field or extract a part of it specifically "10 R-@@" but the problem lies in t...more >>



Convert string to Num
Posted by annu at 2/16/2004 7:21:05 AM
I am using VB 6.0 with SQL 8.0. I want to convert string to number one of my field in table. I am doing something like this. EMPNo is string in table, i want it to be numeric. I cannot change EMPNO field as numeric in table coz , raw data i get some of fields have PQ in front of it.. "select job...more >>

SQL Commands(URGENT!!)
Posted by Manoj Singh at 2/15/2004 11:57:13 PM
Hi all, Can somebody tell me how to use SQL server from command line (i.e. sql's command line commands) thanx and regards Manoj Singh...more >>

Help Primary Key violation
Posted by Andrea at 2/15/2004 12:56:02 AM
I'm trying to port access DB to Sql Server database. With access I can insert several rows also if someone are present in the destination table. For example if I have 20 rows in the dest table and I want to insert 30 rows from orig table to dest table, but 20 rows are present in the dest table, ...more >>

Cannot Restore SQL 7 Database backup error message
Posted by Sujay Basak at 2/14/2004 3:04:14 AM
Dear All Please help me, i am using sql 7 and NT back office ver 4. my Auto shrink option was not selected hence the log file has increased by HUGE amount. i have tried with shrink database option but still it didnt worked. i am getting the following error message while restoring the bac...more >>

Shrinking SQL Server 7 log file
Posted by Sujay Basak at 2/13/2004 11:51:00 PM
in my database the Auto Shrink option was not selected hence the Log file has grown into 8 GB .... Now the db cannot be restored from Backup reports error on insufficient disk space where as my disk have 30 GB of free space. Now how can i (1) reduce the log file size, (2) restore the db f...more >>

Need 0s instead of NULLs
Posted by Kole at 2/11/2004 7:33:32 PM
Is there a way to return "0" instead of "NULL" in a query? several columns that are from other views and are linked to a table where it returns all records from my main table. I need the NULLs to be 0s. Kole...more >>

Running SQL 2000 and Version 7 on same server and workstations
Posted by Carolyn at 2/11/2004 6:38:49 PM
Can we run a new program using SQL Server 2000 and an older program still running an SQL Version 7 database on the same network? We want to run both programs concurrently, but it appears that after we install SQL 2000 Client on the workstation, the SQL version 7 client can access the SQL ...more >>

Connect errors (help!)
Posted by phil at 2/11/2004 10:19:13 AM
While I am connecting to SQL server 2000 EE from a different client machine using Query Analyzer it gives me the following error message . Unable to connect to server > Server : MSG 18452 Level 16 state 1 [Microsoft ODBC ][SQL Server Driver][SQL server] Login failed for user '(null)...more >>

DATE'S
Posted by phil at 2/11/2004 5:23:11 AM
Hi All Just a quick thing can someone tell me what the format is when you want to convert the getdate() result to something like '11 Feb 2004' Thanks Phil...more >>

Need help with query logic
Posted by brian at 2/10/2004 1:52:10 PM
I have a three tables: computer, accessory, monitor Each table contains a location and value. I want to write a query that will list all records in each of the three tables in one result set. The purpose of this is so I can generate a report that will give the dollar value of computer...more >>

Recreate joins between tables
Posted by Rhonda Fischer at 2/10/2004 4:11:09 AM
Hello Some replacement tables have been copied into the database therefore breaking the joins that where there I wanted to recreate the contraints on these tables, and am trying with the following SQL Code? However it does not work. ErrMsg: Incorrect syntax near the keyword 'FOREIGN ALTER TABL...more >>

LINKED SERVERS
Posted by Phili at 2/8/2004 11:33:39 PM
Hi all, I am having problems with refrencing a table on a seperate server than the one that I am working on (if that makes any sense) I have never had this problem before. It keeps saying that it cannont find that database name in the sysdatabase table, which I know it shouldn't do as this ...more >>

User Function Syntax
Posted by KLomax at 2/6/2004 9:40:15 AM
In the statement below, the function name need's to be prefixed with "dbo." to work. Is there anyway to make a User Function visible without specifying the user? Meaning is there a way to make "SELECT Answer = fnPlusOne(2)" a valid statement? CREATE FUNCTION fnPlusOne( @Value int ) RETUR...more >>

how to select distinct rows from a table..
Posted by krishna at 2/6/2004 4:37:59 AM
i want to select distinct rows from a table... can i use like this... select distinct * from table i need all columns of the table to be retrieved.... it will be greatful if anybody can help me.. ...more >>

select printing
Posted by suj at 2/5/2004 12:53:54 PM
Table has 6 columns. One of the column say date contains date and null values. The same column I want to print in two columns as date and null headers with the values (if there is a date I want to print date as a date with date header, the null columns in a separate column with null heade...more >>

exclusive between?
Posted by tomg at 2/5/2004 6:10:03 AM
I'm running a query with a where clause that uses a "BETWEEN '1/1/04' and '1/31/04'", and I'm not getting any rows returned for Jan 31. I thought BETWEEN was inclusive? Anyone know what's going on here? ...more >>

How do I separate in SQL
Posted by Newbie at 2/4/2004 5:28:16 PM
Hi, I have a field that uses "," to separate items Eg apple, pear, orange Monday, Tuesday, Wednesday, Thursday How can I split this into columns based on where the "," appears ie. Expected Result apple pear orange Monday Tuesday Wednesday etc ...more >>

Locking a Record
Posted by JoeTroia at 2/4/2004 2:51:09 PM
I have a multiuser application where the users will be asking to see and then update any record in a table. They will ask for the next available record in the table. They will then view the data in the record and update it with some info. My problem is: How do I prevent someone from getting...more >>

QUERY
Posted by Phil at 2/4/2004 10:22:55 AM
Hi All It's getting to the end of the day and there is something that I just dont seem to be able to figure out. I have a number of address Example Below 3 High Street, Chester, 4 The Main Road, Liverpool, and they have trailing comma's, is there a easy way to get rid of these. ...more >>

Data type Varchar
Posted by Christophe at 2/4/2004 8:31:55 AM
For the data type varchar, if I have the length set to "50" in the table design mode, what exactly does this mean? The field will hold a string of up to 50 alphanumeric characters?...more >>

blob - binary string
Posted by Dave at 2/3/2004 2:06:19 PM
I am trying to extract the binary string representation of the data pointer in a binary type column in a SQL 7 database. I can't convert this number to an int with Cast or Convert and it does not always convert the correct infromation. I have used programs such as MS query from a client ma...more >>

send a query result by using SQL Mail error 2812?
Posted by lily at 2/3/2004 1:12:04 PM
Error Massage: ODBC error 2812(42000)could not find stored procedure 'sp_setuser by login'. Exceute query is: USE master EXEC xp_sendmail 'SQLAdminX@NWTraders.msft', @subject = 'Query Result: Total Products', @query = 'select count(*) from northwind..products' Thanks reply. ...more >>

Find tables where columns appear
Posted by Newbie at 2/3/2004 10:49:19 AM
Hi I want to be able to find all the tables where a particular column name exists i.e Result = table names where column 'OrderNo' exists How do I do this? Thanks ...more >>

How to find PK of tables in Database
Posted by Newbie at 2/3/2004 10:47:55 AM
How can I find the Primary Keys for each table in a database? I tried (as suggested in an earlier post): select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_TYPE = 'PRIMARY KEY' but this doesn't give me the field names that make up the PK What should it be? ...more >>

QUERY
Posted by Phil at 2/3/2004 1:17:51 AM
Hi All, I have asked this question before but I am un-able to find the response that I was given. I have a selection of fileds in a table and one one the fields look's like this 4 bed, semi-detached 5 bed, terraced 2 bed, house I need to break this down into 2 fields, is there a way ...more >>

Help with query . . . . Please
Posted by Newbie at 2/2/2004 9:31:33 AM
Hi I want to be able to delete the records that are selected using the following SQL SELECT AR.OrderNo FROM tblarOrder AR LEFT OUTER JOIN tblOrder FO ON AR.OrderNo = FO.OrderNo WHERE (FO.OrderNo IS NULL) ORDER BY AR.OrderNo I have tried changing SELECT to DELETE * but it ...more >>

Data
Posted by Viraj at 2/1/2004 5:51:42 PM
hello sir I am using MS sql7.I am using a transaction table of having 10 columns A,B,C,D-char(15), E,F-varchar(30), G,H,I-numeric(15,3),J-datetime, each.Yearly approximtelly 15-20 lakhs of records will enter init,also index columns are there.For 2-3 years if i am keeping data like this i...more >>


DevelopmentNow Blog