Viewing 15 posts - 151 through 165 (of 168 total)
try this
select
name,modify_date from sys.all_objects where type='P'
August 23, 2006 at 5:03 pm
try this
Create table Table1(
id
int,
name
varchar(100),
tracking_number...
August 23, 2006 at 4:08 pm
michael.rosquist : The following is not giving the proper output ( ordered by 2nd column)
DECLARE @OrderBy varchar(33)
SET @OrderBy = 'Number3'
SELECT X1, X2 FROM...
August 22, 2006 at 10:45 am
use case statement like this
select column1,case column2 when 'Y' then 'abc'
August 21, 2006 at 3:20 pm
Here 2 is not a column name, it is the position in the result set on which the sort operation to be performed
The second select in above mail is...
August 21, 2006 at 3:10 pm
In a nested Transaction scenario, If the Outer Most Transaction is rolled back then all the inner transactions (even though they are committed) can be rolled back
Please refer BOL
August 21, 2006 at 3:04 pm
It seems Order By Clause is ignoring the sort column position in the result set if used in conjunction with case statement
see this!!
DECLARE
@OrderBy varchar
August 21, 2006 at 2:52 pm
What is your Question Exactly?
The above scenario is perfectly valid and if any error occurs in any of the stored procedures all the updates will be rolled back
August 21, 2006 at 2:05 pm
August 21, 2006 at 12:03 pm
I guess it will work , do not use values clause
try:
INSERT INTO my_table (comments,
sr_status,
sr_notes_count,
sr_activity_count,
last_updated_dt)
SELECT 'some input comments',
(SELECT status FROM my_table_2 WHERE id...
August 18, 2006 at 11:29 am
subqueries can be used in values clause of insert statement, but it should return only single value
August 18, 2006 at 11:15 am
August 17, 2006 at 6:27 pm
Modify the following where clause
p.SA_MAIL_ZIP = z.zipcode
to
convert(varchar(5),p.SA_MAIL_ZIP) = z.zipcode
August 17, 2006 at 5:53 pm
I observed in your procedure.. In where condition you are comparing two datatypes without explicit conversion
SA_MAIL_ZIP is of int and
zipcode is of
Varchar(5)
use...
August 17, 2006 at 5:20 pm
This will also work
SELECT * FROM Region WHERE RegionDescription LIKE COALESCE('%East%',convert(nvarchar,RegionDescription))
and this also
SELECT * FROM Region WHERE RegionDescription LIKE COALESCE('%East%',convert(char,RegionDescription))
Reason behind this is
LIKE supports ASCII pattern matching and Unicode pattern...
August 17, 2006 at 4:14 pm
Viewing 15 posts - 151 through 165 (of 168 total)