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 > july 2004 > threads for thursday july 22

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

Single Quote as part of a string in a query
Posted by CSURESHKANAN at 7/22/2004 10:43:03 PM
Hai, Im suresh, how do i insert a string with single quotation into a field in sqlserver via stored procedure. eg. ' ' im using frontend as vb. ...more >>


EXEC Command with 'EXEC' as parameter fires twice
Posted by mark at 7/22/2004 10:34:52 PM
I created the procedure below in a SQLServer 2000 environment to export a SQL query to a log file. The procedure exports all of the records correctly but the procedure is executing 'someproc' twice. Any help will be much appreciated. Thanks, Mark CREATE PROCEDURE sp_queryToFile @...more >>

Query
Posted by Ramnadh at 7/22/2004 10:02:01 PM
Hi, I have to make a query like that the row number should be there in everyrow in the resultset. we have to use only the "select" query without using any updates. Can any one help me. Regards, Ramnadh....more >>

Stored procedure with cursor....
Posted by Viktor Popov at 7/22/2004 9:22:51 PM
Hi, I use cursors in one SP an it's my first time. I use the SP for checking logging. I have tbale Users ------------- id username userpass userrole 1 kalo lako admin 2 kiko koki user ............. The Sp looks like that: CREA...more >>

parameter sniffing
Posted by mahesh at 7/22/2004 8:58:48 PM
What is 'parameter sniffing' ?...more >>

set @sql = N'create table #tmp_table(guarid int)'
Posted by Zach at 7/22/2004 7:19:21 PM
When I execute: declare @sql nvarchar(200) set @sql = N'create table #tmp_table(guarid int)' exec sp_executesql @sql select * from #tmp_table I get: "Invalid object name '#tmp_table'." and there is no entry in tempdb However; if I change the temp table to a global table (##tmp_table) i...more >>

Amortizer In TSQL
Posted by SKG at 7/22/2004 5:57:18 PM
Are there any loan amortizer programs written in TSQL or c#. we need it desperately. TIA ...more >>

scripts enough?
Posted by Earl at 7/22/2004 5:51:27 PM
If I include just the scripts to create the tables and the stored procedures in my app distribution, will that be enough to recreate a database structure enough to get the user up and running? It should go without saying that I'm going to include the MSDE install, but just in case ... ...more >>



Public Chat: SQL Server 2005 Beta 2, What's New
Posted by Stephen Dybing [MSFT] at 7/22/2004 5:40:15 PM
Join members of the Microsoft development team as they chat about what's new in SQL Server 2005 Beta 2. One major new feature that's been announced in Beta 2 is data encryption. Come chat about other new features and changes that exist in this highly anticipated beta of the next version of SQL S...more >>

trick question
Posted by Kenny at 7/22/2004 4:58:15 PM
how to find out if any of procedures contain optional parameter? logic is , if there is a "=" sign before first "AS", then I think there will be at least one optional parameter. WELL, this query will not solved my problem. is there a way? SELECT ROUTINE_NAME FROM INFORMATION_SCH...more >>

databse owner in sp_attach_db
Posted by norris tc at 7/22/2004 4:55:02 PM
I know how to get around this but I was wondering when you use the gui to attach a database you have an option for database owner but when you use the sp_attach_db datatbase owner is not an option I was wondering why? thanks...more >>

Trigger Question
Posted by simo sentissi at 7/22/2004 4:31:11 PM
Hello I want to know how I can get the id of the deleted row in a table inside a trigger ? simo ...more >>

Float Value
Posted by Lontae Jones at 7/22/2004 3:50:01 PM
I have a field in my databas that has a charactertype of Float. This field is stroing time values from my helpdesk app. If I change the chartype to datetime will I have time values without deleting any existing data....more >>

COLUMNPROPERTY
Posted by Lito Dominguez at 7/22/2004 3:48:05 PM
I developed this stored procedure which enable user to enter a table name, column name and column value and return all null or empty columns ( top 1 ). Is there a function I can use to check the column data type? What I need is to be able to convert any date column to 101 (ie. convert(va...more >>

Help with trigger cursor
Posted by Tim Cowan at 7/22/2004 3:30:57 PM
Hi I have created an SQL trigger to round numbers on a table. As the table updated can have more than one row, I have had to create a cursor to cycle through it. It seems that I can only cycle through the table after having processed the first instance. Is this correct? Thanks Tim Cowan Co...more >>

CONVERT statements containing variables
Posted by studen77 at 7/22/2004 3:23:01 PM
Thanks in advance to anyone whom can help :) I have a stored procedure that has parameter of type VARCHAR. I have confirmed that it in fact passes my desired value '1950-01-01' (including the single quotes) I'm trying to convert this value to one of type SMALLDATETIME. I did the following: SP p...more >>

how to find id of database
Posted by Richard Gjerde at 7/22/2004 2:27:22 PM
I suppose any mssql database has a unique identity which one can obtain from one of the system tables, but I don't know where to look. Can anybody help me out? Regards, Richard ...more >>

Wrong syntax about update statment
Posted by Agnes at 7/22/2004 2:17:20 PM
I need to add extra column in my table named 'description' and it is combined of two existing columns I know my syntax is wrong but don't know to correct it... Update mytable set description = custaccount & "-" & custname btw, I am newbie in SQL server, any tutorial web site can provide suc...more >>

FAST option
Posted by Kenny at 7/22/2004 1:38:15 PM
is it true when you specify FAST HINT for a query, it's usually faster than the original query without FAST Hint? ...more >>

SQL Clustering Set up.
Posted by Nitin Rana at 7/22/2004 1:30:47 PM
I put this one in the clustering news group section as well but no one responded. Can someone from this section be help?? Thanks in advance - Nitin ======================================================== I am planning about either setting up Cluseting on SQL Server or follow log shipping...more >>

MultiValue UDF with PK defined
Posted by SEQUEL_Nick at 7/22/2004 1:14:01 PM
create function SamFunc(@units int) returns @tb table( CustomerID char(5) not null primary key ,SalesInfo money not null ) as begin insert into @tb select o.customerid,od.quantity * od.unitprice from orders o inner join [order details] od on...more >>

how to test this store procedure ?
Posted by Agnes at 7/22/2004 1:06:00 PM
i create the stored procedure as following :- However, I don't know how to test it in sql analyzer declare @resultid int exec dbo.sea_keyid @keytype ='EXHBL' input , @resultid =@resultid output The above code seems wrong.. Please help ~~ ------------------------------------- CREATE PROCEDURE ...more >>

Returning multiple tables in one Stored Procedure
Posted by Anders at 7/22/2004 1:04:30 PM
Hi all, I am returning multiple Tables from one Stored Procedure into a .Net DataSet. I specify the Tablename for each SELECT statement at "FROM employees AS Employees" but the alias is not returned in the DataSet. From the DataSet I get names such as Table1, Table2 etc. Hope someone can ...more >>

Question about : insert [table] exec [sp]
Posted by Zoury at 7/22/2004 12:58:21 PM
Hello people! :O) i've got two related questions 1. Is there a way to get the targeted table to be created automatically as in a select into query ? because for now, i need to create the table manually before the call, it's not as usefull as i wish <g> : --- create procedure dbo.p as ...more >>

Changing datatype varchar to text
Posted by Desperado at 7/22/2004 12:00:03 PM
hi, a long time ago i have to create this : create table temp ( .... description_long varchar(4000) ... ) now i have to change type to TEXT (>8000 characters) but i already have 2000 records inserted. if i change the type? i would lose the data? ...more >>

Database Column Naming
Posted by Raul Garcia at 7/22/2004 11:34:11 AM
Hi All, I'm programming databases since some years. I use lowercase to name the columns (iduser, idbasket, zipcode...). I think it's more compatible to be exported to other databases and more or to work with any languaje.. But I'm not sure about it, I don't really know how necessary is. C...more >>

Format text field
Posted by Gustavo at 7/22/2004 11:04:28 AM
Hello everyone, I am not sure if this is the right place to post this question but here it is. In Access 2000 I use to concatenate 2 numeric fields to update with the result a 6 character text field using the following function: Format([YearId] & Format(Right[IssueId],2),"00"),"000000")...more >>

SQL Full Outer Join
Posted by alexcn NO[at]SPAM writeme.com at 7/22/2004 10:39:53 AM
I have the following query: SELECT dbo.tSymExch.exCode, dbo.tSymGrp.sgCode, dbo.tSymMain.smCode FROM dbo.tSymExch FULL OUTER JOIN dbo.tSymGrp ON dbo.tSymExch.exID = dbo.tSymGrp.sgexID FULL OUTER JOIN dbo.tSymMain ON dbo.tSymGrp.sgID = db...more >>

SQL Server Diagnosis
Posted by John at 7/22/2004 10:37:45 AM
I am curious if people use Enterprise Manager to manager their SQL Server or do they use third party tools. What are some of the good tools that are in the market that can be used to administer SQL Server, May be job scheduling, setting up alerts w/o installing Outlook on the SQL machine, ...more >>

BCP, sp and temporary table
Posted by Vadim Iakouchov at 7/22/2004 10:32:08 AM
Hi all, I've created a stored procedure that makes output into a temporary table. Here is a simplified version of it (the actual table has many more rows and columns): use Import go create proc dbo.sp1 as create table #t (i int) insert #t values (3) select * from #t go I'm trying t...more >>

Is it possible to pass a recordset to a stored procedure?
Posted by Raanan Avidor at 7/22/2004 10:19:19 AM
Is it possible to pass a recordset to a stored procedure and that stored procedure will enter the data into a table? Ra an an . ...more >>

Linking to as 400
Posted by Vijay at 7/22/2004 9:55:52 AM
Hi, Is it possible to connect to AS400 from SQL Server 2000 via a Trigger. OLE DB Connection only. Thanks Vijay I will persist till I win....more >>

update date field
Posted by mamun_ah NO[at]SPAM hotmail.com at 7/22/2004 9:19:46 AM
Hi All, I have downloaded a table from a different server. I have a date field defined as varchar. There are some data which looks like the following: 07/21/2004 (mm/dd/yyyy) format some are 2003-09-12 (yyyy-mm-dd format). I want all dates to be in yyyy-mm-dd format. How can I update...more >>

DTS Environment Control
Posted by Joe Horton at 7/22/2004 8:31:35 AM
DTS Environment Control =20 What solutions have other worked up to handle DTS packages and = promotions through their different environments? =20 In our scenario we have a 4 tier environment (Dev/Test/PreProd/Prod). = The challenge is when you promote your packages up; the connections...more >>

How to keep, in a table, a result set ?
Posted by Gaetan at 7/22/2004 8:29:40 AM
Hi, I need to use RESTORE HEADERONLY for a lot of transaction log.Is there somebody who knows, how to keep the "result set" of RESTORE HEADERONLY, in a table? Many thanks....more >>

Connect to SAGE via stored procedure in sql server
Posted by Oliver at 7/22/2004 7:12:05 AM
Hi, I'd like to access to a sage data base with a sql server stored procedure, anybody knows how to do this ? Thanx....more >>

Multiple Email Addresses
Posted by Andrea at 7/22/2004 7:00:09 AM
I have a form which stores 5 email address per client. Can I make the user will not enter data in the 2nd, 3rd, 4th or 5th email address without first entering data in the 1st email address field?...more >>

Distribute objects to multiple servers
Posted by tram_e NO[at]SPAM hotmail.com at 7/22/2004 4:47:45 AM
Is there any way to transfer procedures from central server(master server) to multiple servers (target server)? We can use osql, but that needs the sql to be copied to all servers which may not possible with 'multi server jobs'. Any ideas please share. Thanks...more >>

set a select statement stored in a table in a variable
Posted by (karditsi NO[at]SPAM csd.uoc.gr) at 7/22/2004 3:11:35 AM
Hello, I have a table containing select statements in each of it's columns. Inside a stored procedure I want to set the value of the column i.e the statement into a variable and then execute it using the command EXEC sp_executesql @QUERY If I print the value of the variable containing...more >>

Certain Japanese characters (Kanji) are stored as unicode
Posted by Geetha ramkumar at 7/22/2004 2:07:25 AM
When I insert japanese data into SQL Server2000 using ASP, certain Kanjis which are rarely used get stored as unicode.. For eg. a certain kanji gets stored as &#31055; But display of this kanji on IE is fine as I use SHIF_JIS encoding...But the problem is while retrieving this data on Cr...more >>


DevelopmentNow Blog