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 2006 > threads for monday july 17

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

SQL query help
Posted by mailpitches NO[at]SPAM email.com at 7/17/2006 11:55:33 PM
X-No-Archive: yes Hello, I need help with an sql query. Suppose we have the following data: [ letter, number ] ( a , 1 ) ( a , 2 ) ( b , 1 ) ( b , 3 ) ( b , 4 ) ( c , 4 ) Suppose I want to select all numbers that aren't paired with 'a', and keep list list of numbers unique. So I ...more >>


Executing the Stored Procedure from command prompt
Posted by JP at 7/17/2006 11:23:01 PM
Hi, Is it possible to execute the stored procedure from the command prompt? execute dbo.sequenceconnectionstring 'Data Source=TSTSRV\TSTINSTName;Initial Catalog=TSTDB;Trusted_Connection=Yes;' Thanks...more >>

Usage of Object_id
Posted by Jean-Nicolas BERGER at 7/17/2006 10:33:23 PM
Hi, sp_helptext sp_procoption gives me (...) select @tabid = object_id, @uid = schema_id from sys.objects where object_id = object_id(@ProcName, 'local') and type in ('X','P','PC') (..) When I look to the MSDN Librairy for the syntax of object_id, I found : OBJECT_ID ( '[ database_name ....more >>

Key Question
Posted by Rinus Callenbach at 7/17/2006 10:19:31 PM
Hi All, Quick question, I have a table with the following 3 fields: - SecurityID (int) - Date (smallDateTime) - Price (Float) This table is used to store historic security prices. The key of the table is BOTH the SecurityID and the Date fields. Can I assume that a query on only one...more >>

Creating a unique user...
Posted by SteveS at 7/17/2006 9:37:01 PM
I can write out the SQL statement to create a new user for a db I'm installing, but I'm having an issue with a certain user. I'll install SQL 2005 using windows authentication. I'll install my db too. I'm trying to find the write code to add the user "ISUR_computername" - it's difficult, ...more >>

insert populating not null with trigger
Posted by Jeff User at 7/17/2006 8:40:50 PM
Hi all I have a table with an identity col (A) for a PK. There is another col (B) that cannot be null. I know this seems odd, but, I need to get the newly created ID and insert in into col B. Is there any way to do this? Can I do this with a trigger? I have been trying to use an INSTEAD O...more >>

stored proc to new table
Posted by rodchar at 7/17/2006 8:36:01 PM
hey all, what's the easiest way to get the results of a stored procedure into a new table? thanks, rodchar...more >>

Filtered data from stored proc (noob??)
Posted by Sverre Hårstadstrand at 7/17/2006 8:08:55 PM
Hi! I have a form in my application containing among other things a DataGridView. On this form there are also some TextBoxes, CheckBoxes and ComboBoxes that my users will use to filter the data that is to be shown in the DataGridView. I have this working using an ad-hoc query, but would lik...more >>



Limiting delete
Posted by Roy Goldhammer at 7/17/2006 6:59:33 PM
Hello there I have Citys table with CityCode and CityName fields The cityCode is store in many tables. So i would like to create condition that won't allow user to delete CityCode that exists on another table. What is the simplest way to do that? ...more >>

best aproach advice...
Posted by Petr SIMUNEK at 7/17/2006 5:19:57 PM
I need an advice what would be the best approach in following scenario... - I'm retrieving(Stored Proc) some records from DB with rather large query with joins and enumerations. Lets say it is TOP N random products from some product DB. - I need to return this to calling client app (asp.net...more >>

sql 2000 query help
Posted by gane at 7/17/2006 4:15:52 PM
Hi, I would like to fetch data from multiple tables along with a max and count. query looks like select p.productcode from product p, productcategoryregion pfa, category bc, order pe, program pn where p.productcode=pfa.productcode and bc.catid=p.catid and pn.program_id=pe.program_id and ...more >>

prefacing procs with sp_ still bad form?
Posted by 220rounder NO[at]SPAM gmail.com at 7/17/2006 4:04:06 PM
Hi. Rumor had it in Sql 2000 and earlier, that prefacing a stored proc name with "sp_" slowed down the proc because sql server looked in the master db first for the proc. Has SQL 2005 changed this, or is it still wise to not preface the procs names with sp_ ?? wondering, thanks, Ste...more >>

OLE Object
Posted by BSK at 7/17/2006 2:45:35 PM
I need to print an OLE chart on one of my access forms. I don't think the printout function is very efficient and I only want to print the OLE object and nothing else. I can't make a report because the chart has a variable rowsource and that, as far as I can tell that cannot be modified in a r...more >>

Database design question?
Posted by Edgard L. Riba at 7/17/2006 2:10:58 PM
Hi all, I have a table where I keep the inventory on-hand stock, the last purchase price, the average cost, and similar data for a multi-warehouse inventory application. Pretty standard stuff I would guess. It is something like the following: CREATE TABLE Stock ( WarehouseID I...more >>

Directory listing without xp_cmdshell?
Posted by Marcus at 7/17/2006 1:44:37 PM
I was wondering if it is possible to get a directory listing of a particular folder on SQL Server 2005 without having to resort to using xp_cmdshell. I just don't want to assign the user that my application creates on sql server with such a high privileged state. Thanks, Marcus ...more >>

Deadlock
Posted by Mark Goldin at 7/17/2006 1:23:41 PM
What is a best way of handling deadlock problems? Thanks ...more >>

eliminating the use of temp tables with derived tables
Posted by SAM at 7/17/2006 12:21:01 PM
I am trying to rewrite my procedure to use a derived table instead of temp table to test if this increases performance. I was using this article to help but I receive a error message where I am using a fuction to build my parameter list. Could someone review my current proc to provide a sug...more >>

Sql Variable for an inner select?
Posted by Vinayan3 at 7/17/2006 11:28:11 AM
Hi, I have two tables. I do a select on the first table. Then query the second table, if a column is in the first select. Parameters: @FIRSTABLEFITLER Select * from SECONDTBL where (VAL in (select VALTWO from FIRSTTABLE where ID = @FIRSTABLEFITLER)) Is there a way I can c...more >>

MS Access Graphs
Posted by BSK at 7/17/2006 10:47:57 AM
Hello, I am trying to make a dynamic graph to display test results. I have several different test types that I want to select from a drop down box. When one of these is selected I want the graph to dynamically change to represent the choice in the combo box. I have attempted to change the row...more >>

help with sql statement
Posted by ifoundgoldbug NO[at]SPAM gmail.com at 7/17/2006 9:32:07 AM
Greetings I have a table arranged thusly Reason Status Est Comp Date PMDate Tool# 7/14/06 WFT083 Maintence done 7/16/06 WFT083 what my sql statement MUST do is search by Tool # then f...more >>

Does Item fit into Box? (Tricky query for me)
Posted by Steve Beach at 7/17/2006 9:27:17 AM
Here is the situation. I'm trying to find all the boxes that an item can fit into. The only rule is that the item's dimensions (length, width, height) must be smaller (or equal) to the boxes dimensions. For some reason the solution is escaping me. I thought I had it but it does not work 1...more >>

query design help
Posted by Yofnik at 7/17/2006 8:36:05 AM
Hello All, I need some help designing a query. Basically, I need to create a summary of multiple SELECT statements. Here is the background: I have a table that stores Reports created by users of my application. The Report data is derived from a predefined SQL Server View that returns all the po...more >>

Service Pack 1 - CTP vs. RTM????
Posted by Jeremy at 7/17/2006 8:15:46 AM
I downloaded and installed what I thought was Service Pack 1 for SQL Server 2005. Then I read an article in SQL Server Magazine that states that it's a "preview" and not the real deal. I've never heard of a *preview* of a service pack. So what 's the status on SP1? Do we have a "final" (RTM) ...more >>

function to return today at midnight
Posted by JohnnyMagz at 7/17/2006 8:09:01 AM
Hi, I need to write a function that accepts a date and returns that date at midnight. I think that it's signature would look something like this: CREATE FUNCTION TodayAtMidnight (@theDate datetime) RETURNS DATETIME AS DECLARE @retVal datetime --change the date to <date> 00:00:00 So, if a...more >>

insert using subquery
Posted by rickypatel9 NO[at]SPAM gmail.com at 7/17/2006 7:55:45 AM
Trying to insert into a table based on a subquery INSERT INTO dt_result_all_details (trade_date,ticker,instrument, sub_portfolio, uticker, fund) VALUES ((SELECT TOP 100 r.trade_date,r.ticker,r.instrument, r.sub_portfolio, r.uticker, r.fund FROM dt_result_all as r LEFT JOIN dt_result_all_det...more >>

Ordering chaos
Posted by rodchar at 7/17/2006 6:55:02 AM
hey all, i have a simple 2 column table like this: Total | ~ Total | A I just used the pipe to separate the columns, it's not in data. I'm ordering on the 1st then 2nd columns. Shouldn't the tilde end up on the bottom according to ascii table? thanks, rodchar...more >>

Need to get columns that are not NULL
Posted by Sumeet Benawra at 7/17/2006 6:53:03 AM
I have a table with lots of columns, however many of them contain null values, but for each row this can change, some columns may or may not have a null value. I want to construct a query to get only the columns that do not have a null value. Now if I do, select * from.... then obviously...more >>

help me in select query
Posted by visu at 7/17/2006 5:48:17 AM
hi, my database is in ms- access my table (ordermaster) structure is orderid - emailid - amount 100 - x@xy.com - 1500 101 - t@dd.com - 1000 102 - x@xy.com - 500 103 - x@xy.com - 1000 104 - t@dd.com - 400 105 - r@rr.com - 300 106 - e@ee.com - 350 107 - r@rr.com - 400 the output result ...more >>

Finding number of occurrences of string in record
Posted by odonnell_matthew NO[at]SPAM hotmail.com at 7/17/2006 4:46:32 AM
Hi, Can anyone think of a way (in T-SQL) to find the number of occurrences of a particular string in a column, with the condition that the string DOES NOT have the character A-Z either directly in front or directly after it? Eg. Column "Description" in table "People" migh...more >>

RE: Database design for multilanguage web application
Posted by yoni at 7/17/2006 4:36:19 AM
Reply for Message in September 2004: Database design for multilanguage web application. For The answer written there, my additional question is how do I deal a situation where I have Two columns or more with a localized language, For example: In Main_table: Title_ID,Description_ID,Descriptio...more >>

Retrieve Query
Posted by Amit20 at 7/17/2006 12:16:02 AM
Hi Friends, I had written a complex SQL query through SQL Query Analyzer, and had executed the same by pressing F5 button. Before I could save that query on my PC, my computer switched off. By any chance is it possible to retrieve the complex query executed by me ? If yes then how ? ...more >>

Retrieve Query
Posted by Amit20 at 7/17/2006 12:15:02 AM
Hi Friends, I had written a complex SQL query through SQL Query Analyzer, and had executed the same by pressing F5 button. Before I could save that query on my PC, my computer switched off. By any chance is it possible to retrieve the complex query executed by me ? If yes then how ? ...more >>

Strange performance problem with a UNION view - Please help
Posted by CB at 7/17/2006 12:00:00 AM
Hi=20 I am having a strange performance problem with a UNION view when some = of the columns are NULL. This is occuring on SQL 2000 (SP4). Unfortunately my company's policies do not allow me to post real source = code here, but I will attempt to give you example code that might help. The...more >>

Combining INSERT & UPDATE Errors
Posted by Jon Ellis at 7/17/2006 12:00:00 AM
Hi All, I am trying to combine an UPDATE and an INSERT into one SP, based upon the procedure listed below, which generates an error. The error generated is - "Procedure or functionhas add_T_Project_Custom_Fields_Group_Links too many arguments specified". If no record exists, the proc ex...more >>

Sql 2005 ent. edition and previous backup files
Posted by SQL at 7/17/2006 12:00:00 AM
I recently installed sql 2005 ent. I now simply want to restore a database from a backup file of sql 2000. First: I can't see a tool like EM to do visual restore Second: I can't see a tool like QA to eventually do a batch restore Is it possible to do? Thx....more >>

**case cluase**
Posted by R-M at 7/17/2006 12:00:00 AM
Hi I'm working with SQL2000, and I want to have a following result I tried it with case clause but I couldn't get the desired result. Table1(code1,date1) I want to check the variable @status if it's 0 then I want to fetch all rows without any condition but if it's 1 then I want the range ...more >>


DevelopmentNow Blog