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 > november 2004 > threads for wednesday november 24

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

Adding an extra row
Posted by Kath at 11/24/2004 11:04:18 PM
Hi everyone, I have a parameterised stored procedure which calls another stored = procedure. The parameterised stored procedure returns varying numbers of columns. = The number of columns varies by the number of months which the report = covers. For example: Covering Jan to March wou...more >>


How to manipulate a text row into a table column? (Restatement of earlier problem)
Posted by mountain man at 11/24/2004 10:13:02 PM
In an earlier post I made a fundamental inaccurate typo. What I should have said is "initial column" (ie: col001). Thank you very much to all the responses which were helpful, and the article fantastic, as during the successive imports of these (sometime large) text files, the order of the ro...more >>

Query about the LIKE statement
Posted by Vince at 11/24/2004 8:03:20 PM
If I have a procedure like (say): CREATE procedure SP_ABC(@PAR1 varchar(20) as select * from TABLE where [COL] like @PAR1 If I supply sp_ABC(111%), I get all rows where COL begins with 111. Now, I would like to pass multiple values to it, in other words I need to be able to say sp_ABC(11...more >>

Image variable in Stored Procedures
Posted by Mel at 11/24/2004 5:44:45 PM
Is it possible to set an IMAGE variable with a jgp file into a Stored Procedure? And then, can this variable be used as Output? Thanx ...more >>

Field mapping on Importing
Posted by Paul at 11/24/2004 4:55:22 PM
Hi All I regularly import data from MS access databases (and many other formats) to SQL server using the enterprise manager. However, the DBTIMESTAMP property of Access gets imported as a smalldatetime in SQL server, which often causes problems. At the moment, I click on every table and select...more >>

help understanding a query
Posted by meg at 11/24/2004 4:51:19 PM
Can someone tell me now NOT works in the outer query below? select @CM_pk = count(*) from request where NOT Contactid in (SELECT contactid from contact where not alias is null) Thanks for your help ...more >>

Table Variable vs Temporary Table
Posted by CB at 11/24/2004 4:37:46 PM
Hi I have discoverred a situation where the performance between using a table variable and a temporary table is remarkably different. We have a query that declares a table variable, then populates it (this is quick) and then this is used in a very complicated query where it is being reference...more >>

Fit table on one page if possible?
Posted by Ing. Branislav Gerzo at 11/24/2004 4:11:48 PM
Hi all, I have question about %subj%, I really don't know what exactly that means. I thought, it means - if table fit on _one_ page, don't print it on two pages. Or maybe advanced should be - insert page break before table, if table will be printed on fewer pages, as normal (without page...more >>



How to create a searh in a database field?
Posted by Miguel Dias Moura at 11/24/2004 3:34:34 PM
Hello, I need to create a simple search in a web site. I have an input text where the user writes the words for search. When it clicks the "search" button a new page will appear with all the records of the database which TITLE field includes those words. Well, if this would be just one...more >>

Returns a names of columns from a query in stored procedure
Posted by Marcelo_Hörlle at 11/24/2004 3:33:39 PM
Hi!!! How I can return the name of columns from a query that was carried = through in a stored procedure? With stored procedure "sp_columns" I can return the columns of a table, = but when the return is a query? I will have to know the names of the columns they will be returned!! Tha...more >>

Wierd error
Posted by Jon Glazer at 11/24/2004 3:16:15 PM
Has anyone seen an error like this before? If so, what could it be? I don't use any stored procedures. (SQL2000 and ASP). 007~ASP 0101~Unexpected error~The function returned |. ...more >>

Advice on the decimal data type
Posted by Craig HB at 11/24/2004 3:15:01 PM
I have been using float for non-money fields, but now I want more accuracy and therefore have decided to switch to using decimal. Does anyone have any advice on what precision and scale I should use for : 1. the quantity field in a Recipes table 2. the quantity field in a Sales table (you c...more >>

Indexed views
Posted by PVR at 11/24/2004 2:18:23 PM
Hi Sql Gurus, I have a report table which is populated from a base table in the nightly process.. if there is any change as of today in the base table will be populated into the report table next day. Just I was going through Indexed view ... I got an idea that If I create the report ...more >>

Temp table creation
Posted by David Mohandas at 11/24/2004 2:18:02 PM
We are creating a temp table as below, select table1.* into #temp_table1 from table1 After creating the temp table we add a whole bunch of default constraints on the temp table using the alter table command. We were told that it is an expensive operation to do when there are lot of data in ...more >>

DTS: Begginer question
Posted by Costi Stan at 11/24/2004 2:13:51 PM
How can I use DTS to import/export tables and objects from a database. I'm working on a tool that has to do it and I've been wondering what do I need to program with DTS?! Do you program the packages for import/export or the UI that executes those packages? As I understood, there are DTS pa...more >>

SQL
Posted by Stanislav Nedelchev at 11/24/2004 2:05:11 PM
http://forums.belution.com/en/sql/000/042/98.shtml...more >>

Concenate 256K Limit
Posted by David Hope at 11/24/2004 1:11:03 PM
One of the fields in a query is derived from concatenation. There's seems to be a 256K Limit which would be helpful to surpass. Any suggestions?...more >>

Problem with where datefield between a and b
Posted by jxstern at 11/24/2004 12:56:56 PM
I have an SP that has a where clause using datediff()=0. I suspected that replacing this with a test for a date between date-00:00:00 and date-23:59:59 would allow the optimizer to be smarter, and indeed, it does. Unfortunately, it also for some queries returns the wrong rows! Instead of a b...more >>

Need subquery to remedy non-existent records?
Posted by SqlJunkies User at 11/24/2004 12:45:50 PM
I really hope someone can help. My current query is: SELECT Journal.JournalTitleList, Master.RO, Name.NameList, Name.Department, Journal.Return FROM Name INNER JOIN (Journal INNER JOIN Master ON Journal.JournalTitleList = Master.JournalTitle) ON Name.NameList = Master.Name WHERE (((Journal.Journa...more >>

UTC Date
Posted by Geir Holme at 11/24/2004 12:32:41 PM
Hi all. I have a table (that I do not have any design controll of) that contains one field with what they call UTC date. E.g here is one value of when the record was made. (1093307989). I want the date to sort on and report by. Any ideas how to get a readable date out of this? And.... it is S...more >>

Who is logged in?
Posted by Ryan Breakspear at 11/24/2004 12:26:10 PM
Hi all, I need to get a list of users who are currently logged in to the database, using ado. There is a lot of useful information in sp_who2, but it is a stored procedure. I've looked at the code (briefly) for sp_who2, and don't want to have to re-write it, or even understand it! Is the...more >>

Reality check
Posted by Sean M. Severson at 11/24/2004 12:17:44 PM
Could someone please verify that what I want to do with sql server is possible (I'm new). I have two different sql server databases that contain contact information. I need to keep the contacts synchronized. However, the formats of the contact tables are different and the databases are from ...more >>

Variable inside a nested loop
Posted by r rk at 11/24/2004 12:00:08 PM
Hello: I am trying to write a utility/query to get a report from a table. Below is the some values in the table: table name: dba_daily_resource_usage_v1 conn|loginame|dbname|cum_cpu|cum_io|cum_mem|last_batch ------------------------------------------------------------ 80 |farmds_w|Farm_R|4311...more >>

why dont I have a table scan
Posted by ChrisR at 11/24/2004 11:54:16 AM
It seems to me that from the code below, I should see a scan beacuse I dont have an index on RequestDate. But I don't, why not? (not that Im complaining, just curious.) update tsysqueue set ResponseDate = getdate(), TSysResponseCodeKey = 1040 where CmdCodeKey in(31,1000) and ResponseDate is...more >>

Is there a simple TSQL way to estimate record size?
Posted by Uri Dor at 11/24/2004 11:39:17 AM
Hi, Is there a *simple* query I can perform to find the (maximum) record size of my table? By simple I mean not case ... when ... size = size+4 ... size = size+1, etc. thx...more >>

how to know if the Stored procedure is used to retrieve data or not
Posted by darkStar_E2 at 11/24/2004 11:31:55 AM
Hello... Can anydoby explain me how to know if the stored proc, without knowing its codes, retreives data or not... let say that a stored proc is designed to update some columns or to display data... thanks.. Darkstar_e2 ...more >>

Batches
Posted by Mike at 11/24/2004 11:16:29 AM
Hi there. I'm using ADO.NET to execute a batch of 7000 inserts on my SQL Server 2000 DB. What I want to know is, does the ADO driver parse the batch into indavidual statements, then send them one a a time to the server, or is the batch just sent as one long text string and the parsing done...more >>

Date Formats
Posted by Bobby at 11/24/2004 11:05:05 AM
I'm trying to transfer a table of values from SQL Server to Oracle. I've 3 date fields in the table. When transferring the data, I used Select convert(Datetime, Ship_date,101) as ShipDate, convert(Datetime,Last_Tracked_Date,101) as Last_Tracked_date, conv...more >>

New bie question about NULL
Posted by Peter at 11/24/2004 10:26:54 AM
Hi, there I'm designing a table. I can't determine how many columns my user will use. So the only thing I can do is to design the table having a fixed number of columes. The numbers of column will be enough for any of my user. I will not add data to the spare columns(they will be Null) unless...more >>

Problem with @@ERROR
Posted by mkerrigan NO[at]SPAM ktoys.com at 11/24/2004 10:20:22 AM
I am trying to return an error number. I have an insert statement and directly after it have a 'PRINT @@ERROR' statement, like this. INSERT INTO myTable (Field1, Field2, Field3) VALUES (@Value1, @Value2, @Value3) PRINT @@ERROR Now, this particular INSERT statement fails, as I would expect...more >>

Grant Permission
Posted by Ed at 11/24/2004 10:11:03 AM
Hi, I have a user who needs to change the struture of tables, but he only has all the select rights at this moment, what other permission(s) he needs in order to change the tabe structure like adding primary key??? Thanks...more >>

a list of stored procedures
Posted by Ed at 11/24/2004 9:41:10 AM
Hi, Is that possible I can use information_Schema to retrive a list of stored procedures or i have to use sysobjects??? Thanks Ed...more >>

SP to ADO interaction
Posted by smk23 at 11/24/2004 9:29:02 AM
Greetings and thanks for the help! I am a newbie to ADO and mystified by this: In MS Access 2003, I am updating some SQL 2k tables via a stored procedure that updates 4 different tables sequentially. When I test the SP with Query Analyzer, it works fine and updates all four tables. When I t...more >>

Cannot use parameter in 'from' section
Posted by marina.sukhnev NO[at]SPAM thinknet.com at 11/24/2004 8:48:00 AM
Hi everyone, I'm trying to pass different tables as parameter to select statement. I tried directly assign incoming parameter from stored proc in 'from' section,id doesn't work,so right now I assigned incoming parameter to local variable,and trying to assign it ti 'from' clause,it gives me an ...more >>

Select Statment
Posted by Yalaman at 11/24/2004 8:39:03 AM
Is there any way to select patterns of IP address stored in database what I mean is example I need to remove the digits after the last dot from both side for the operator and compare them I want to do this in a select statment. @ipAddress = '134.244.2.288' or '1.1.1.0' Example select...more >>

How to force a deadlock
Posted by at 11/24/2004 8:36:51 AM
Greetings, We periodically get reports of record deadlocks, so we added Try...Catch error handling in our ASP.NET application to fail gracefully. However, we cannot test the error handling because we do not know how to force a deadlock. We have already tried this: ASP.NET Application: ...more >>

Partitioned view on two columns
Posted by Pederb at 11/24/2004 7:55:08 AM
Hello, I'm trying to make a view that is partitioned on 4(or more) tables using constraints on two coulms. Constraints: tbl1: intSite=1 datDate between convert(datetime, '01-01-1900', 103) and convert(datetime, '01-01-2000', 103) tbl2: intSite=1 datDate between convert(datetime, '01-...more >>

Outer join query help
Posted by Duke Carey at 11/24/2004 7:41:08 AM
Can somebody explain - in small words, perhaps - why I'm not getting the results I'm expecting. This query, on the data below, produces the 1st result set: select Service, Status, count(*) as Branches from Branches group by Service, Status RESULTS: Service ...more >>

Efficient DateTime query
Posted by Rchesley at 11/24/2004 7:27:03 AM
I am trying to determine the most efficient way to query records based on a datetime field where I only want records that occured between a certain timeframe on any given day. I have come up with the following 2 scenarios and scenario #2 seems to be fastest, but I need to know this query is a...more >>

Index Partitioning
Posted by vani at 11/24/2004 7:11:04 AM
HI All, What is Index Partitioing? WHich Version of SQL Server supports Index Partitioning? Is there any good third party tool for fulltext search when database used is SQL Server. Thanks, Vani...more >>

Target number of database reads per user
Posted by andrew NO[at]SPAM thevalley.f9.co.uk at 11/24/2004 7:02:57 AM
We are currently developing a high traffic digital music e-commerce site using ASP.NET and SQL Server. Does anybody have any suggestions for what a good number of database reads per user (from inital site entry to checkout and delivery of media files). Ideally we need to be able to handle in the...more >>

NTlogin info from T-SQL
Posted by Banu_tr at 11/24/2004 4:15:01 AM
I want to get ntLogin info from T-SQL In profiler, I can see this value, so there should be a sp for that . Anyone knows ? ...more >>

Cannot resolve collation conflict for equal to operation.
Posted by robert at 11/24/2004 2:11:02 AM
hi, why is this statement not correct? update dbo.MGADR set dbo.MGADR.APLZ = ( select dbo.GP_Adresse.Postleitzahl from dbo.GP_Adresse where dbo.GP_Adresse.objid = dbo.MGADR.AORT) where dbo.MGADR.AORT like 'C%' and dbo.MGADR.AKFZKZ = 'A' and dbo.MGADR.AART = 'Z...more >>

big inserts in ntext
Posted by Bruno Nieuwenhuys at 11/24/2004 1:29:04 AM
When we are inserting big (greater than 65000/2 chars) text in an ntext field we "loose" the utf8 nature of the string. example : If we insert "this is a test : ершы шы й еуые" we can insert and retrieve it with no problem. If we do the same but with "this is a test : ершы шы...more >>


DevelopmentNow Blog