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 2003 > threads for friday october 31

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

DateTime in an SP
Posted by Wayne Wengert at 10/31/2003 9:32:07 PM
I am trying to specify a date as a criteria in an SQL statement used within an SP. The date is an input parameter. When I run the SP I get an error "Syntax error converting datetime from character string." The declaration shows: DECLARE @sdate datetime DECLARE @stype char(2) DECLARE @regyear...more >>


Syntax Error
Posted by Wayne Wengert at 10/31/2003 8:57:43 PM
I am trying to build an SP (see code below) but I get an error when I check the syntax. The error msg says there is an "error near ')' I am using doubled single quotes to get a single quote in the result so I can enclose the text and date variables in single quotes in the parsed statement. BT...more >>

Advice on SQL statement
Posted by Alan Kordy at 10/31/2003 5:39:48 PM
We wanted to create a database for a jewellery manufacturer. A common table will be required to store all sort of raw materials (e.g. different type/grade of diamonds, stones, metals, and etc.). Due to different type of material uses different UOM (unit of measurement), we created a header table ...more >>

search PDF files stored in SQL
Posted by Andy at 10/31/2003 5:18:59 PM
Hi, Can anyone advise regarding possible ways to search PDF files stored in SQLServer 2000 SP3 as binaries? Thanks and regards, A ...more >>

Error converting/updating nvarchar to numeric type
Posted by news.verizon.net at 10/31/2003 5:06:25 PM
I just imported data from my excel file into SQL. It created price column type as nvarchar automatically. First I tried to update my pricelist table update pricelist set price = abc.price I got the above error. Then I created another column in ABC table as numeric type ...more >>

Mysterious DELETE query
Posted by Steve Kass at 10/31/2003 5:01:01 PM
Common sense tells me that it's impossible to delete only one of two identical rows in a table using DELETE (without using SET ROWCOUNT, at least). Here's a repro where that happens. What's going on? Table tb1 has two 2's in it before the delete, and only one after. create table tb1 ( ...more >>

XP vs SP vs T-SQL
Posted by Fernando P. Malard at 10/31/2003 4:14:45 PM
Hello, I would like to show how are the performance differences among a Query, a Stored Procedure and an Extended Stored Procedure inside SQL 2000. To do that I would like to use the same math calculation using the 3 methods and compare the time taken to execute each one inside the same SQL ...more >>

Is newid() generated GUID really unique??
Posted by Welman Jordan at 10/31/2003 3:35:05 PM
Can any one tell me more about the GUID on how it is actually generated and why it is always unique? ...more >>



Expert Development
Posted by R. Rogers at 10/31/2003 3:02:46 PM
Hello, Are there times when you would like an expert to tackle a complex chunk of SQL development? Do you ever wish that there was someone with lots of experience who could help you with a problem that can't be solved by a simple question on this newsgroup? I sincerely appreciate all respo...more >>

How to post a reply
Posted by Amit Arora at 10/31/2003 2:44:01 PM
BlankHi friends, I know that this an awkard question but I really want to know how to post a reply to a particular message in the group using OUTLOOK express Amit ...more >>

Remote Development
Posted by R. Rogers at 10/31/2003 2:27:11 PM
Hello, Are there times when you would like an expert to tackle a complex chunk of SQL development? Do you ever wish that there was someone with lots of experience who could help you? I sincerely appreciate all responses I get! Thank you for your response! Richard Rogers http://www.SQLSo...more >>

BACKUP DATABASE statement
Posted by Jo F. at 10/31/2003 2:21:24 PM
Has anyone had experience with trying to backup a database where the path to backup to consists partially of a hard- coded path but also partially of a variable (date and time, in this case)? It works fine when the entire path is hard-coded but the minute I try to make part of the path vari...more >>

Cannot Update SQL table Using Access
Posted by robc at 10/31/2003 11:51:47 AM
Anyone know a workaround ? I believe that I am unable to make updates to an SQL table using MS-Access because no Primary key exists in the SQL table (can we please leave that to another discussion.) Is there any way to get around this ? ...more >>

Copy one row to another in a table
Posted by domtam NO[at]SPAM hotmail.com at 10/31/2003 11:36:49 AM
Since I rarely use the update statement with a 'from' clause, I just wanna make sure that my understanding is correct. Suppose I have database table "Table", with columns A (Primary key), B, C, D. It contains 3 rows. A B C D A1 B1 C1 D1 A2 B2 C2 D2 A3 B3 C3 D3 My goal is to copy d...more >>

variable in ORDER BY
Posted by m.suchecki at 10/31/2003 11:35:48 AM
i write storing procedure and i need select column to determine order of result: CREATE PROCEDURE show_orders @prefix char(5), @lim_d int, @lim_u int, @ord char(20) AS select nr, data, nazwa_produktu, termin_realizacji, ilosc, odbiorca, status, stopien from zamowienia where (nr>@prefix ) and...more >>

Help with OpenRowSet
Posted by Rick Charnes at 10/31/2003 11:10:32 AM
Trying to learn OpenRowSet, I pasted the first example directly from the Help file: SELECT a.* FROM OPENROWSET('SQLOLEDB','seattle1';'sa';'MyPass', 'SELECT * FROM pubs.dbo.authors ORDER BY au_lname, au_fname') AS a and am receiving the error: "Line 2: Incorrect syntax near ';'." Any ...more >>

Flatten Table
Posted by Dan at 10/31/2003 10:47:23 AM
Hi, I am wondering what the best way is to flatten the following table in one query. LASTNAME COURSE MILLER 123 MILLER 432 MILLER 231 I am looking for the results to be like: LASTNAME COURSE1 COURSE2 COURSE 3 MILLER 123 432 231 Thanks in advance!...more >>

Loops - novice question
Posted by sean at 10/31/2003 10:44:04 AM
Hi, I have a procdure below in which I am trying to find all of the dates that fall between a date range, this is working fine but I want to send an email for every row and then exit. At the moment it is sending email but it seems to be sending to many, for example if the query returns 2 rows ...more >>

Inserting a BLOB into a binary field
Posted by Hieronymus Nurgle at 10/31/2003 10:40:58 AM
Hi, I've got the following problem: I'd like to write a binary stream directly into a field of a MS SQL server table. The application, which produces the binary stream, calls anASP page. The ASP page reads the binary stream and writes it into the field through the following SQL statement: IN...more >>

SQL Server 6.5
Posted by Emil Kackos at 10/31/2003 10:27:22 AM
Once a month we upload a huge amount or transacctions into a Sql Server 6.5 database. There is no need to log all these transactions and the log grows so big we can an do get an error message, lof space full. Is there a way to turn off transaction logging in 6.5?...more >>

Do I need to rebuild index in SQL server?
Posted by Vincent at 10/31/2003 10:25:48 AM
Thanks a lot ...more >>

Simple view, group by date
Posted by Bent S. Lund at 10/31/2003 10:07:20 AM
Hi, I'm trying to create a simple view on a table containing a long datefield CREATE_DATE. The view should show a count(*) and croup by CREATE_DATE grouped on the date (discarding the time info) I have experimented with CAST and CONVERT without much luck. Any help appreciated, reg...more >>

Do User Defined Functions work in Computed Column?
Posted by Tappy Tibbons at 10/31/2003 9:53:26 AM
I have a simple user defined function I want to use as a SQL 2000 computed column. Is it even possible to use a UDF in a SQL calculated column? I have created this function: ======================== CREATE function TestVal(@Field int, @Compare int) returns int as begin declare @nReturnThi...more >>

Named Pipes permission trouble
Posted by Christian Muggli at 10/31/2003 9:51:46 AM
Hi all How/where can i change/set permission on a named pipes connection ? i've an SQL 2000 SP3 server running on a WXP box. On my clients the default network library is set to Named Pipes and i don't wanna change this .. on my SQL server the protocol order is set to 1st TCP/IP and 2nd Named P...more >>

Key for Max()
Posted by Thomas at 10/31/2003 9:48:53 AM
Hi, How do I get the key for a max value in one select statement? create table x(id int identity,v varchar(1)) insert into x values('z') insert into x values('y') insert into x values('x') select max(v), max(id) from x This returns 'Z',3 But I want it to return 'z',1 Thank...more >>

Query is not working if i will use different language settings.
Posted by Chellammal at 10/31/2003 9:13:13 AM
Hi All, The following query is working fine in english setting. But in German setting, it is giving error. How do i solve this problem?. I'm using MSDE 2000 with Service pack 3a. 1. German settings: set language Deutsch go select * from sample where status_date < '3...more >>

how to get the result set of a DBCC command
Posted by Frank at 10/31/2003 9:01:42 AM
Hi, How can I store the result of a DBCC command into a table. Thanks in advance ...more >>

Getting Portions of records at a time.
Posted by Noor at 10/31/2003 7:59:03 AM
Hi everyone.. Suppose i have millions of records in my table and selecting all the records at a time will be inefficient for any application. I want to have a functionality to show 1000 records at a time on a page and when a user clicks on Next button then show the other records. How can ...more >>

GetDate function
Posted by Peter at 10/31/2003 7:27:09 AM
Good day, Am getting an invalid use of the Getdate function within a function error message(Msg 443,Level 16). There is a knowledge base article about this on Microsoft site (308759). Microsoft claimed that this error was fixed in service packs 2, but we are running service pack 3. Doe...more >>

RPC Calls
Posted by Don Grover at 10/31/2003 7:17:33 AM
I have an w2ksql db running on a shared server,. I have been asked to use RPC calls into a NON MS server to Upload orders and download stock reports. I dont have a clue where to start, can anyone sugest some direction to go in either research or samples etc.. They will give me a login and passw...more >>

inconsistent order by using insert into in a stored procedure
Posted by sasha NO[at]SPAM mathforum.com at 10/31/2003 7:13:11 AM
hi there, i am using sql server 7. below is the stored procedure that is giving me grief. its purpose it two-fold, depending on how it is called: either to return a pageset (based on page number and page size), or to return IDs of previous and next records (based on current record id). the...more >>

getting 0 back
Posted by tkhan)1 NO[at]SPAM hotmail.com at 10/31/2003 6:40:59 AM
Why I am getting 0 % back? 1st view: SELECT role, CONVERT(varchar(10),OpnDt, 101)AS Dt, SUM(CASE WHEN stype = 'Completed Work' THEN cnt ELSE 0 END) AS Comp, SUM(CASE WHEN stype = 'Process Capability' THEN cnt ELSE 0 END) AS Cap, SUM(CASE WHEN stype = 'Staged Work' THEN cnt ELSE 0 END) ...more >>

CUBE cannot compute distinct aggregates.
Posted by Alan Blaikie at 10/31/2003 6:30:58 AM
This is crazy. The SQL below works fine in SQL server 6.5: select h.fund_code, p.dist_meth_code, count(DISTINCT p.agent_cl_ref) from rfsspd..holding h, rfsspd..portfolio p where h.client_code = p.client_code and h.portfolio_no = p.portfolio_no and h.Act_units <> 0 group by h.fund_code, ...more >>

Inserting Files into tables
Posted by Calvin at 10/31/2003 3:43:43 AM
Hi, I'd like to know how to insert files (like ".jpg",".doc" etc.) into a table in a database. Can someone point me in the right direction, please. Regards Calvin...more >>

COL_LENGTH - strange output.
Posted by I_AM_DON_AND_YOU? at 10/31/2003 1:00:43 AM
Why is that the following code shows the length of column c2 as 80 and not 40. Isn't it very strange?USE pubs GO CREATE TABLE t1 (c1 varchar(40), c2 nvarchar(40) ) GO SELECT COL_LENGTH('t1','c1')AS 'VarChar', COL_LENGTH('t1','c2')AS 'NVarChar' GO DROP TABLE t1 ...more >>


DevelopmentNow Blog