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 > october 2005 > threads for monday october 10

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

adding commas into integer
Posted by dapdap at 10/10/2005 11:50:02 PM
while selecting the field, I want it to be display with commas. for example, 10000 become 10,000 without decimal placed at the end. I have tried using smallmoney format but there is decimal places. ...more >>

Connecting to SQL2005 from VS2005 RC
Posted by J. Jespersen at 10/10/2005 10:19:01 PM
Hi all, Have been using SqlDataSources for a while now. Reinstalled machine last week, now running Server 2003. Installed both SqlServer 2000 and 2005 with instance-names "sql2000" and "sql2005". Also installed both Visual Studio 2003 and 2005. VS2005 is the Release Candidate, and SQL2005 ...more >>

dates
Posted by JD at 10/10/2005 10:07:18 PM
Hello Everyone, I am working on a database table that was imported from an excel spreadsheet where the date column value is stored as follow(s) yyyymmdd this seems to be stored as a numeric value and not as a date value. So I am trying to write a query on this table where I want to break ...more >>

Changing object ownership back to dbo
Posted by Charlie NO[at]SPAM CBFC at 10/10/2005 8:09:30 PM
Hi: I have a database where objects are owned by different users. I would like to revert ownership of all objects to dbo. What is the best way to do this? Thanks, Charlie ...more >>

Though query (for me at least ;)
Posted by Stijn Verrept at 10/10/2005 6:21:25 PM
I have no idea of how to even begin to make a query for this one. I think it's possible to do without the use of cursors. Anyone got an idea? I have the following data and needed output: declare @BeginDate smalldatetime declare @EndDate smalldatetime select @BeginDate = '2005-01-01' ...more >>

SP Question
Posted by George at 10/10/2005 5:40:04 PM
Hi, I have a SP that queries data and has data in two temp tables. How do I combine these two tables without joining them? Thanks ...more >>

How to find what views a table is used
Posted by karenmiddleol NO[at]SPAM yahoo.com at 10/10/2005 5:31:49 PM
I want to find all views using a particular table name. Also, I want to find all tables in a view and similarly I want to check which stored procs use a particular table or view. Can you please let me know how I can find this. Thanks Karen ...more >>

dbcc checkdb
Posted by msadmin18 at 10/10/2005 4:42:04 PM
sql newb on the block, how can i run this checkdb command. 2. recently started experiencing a problem where we could add new records but could not edit or update changes in the records. any help would be greatly appreciated....more >>



Nested select with two columns must match
Posted by richardb at 10/10/2005 4:41:02 PM
I want to select all medical services charges (ChargeID, ProcedureCode, ChgAmnt, PatUniqueID, service_date, InsuranceDue) where the sum of InsuranceDue for each PatiUniqueID and service_date is zero. In other words, select all the charges for each patient by date, when all the charges for th...more >>

JOIN is slow under certain circumstances
Posted by DonSQL2222 at 10/10/2005 4:25:01 PM
declare @msym varchar(200) select @msym = 'MSFT,DELL' set rowcount 500 select distinct m.* from Main m join Sym2 s on s.id = m.id where s.sym in (Select str from iter_charlist_to_table(@msym, DEFAULT) ) The idea is to search for all 'MSFT' (then 'DELL') in the Sym2 table a...more >>

quraterly report
Posted by qjlee at 10/10/2005 3:19:01 PM
I am designing a quarterly report for summary of order received quarterly. I need to find out the orderid for the order placed during the quarter, the order date field is order date. This report will run in the early morning of first day of the quarter before any new order is entered. C...more >>

More efficient way of checking for value
Posted by jenks at 10/10/2005 2:46:11 PM
This trigger needs to check the contact1 table for the deleted accountno. If it is not found there it will then use the record in contact1del. This trigger works but I know there is a better way to check for the deleted accountno in contact1 in the IF statement. Accountno values in Contact1 a...more >>

Compare tables
Posted by skg at 10/10/2005 2:09:47 PM
can any one suggested me a better way to compare two tables. I tried following, create table t1(tid int identity(1,1), col1 varchar(10),col2 varchar(10)) create table t2(tid int identity(1,1), col1 varchar(10),col2 varchar(10)) insert into t1(col1,col2) values('c11','c12') insert into t1(c...more >>

sp_addlinkedserver and text file
Posted by Ramunas Balukonis at 10/10/2005 1:43:15 PM
Hello, I have problems with select from text file with as linked server. I have TabDelimited file ekbe.txt. I do sp_addlinkedserver to the folder where this file resides: EXEC sp_addlinkedserver 'Staging', 'Jet 4.0', 'Microsoft.Jet.OLEDB.4.0', 'c:\staging', NULL, 'Text' my ekbe.txt has...more >>

Do Queries Support Regular Expressions?
Posted by clintonG at 10/10/2005 1:29:10 PM
If I had the following string in a table how could I find all records that contained the term 'Business' for example? Would Regular Expressions be supported in this context? Your comments regarding performance of a category schema such as this? // Example PrivateSector_Business_Services ...more >>

Executing Trigger on insert
Posted by marco at 10/10/2005 1:12:01 PM
All, I have a trigger that on insert, inserts data into a linked server (Oracle database). When I insert a row of data via query analyzer into the SQL Server table, the trigger is executed and a row is inserted into the linked server, as expected. When the same exact row of data is insert...more >>

Custom Col. Format
Posted by Vai2000 at 10/10/2005 12:30:02 PM
Hi All, This is what I am trying to accomplish SELECT a query from SQL2k2 export to Excel 2k. When I populate excel workbook I need the data to be formatted in certain order (esp. my column values should have comma) like 10000 should be 10,000 Unfortunately not allowed to write macros or any V...more >>

CustomColumn
Posted by Vai2000 at 10/10/2005 10:59:37 AM
Hi All, How to define a column in sql2k with format of its value as 10,000,000 TIA ...more >>

whats the most bizarre and weirdest query...
Posted by Jose G. de Jesus Jr MCP, MCDBA at 10/10/2005 10:06:04 AM
what's the most ridiculous, bizarre and weirdest query you have ever written -- thanks, ------------------------------------ Jose de Jesus Jr. Mcp,Mcdba Data Architect Sykes Asia (Manila philippines) MCP #2324787...more >>

getDate not working in function
Posted by arnoud oortwijk at 10/10/2005 9:23:18 AM
Hi, Using MSSQL 2000 How can I get hold of the current datetime inside a function? declare @dt datetime; select @dt = getdate(); gives an "Invalid use of 'getdate' within a function" error. Any help will be greatly appreciated. Regards, arnoud ...more >>

No Transaction is Active
Posted by Sam Coleman at 10/10/2005 8:57:07 AM
Hi, I have a COM+ Application written by somebody else, and when I am calling one function, it is returning an "No Transaction Is Active". I have looked at the code, and cannot see why. I have the same version of the dll running perfectly fine on other servers, so I cannot see that it is th...more >>

SQL Server 2k + SOAP ?
Posted by Chris Ashley at 10/10/2005 8:41:14 AM
Is there any way to enable SQL Server 2K to access XML web services? I want to set up some triggers to call a web service method when a record is deleted. Is this possible, or will I need to write my own external app to do this on a scheduled basis? ...more >>

Passing DML to From .NET SQLClient?
Posted by John at 10/10/2005 8:13:21 AM
Hi All, I am trying to figure out why the following fails and how to fix it: I have a .NET Client application that passes parameters to stored procedures and uses dynamic SQL that is passed to the Server. Everything is great. My problem is if I want to send over to the server several DML in ...more >>

copy som data from one field split it up into 3 new fields
Posted by ecoder at 10/10/2005 7:44:03 AM
Hey there I have to copy som data from one field and split it up into 3 seperat new fields in the same table... Eks.: ------------------------------------------ Data column Artis (Old field) ------------------------------------------ Artist Larsen, Kim & Kjukken Larsen, Kim La...more >>

get sorted data
Posted by glompf NO[at]SPAM gmail.com at 10/10/2005 6:45:56 AM
Hi, I have a table containing the following data: ID TitelD fk_Next_Knoten_ID fk_Previous_Knoten_ID ------ ------------ ----------------- --------------------- 131 Kupfer, Erde 138 0 132 Flachkabel 0 141 138 Dr=E4hte, Seil 139 ...more >>

Txt to Datetime
Posted by Patrice at 10/10/2005 6:22:02 AM
Hello, I am importing a field from a text file that has a date and a time that looks like this: 199902250615 I am importing it into a sql table where that field is datetime data type, however, when I insert it into my sql table, I get the date portion of the field, but the time is lef...more >>

Query dilemma
Posted by Enrico Campidoglio at 10/10/2005 6:07:02 AM
Hi! Let's say I have a table named Category containing categories, subcategories and update dates with the following schema: Id Cat Subcat Update 3 8 A 2005-08-01 2 8 A 2005-09-12 4 8 B 2005-09-08 1 8 B 2005-10-02 5 8 ...more >>

Getting Stored Procedures Parameter Information In JDBC
Posted by Getting Stored Procedures Parameter Info at 10/10/2005 5:25:03 AM
public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException Th...more >>

Stored procedure sp_msforeachdb
Posted by Tony at 10/10/2005 5:06:04 AM
I am executing this procedure; execute sp_msforeachdb N'use ? select db_name() execute sp_helpuser' the script fails if the database name has a space in it..Is there a work around please assist, I'm new in this.. -- Eager to Learn...more >>

getting rid of comma separated column data
Posted by jason at 10/10/2005 5:05:19 AM
working on a transformation, and one of the things i'm trying to get rid of are columns with comma separated values as lists of data. my god is that annoying. anyway, i need an insert and/or update query that will break up the following comma value problem example (keyword being example, pleas...more >>

how to copare two tables
Posted by sajeeth raja at 10/10/2005 5:03:39 AM
could any one tell me how to compare a datetime field in a database with the current system date. if their diff is less than 45 days then i have to fetch the whole values of that row. there may be n number of rows. raja *** Sent via Developersdex http://www.developersdex.com ***...more >>

Covering Index Question
Posted by parasada at 10/10/2005 3:55:03 AM
we have a table with the following structure (not full but should give an idea how it looks like) CREATE TABLE [dbo].[JK_Product] ( [Creator] [varchar] (50) NOT NULL , [ID] [int] NOT NULL , [Product] [int] NOT NULL , [PartNum] [char] (32) NOT NULL , ... ... ... [CheckShipping]...more >>

selecting only the last record in joined table
Posted by Lucius at 10/10/2005 12:22:23 AM
Hello everyone, I have a query problem. I'll put it like this. There is a 'publishers' table, and there is a 'titles' table. Publishers publish titles (of course). Now I want to make a query (in MS SQL Server) that would return the last title published by every of the publishers. Quite clea...more >>

Status of a transaction
Posted by Venkat at 10/10/2005 12:05:35 AM
Hi folks, I am altering the datatype of a column from Int to Bigint using Enterprise Manager. It is going on for hours. Is there any way to see how much % is done/pending. I realized that SQL Server is creating a new table Tmp_TableName with the new datatype and inserts the records to it. The...more >>

Memory Problem
Posted by Leila at 10/10/2005 12:00:00 AM
Hi, Yesterday I went to company of a friend to troubleshoot their SQL Server 2000. The server has 2GB memory and no other app is using that (dedicated to SQL Server). The problem is that after restarting the service, it takes about 4 days that users fill the memory by their queries and when 2GB...more >>

bad performance, help needed
Posted by Yordan Gyurchev at 10/10/2005 12:00:00 AM
Hi, We have a working application that has been ok for some time but recently as our data and users increased we started to get timeouts as some queries take more than minute to execute. This happens only occasionally on a very specific query that joins couple of big tables. Now the que...more >>

how to select from 'exec ...' or how to say "this sp depends on this table "
Posted by Hasan O. Zavalsiz at 10/10/2005 12:00:00 AM
Hi, select t.type from ( exec sp_depends 'Sales by Year' ) as t doesnot work , how to correct it or actually my aim is to get this sp is depends on this table ? Thanks ...more >>

SQL Gurus - Need Help - Sql Server Job with FTP
Posted by Ashish NO[at]SPAM Armour at 10/10/2005 12:00:00 AM
I am trying to automate upload task at midnight. For this I have create file which generate TAB delimited file, then I create a FTP connection file and thne execute this ftp script for upload the file, but file is still not uploading to FTP server. If I Upload file manually, file uploded s...more >>

Data type conversion
Posted by Arsalan at 10/10/2005 12:00:00 AM
I have one column which contains numbers [but the column is in char format] What will be the proper SQL query to sort that column ? If i use order by clause, the records are sorted in characted method, i.e 40,50 not 40,41 ...more >>

IP to Oct function?
Posted by Lasse Edsvik at 10/10/2005 12:00:00 AM
Hello I was wondering if you guys know howto convert an ip (string) to oct? need it as a USD TIA /Lasse ...more >>

Can I..........
Posted by Bpk. Adi Wira Kusuma at 10/10/2005 12:00:00 AM
Can I run "Maintenance Plan" directly (without wait its scheduling)? If can, How to run it? ...more >>

Large(ish) update
Posted by Michael C at 10/10/2005 12:00:00 AM
I'm updating every row in a 200mb table. I'm trying to work out why it running so slowly and have found that it increases the size of the log file by 625mb an then empties it, I believe, but leaves it at the same size. I've got the recovery mode set to simple which I thought was not meant to u...more >>

smalldatetime
Posted by Ferdinand Zaubzer at 10/10/2005 12:00:00 AM
When importing data from Microsoft Access, DTS automatically uses smalldatetime for the Access data type datetime. How can I change this to automatically get datetime to be used for datetime from Access. Cheers Ferdinand...more >>


DevelopmentNow Blog