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 > august 2003 > threads for tuesday august 12

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 31

Create default help
Posted by Hassan at 8/12/2003 11:12:02 PM
I have a table as follows Create table T1 ( Col1 varchar(10), Col2 numeric(18,1)) insert T1 ( Col1) values 'ABC123.4' insert T1 ( Col1) values 'NAD' insert T1 ( Col1) values 'XYZ' insert T1 ( Col1) values 'ABC223.4' insert T1 ( Col1) values 'ABC023.4' What i want the output of T1 ...more >>


can I restore Using online application
Posted by Vikrant at 8/12/2003 8:02:41 PM
Can I restore database stored in SQL-Server 2000 using an online application. When I tried it is giving an error that -- "exclusive access to the database cannot be obtained. Database may be in use." Probably this is happening as I am using a connection pool to optimize my application. Sugge...more >>

Full Text Indexing
Posted by Eric Levin at 8/12/2003 7:49:48 PM
I have a table using Full Text indexing on a column called Keywords: When I do a search on the database I am not getting results for certain searches: e.g.: Keywords field: 296924 : Electronica, Techno : Playful : Howly - 2.36 version. Upbeat trance techno beat with slight aerobics style...more >>

Truncating the Log
Posted by brian at 8/12/2003 6:56:16 PM
Question: When you append transaction logs to a file will they automatically delete when the transactions become inactive because a full backup was done? My problem: I want to append transaction logs to job 1 all day long and do a full back up at the end of the day to job 2. In the mor...more >>

help with CASE
Posted by Rick Charnes at 8/12/2003 6:53:09 PM
Thanks ~very~ much for the previous help; much appreciated. One more: I have a table COVERAGE: subm_no portion minor_line 39792 P 01 39792 P1 36 If EITHER of the portions for subm_no 39792 have minor_line = 36, my SQL statement needs to display YES for ...more >>

GROUP BY
Posted by Matthijs ter Woord at 8/12/2003 6:39:45 PM
Hi everybody What is the purpose of the Group By clause of SQL i think it's worthless because i have to group on the fields which i select Matthijs ter Woord ...more >>

Service Pack 3 AHHHHHH
Posted by Dustin Flegel at 8/12/2003 6:26:31 PM
Ok, I installed Service Pack 3 in hopes of keeping everything on the system up-to-date. Halfway through the installation I get an error saying it can't install one of the .sql files then the installation STOPS. It doesn't try to do it again, doesn't try anything. I try to run the in...more >>

Enterprise Manager shows Many-to-Many
Posted by Chris Whitehead at 8/12/2003 6:01:58 PM
I've created a one-to-many relationship. When I view the network diagram in the Enterprise Manager diagram tool it correctly shows it as a one-to-may relationship. When I create a view using Enterprise Manager and add the two tables it shows it as a Many-to-Many relationship. Why? Am I miss...more >>



UPDATE problem...
Posted by Vgs at 8/12/2003 5:52:58 PM
Hi, My tables are like this... TABLE A TABLE B col1 col2 col1 col2 col3 1 m 1 m NULL(1) 1 n 1 m NULL ...more >>

outer join
Posted by Chris Dangerfield at 8/12/2003 5:51:48 PM
Hi, Here is one for you. I have 2 tables tbl_questions tbl_answers tbl_questions id question tbl_answers id question answer stock_code SELECT a.stock_code, q.question FROM tbl_www_products_technical_answers a RIGHT OUTER JOIN tbl...more >>

URGENT: Please help write this query
Posted by Jay at 8/12/2003 5:40:11 PM
TABLE1 ======= Date Symbol Value ==== ====== ==== 1/1/99 A 5 1/2/99 A NULL 1/3/99 A 4 1/4/99 A 7 1/5/99 A NULL 1/6/99 A 4 1/7/99 A 3 1/8/99 A 7 1/9/99 A ...more >>

Case in Where... exclude, include or all
Posted by Loeri at 8/12/2003 4:56:10 PM
Hi, I am attempting to use a CASE inthe where clause. I have simplified this example... obviously there are other elements to the where clause. Basically, I am returning a list of all the classes that a school offers. I have a parameter called @History that can be one of 3 values ('A...more >>

Simple Select Statement
Posted by CSharp ( ILM ) at 8/12/2003 4:45:37 PM
Hello, I have the following Select statement ( how do I make it more complex ? just kidding..) select * from ScopeContent Where ((scope = 0 and ItemID = @ItemID) or (scope=1 and DeptID = @DeptID) or (scope=3 and CompanyID = @CompanyID)) The Select statement above is good if I place De...more >>

Money data type
Posted by Darin at 8/12/2003 4:44:32 PM
I have a database that uses the money data type a lot. Well, it is causing problems because it goes out to 4 decimal places $32.1234 - and I don't know what a tenth or hundreth cent piece looks like. So I want all money fields to be changed and only be 2 decimal places. I did an alter table...more >>

Executing DTS based on the results of a query.
Posted by ryan.d.rembaum NO[at]SPAM kp.org at 8/12/2003 4:43:48 PM
I am a newbie to SQL 2000 and am running into a problem. We have files that we import every month. I want to automate the importing of these files. Previously, this was done via Access, but I have been asked that I do the same thing directly through SQL 2000. I know how to import a file via ...more >>

Performance question
Posted by Tomer at 8/12/2003 4:25:03 PM
Hi all, Please help me with the following performance issue: I have two views; Each of them combines about 5 large tables and returns about 15 columns. Each view is already used by some part of my system. I need to retrieve some of this data for a new component. I wonder whether it woul...more >>

A question about SQL Server
Posted by Vitamin at 8/12/2003 4:03:47 PM
All Professor I have a question about sql, I would like to write a guest book by using ASP as front end and SQL server as back end, it would be have more than 10000 record and ASP will display 15 record in each page I would like to know, does sql have any method to get a range of recor...more >>

ISNUMERIC bug SQL2000 sp3 ??
Posted by Andrew Peterson at 8/12/2003 3:40:24 PM
Is there a bug with ISNUMERIC? If I run this script (SQL2000, sp3) I get a true (1) response when it should be false (0). Here is an example. Neither are valid numerics, but for the first, I get a return value of 1. -- this returns 1, improperly telling me it is numeric DECLARE @myst...more >>

Tricky UPDATE / Select SQL query problem.
Posted by desechable1 NO[at]SPAM yahoo.com at 8/12/2003 3:37:31 PM
Tobj_key File Date Qty Rej_Qty TechR_Qty WorkR_QtyFault Process S# 147279 104620 14-Apr NULL NULL NULL NULL NULL Assembly 01 153722 104620 15-Apr NULL NULL NULL NULL Tech TXRX_Test 01 153722 104620 15-Apr NULL NULL NULL NULL Tech TXRX_Test 01 153722 104620 15-Apr NULL NULL NULL NULL Wor...more >>

using a variable for text
Posted by shank at 8/12/2003 3:35:50 PM
I have the following statement to populate a table with data from a comments box. I'm not sure how to qualify a text variable. I put a small amount of text in the comments box, no problem. But if I put a LOT of text in the box, I get an error... Can someone get me straight on this? Thanks!!! A...more >>

HELP!! read text file in sql
Posted by Robert K at 8/12/2003 3:14:48 PM
HELLO, please help me, how to read txt file and then insert it to sql table. i have file like this name.txe <... 012301231923123902132003 23423i4u23490342342342343 ....> I have 4 column and want to fractionise this text '012301231923123902132003' and put in to table. Best reg...more >>

can you manage sql server 2000 remotely?
Posted by Trint Smith at 8/12/2003 3:05:16 PM
How can I do query analyzer and all that good stuff from the office on a clients server in another state? thanks, Trint Net programmer trintsmith@hotmail.com *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...more >>

BULK INSERT WITH SELECTE COLUMN ?
Posted by AJAY R at 8/12/2003 2:35:10 PM
Hi, Is it possible to bulk insert for some of the selected columns in table . Thanks & Regards Ajay ...more >>

Return zero with Count and a Where filter?
Posted by Cipher at 8/12/2003 1:57:05 PM
How can COUNT return zero values if I have a Where condition? For example, the following query when run against the authors table in the pubs database.... SELECT au_lname, Count(au_lname) FROM pubs..authors WHERE RIGHT( RTRIM(au_lname) , 1) = 'e' GROUP BY au_lname will return the followi...more >>

Help with SUM()
Posted by Rick Charnes at 8/12/2003 1:55:50 PM
In my premium table I have two rows where subm_no = 39792: subm_no portion amt 39792 P 88000.0 39792 P1 13000.0 I need a SQL statement to give this result: 39792 P 101000.0 39792 P1 101000.0 where 101,000 is the sum of the two t...more >>

Limiting the result set
Posted by Mats Olsson at 8/12/2003 1:49:36 PM
I have a table with 200000 records. I want the user to search the table but maximum 100 records at a time should be visible. It is easy to get the first 100 by using "Select top 100 ...". But how can I get the next 100? Is there a way to get a range of records from a result set? ...more >>

create MS SQL server database dynamically
Posted by Beryl Wilson at 8/12/2003 1:12:57 PM
hi all, I need to dynamically create MS SQL server database using VB6. Plz help me....thanks in advance. -- Best Regards, Beryl Wilson ...more >>

Database Backup Simple Question
Posted by CSharp ( ILM ) at 8/12/2003 12:45:13 PM
Hello all, I use SQL server at home I normally backup my Database by copying two files .MDF and .LDF to a CD or a second HD is this good enough or Am I missing something What is the best way to back up my Database do I need to back up the master Whould I let SQL Server Backup the Database? ...more >>

Sequence of Table Locks
Posted by Tom Henley at 8/12/2003 11:53:53 AM
I have a developer who believes the quickest way to perform either an update or an insert into a table within a stored proc (when the existence of the primary key in the table is unknown) is to attempt the update into a table and then if the update returns 0 rows (with @@rowcount) to then ...more >>

Switching between "IN" &"NOT IN" statements
Posted by Carlton at 8/12/2003 11:49:33 AM
i have a stored procedure something like as follows FROM tblStocklist WHERE strVenName IN(SELECT strVenName FROM tblProVen ..etc i want to change the "IN" to "NOT IN" based on the value of a table field. can anyone suggest a solution? ...more >>

SQL Server develper edition
Posted by Robert Baptist at 8/12/2003 11:22:26 AM
Sorry for the non-technical post, but... I purchased the developer edition from Microsoft a few months ago for $450.00. Today I have learned that the price has changed to $49.00. Is there any way to recoup any of that money from such a sudden, large price drop?...more >>

Mysterious table problem...
Posted by KevinT at 8/12/2003 11:01:55 AM
I have a table that is being heavily inserted into. It has been working fine and we had no problems with it at all for the past few months. It accumelated about 16,000,000 rows in the past 5 months. All of a sudden for some reason no process could insert rows into it. The application just hangs ...more >>

convert hexadecimal to string
Posted by ionel at 8/12/2003 10:53:52 AM
Hi, How can I convert a hexadecimal value to a string that has a meaning? Thanks, Ionel ...more >>

Strange error message
Posted by Yaheya Quazi at 8/12/2003 10:38:59 AM
Hi I am running this simple Query but I get a strange error message, do anyone know what it means? here is my query SELECT a.user_name, b.order_aprv_logon FROM MYLINKED.qdb.dbo.da_user a LEFT OUTER JOIN qdb_order_detail b ON a.logon_id = b.order_aprv_logon...more >>

Optimizing SQL queries
Posted by Maria Elena Bravo at 8/12/2003 9:55:57 AM
Hi, I would like to know if I should use inner joins instead of join clauses in the where section of a query - in order to have a better query (optimized). Please tell me the exact difference in joining tables : in the from section or in the where section of a Query. TIA Maria Bravo ...more >>

Unix Time Problem
Posted by Ron at 8/12/2003 9:44:08 AM
I have a table consisting of several thousand entries, with each entry distinguished by it's item number and timestamp (given in unix time). Currently I am using "SELECT * FROM TABLE WHERE BEGIN >= convertedDateBegin AND END <= convertedDateEnd " I need to select all items entered between 2 ...more >>

log
Posted by hutch at 8/12/2003 9:14:44 AM
I have a wicked SP, by wicked I mean several temp tables, lots of inserts, updates and deletes. I don't have time to rewrite this SP right now so I need to fix a problem it is causing. The problem is when it's run it blows the log from 25 mb to 270 mb. What would the best way to keep it ...more >>

Missing Month question
Posted by at 8/12/2003 9:07:31 AM
Hello: How do I find missing months? For instance: acct# accttoucheddate 1 1/1/3 1 2/1/3 1 3/1/3 1 5/1/3 The query would identify 1 with a missing accttougheddate of 4/1/3. Any help would be greatly appreciated. ...more >>

use execute command or sp_executesql or direct sql ?
Posted by tania at 8/12/2003 8:40:28 AM
Hi I am writing stored procedures to archive unused data on the production database. So, I will copy it to a separate archiving database and then I will delete it from the production database. The stored procedures will reside on the production database. What I want to know: (basic id...more >>

return only part of a string
Posted by chris at 8/12/2003 8:22:57 AM
sql2k sp2 How would I return only part of a string. I wont always know the length or the contents of it. The only thing Im sure of is that I want to return everything to the left of the comma. declare @var varchar(100) set @var = (select WhatFunctionGoesHere('Hendrix, Jimi') print @var...more >>

Forcing SQL to use a certain Index
Posted by Joel at 8/12/2003 8:01:12 AM
Does Anyone know if there is a way to force SQL to perform a query using a certain index first? Thanks. ...more >>

SARG query
Posted by Noam at 8/12/2003 7:35:14 AM
Hi, I have an Hierarchy table, with parentID and childID columns. to find the root: select .. from T where parentID NOT IN ( select childID from T ) any idea how to change the query to a SARG query ? ...more >>

How can I get a more detailed error description?
Posted by xmrf NO[at]SPAM yahoo.de at 8/12/2003 12:52:44 AM
Hello, I have a complex SQL-Statement (joining 9 tables, 8 pages after print-out) that should perform a insert..select operation. After 20 minutes of execution it fails and returns Server: Msg 242, Level 16, State 3, Line 1 The conversion of a char data type to a datetime data type resulted...more >>


DevelopmentNow Blog