Viewing 15 posts - 106 through 120 (of 132 total)
inner joining to a table allows you to actually select information out of the table you are joining to. using the exists statement simply returns a true or false on...
February 21, 2007 at 7:48 am
cannot tell without knowing what your table structures look like and what sample data you are working with where you are seeing records repeated. please post that info and i...
February 21, 2007 at 6:35 am
since the column does not exist, sql does not like the drop column statement and that is throwing an error.
you would want to have your sql that actually does either...
February 20, 2007 at 2:47 pm
i did not have any luck putting together one sql statement but i was able to write up a script that you could put into a procedure and then execute...
February 20, 2007 at 2:36 pm
my first thought is that trigger c would not even know how table b was affected, only that it had an event to execute from.
table b could have been...
February 20, 2007 at 10:07 am
i realized that right after i posted, good to know that i had a valid thought for once!
February 16, 2007 at 2:09 pm
create a computed column in your table. syntax would be similar to below:
CREATE TABLE Test( field1 int, field2 AS (field1 + 25))
February 16, 2007 at 1:57 pm
i assumed that you were looking for duplicate reasontext, createdwhen and orderstatuscode records, which appears to be a false assumption.
without knowing much about the ddl, i am assuming that the...
February 16, 2007 at 12:45 pm
your having clause is incorrect, you want the syntax to look like this:
SELECT ReasonText, CreatedWhen, OrderStatusCode
FROM CV3OrderStatusHistory
WHERE (OrderStatusCode = 'perf')
Group by ReasonText, CreatedWhen, OrderStatusCode
Having count(*) >1
February 16, 2007 at 12:22 pm
add that condition to the where clause:
select
Select Phone1, Phone2, Phone3 from Table
where (Phone1 = Phone 2
or Phone1 = Phone3
or Phone2 = Phone3)
and ltrim(rtrim(phone1)) <> ''
and ltrim(rtrim(phone2)) <> ''
and ltrim(rtrim(phone3))...
February 16, 2007 at 7:14 am
actually, from looking in the help and actually testing the DDL trigger, the renaming of the column appears to be using the sp_rename stored procedure which in turn uses the...
February 16, 2007 at 6:47 am
one more level would do it (replace testing with your original query)
select
x.order_no, x.step, x
February 15, 2007 at 2:47 pm
another approach could be something like this where you substitute your orignal query in the inner queries:
select o.order_no, o.step, o.produced, max(n.step), max(n.produced)
from
(select order_no, step, produced
from your_original_query) o
left join (select order_no,...
February 15, 2007 at 1:30 pm
here is a script that will work but may take a while to process. i am sure that there is an easier way:
create table #tmp (table_name varchar(50), column_name varchar(50), num_records...
February 15, 2007 at 1:01 pm
one question, can only the System_DB column have this database value in it or do you want to look through every column in the database for the 20202...
February 15, 2007 at 12:21 pm
Viewing 15 posts - 106 through 120 (of 132 total)