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 > august 2005 > threads for saturday august 13

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

CONDITIONAL 'WHERE'
Posted by Aleks at 8/13/2005 11:40:13 PM
THIS IS MY QUERY: SELECT * FROM users a WHERE a.usertype = 'contact' AND ISNULL (a.FirstNm,'') LIKE 'MMColParam5%' and ISNULL (a.LastNm,'') LIKE 'MMColParam6%' AND STATUS IN (MMCOLPARAM7) ORDER BY d.Attorney ------- THE LINE WHERE IT SAYS "AND STATUS IN (MMCOLPARM7), I WANT TO...more >>


problem with # sign
Posted by Laura K at 8/13/2005 11:34:42 PM
I have a stored proc that takes a parameter and finds the correct row. Simple and easy. Unfortunately the data contains various symbols such as # and -. When I run the proc and try to pass a value that contains a symbol I get an error. The sp works fine when there are no symbols. Any sug...more >>

Not using relations
Posted by Bob at 8/13/2005 10:30:29 PM
Looked at some of the table structures of some commercial packages, even some popular CRM stuff and business solutions stuff (not naming names, don't wanna get sued :-) ). Found that lots of them did not have any PK FK relationships defined in the databases at all. That means that all referen...more >>

Constants in TSQL
Posted by Frank Rizzo at 8/13/2005 7:36:16 PM
Hello, Is there such a thing as constants in TSQL (similar to constants in other languages)? I've looked in books online and can't find any references to them. Thanks...more >>

Websites for Triggers!
Posted by Arpan at 8/13/2005 4:16:46 PM
Can someone suggest a few websites (other than Microsoft) which explain Triggers in SQL Server especially multi-row UPDATE Triggers? Thanks, Arpan ...more >>

IDENTITY Column!
Posted by Arpan at 8/13/2005 2:36:07 PM
A table named Products1 containing 20 records has the following columns: PID int IDENTITY (1,1) PCode varchar(50) PName varchar(50) PDesc varchar(500) Price money Qty int I created another table named Products2 whose design is exactly the same as the design of the table named ...more >>

Grouping records - HOW TO
Posted by Phil at 8/13/2005 2:02:04 PM
Hi, Is there a way that I can get the same sort of output as when you create a relationship between two tables, but with only one table? With a dataset containing two (or more) tables that has a data relation added, you get a resultant output (say a datagrid) that groups by the column de...more >>

Query Access & MS SQL
Posted by John at 8/13/2005 1:31:11 PM
Are syntax of queries same in MS Access and MS SQL 2005? I am asking because I have lot of queries in Access database. Do I have to change every query when I move to MS SQL 2005? Thanks!!! ...more >>



Cannot enter data into database
Posted by Karolus at 8/13/2005 11:19:01 AM
I'm a SQL newbie and am totally perplexed. I have tried to enter the following data and I get the subsequent message. INSERT INTO t_Answer ( AnswerID, AssessmentID, QuestionID, EvaluationValue, AnswerText, CreationUser_ID, RevisionUser_ID ) VALUES ( 457 , 130, 4, '14', 'testing what I want...more >>

Single 5 mil row update or many 1000 row updates?
Posted by Richard C at 8/13/2005 8:49:30 AM
Hi, I'm looking for some feedback as to which of these two approaches to a problem is better. We're dealing with 5 million records of 100 million to be updated, and both plans come up as clustered primary key scanning. On the one hand, a DBA has come up with: (the primary key of sourcet...more >>

Error when updating
Posted by Job at 8/13/2005 8:36:48 AM
I get the following error when I execute the statement below. 'Invalid length parameter passed to the substring function' Update Tbl_Txn_UT Set Fxd_Units = CASE WHEN TxnUnitsBase is Null and (TxnUnits like '%,%' or TxnUnits like '%M%' and TxnUnitsDur like '%M%') THEN Cast(left(Txn...more >>

string search
Posted by Rama via SQLMonster.com at 8/13/2005 7:16:37 AM
from a string like - [text].[text].[text].&[1]&[4], I need to extract the numbers alone. Can someone help me with a function that searches and returns the numbers within the "&[ ]" pattern? thank you! -- Message posted via http://www.sqlmonster.com...more >>

Query
Posted by Smitha at 8/13/2005 5:50:03 AM
i have written a SP to select multiple columns from a table.now how do i display the same in the corresponding text boxes that i have in my form......more >>

Help! CUBE? ROLLUP? or COMPUTE BY?
Posted by OKLover at 8/13/2005 5:10:03 AM
Help! CUBE? ROLLUP? or COMPUTE BY? Giving a table's content as below... Date Area Product Amount ------------------------------------------------------------------------------ 2005/07/23 CA Book 150 2005/07/29 NY Pen 70 2005/08/03 CA Pen 500 2005/08/04 CA Book 200 2005/08/05 NY B...more >>

The SUM question
Posted by OKLover at 8/13/2005 4:55:14 AM
I have one table as below: item_id amount inout ---------------------------------------------------------------- 1 13 1 1 20 1 1 7 0 1 24 1 2 10 0 2 20 1 How to use the SELECT command to SUM the amounts according the inout (when 1 is +, 0 is -) and item_id field? For ...more >>

Problems with GROUP BY
Posted by Marco Napoli at 8/13/2005 12:00:34 AM
I have the below SELECT statement and I am having a problem: SELECT status, SUM(NoItems) * Price AS NewRevenue FROM orders GROUP BY status, Price The problem is because I need to place the Price field in the GROUP BY I receive multiple rows. I need the result to be on one row. Any ideas o...more >>

sql query
Posted by ichor at 8/13/2005 12:00:00 AM
hi i can get the result mentioned below using a cursor but want to have a single query to do it. can any one help. drop table #cost1 create table #cost1 ( prod_id int , cost decimal(9) ) insert into #cost1 values (1,10000) insert into #cost1 values (2,10000) select * From #cost1 d...more >>

Query help please
Posted by Andrew Jocelyn at 8/13/2005 12:00:00 AM
Hi I have a results set which is contains IDs where the word column matches some search criteria. Here is a simplified example. I can get the results as if it was an 'OR' search but I need to make it like an 'AND' search. Please see below. create table #results (rID int, word varchar(50)...more >>

Questions
Posted by Bpk. Adi Wira Kusuma at 8/13/2005 12:00:00 AM
my question is: "Is there different speed of process? or Which Statement owning quickest performance speed in Process?" DELETE FROM TB1 WHERE NOID LIKE 'A%' and FAge<=10 or DELETE FROM TB1 WHERE FAge<=10 and NOID LIKE 'A%' You need to know that the field NOID have the index, While Fage ...more >>

Alert from addition to table
Posted by tony wong at 8/13/2005 12:00:00 AM
The SMS provider will update my SQL server when there is incoming SMS message. apart from regular manual check on table how can i know there is incoming new SMS message? alert by email? any guidance? Thanks. Tony ...more >>

PowerBuilder connect to Access(get an error SQLSTATE = 01S01 )
Posted by guo-feng lui via SQLMonster.com at 8/13/2005 12:00:00 AM
I am trying to connect Microsoft Access Database from PowerBuilder(ODBC), when execute a select clause, get an error SQLSTATE = 01S01(Row errors), but trying open the database from Microsoft Access 2000 tools , the row is very good. I am puzzled this error. Someone help me to this problem, ...more >>


DevelopmentNow Blog