all groups > sql server programming > may 2007 > threads for sunday may 6
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
ActualRebinds & ActualRewinds
Posted by Leila at 5/6/2007 9:39:19 PM
Hi,
I have the following query:
use northwind
go
select c.companyname,o.orderdate, od.discount, p.productname from customers
c join orders o
on c.customerid=o.customerid
join [order details] od on o.orderid=od.orderid
join products p on od.productid=p.productid
where c.customerid like 'a... more >>
Or's
Posted by Paul Ilacqua at 5/6/2007 6:27:36 PM
Can a statement like the following be rewritten to not have to repeate the
date criteria for every set of OR's
Thanks...
SELECT DATE_TIME, SERIAL,
STA3200_CYCLE_CT,
STA3400_CYCLE_CT,
STA3600_CYCLE_CT,
STA3800_CYCLE_CT,
STA4000_CYCLE_CT
FROM TESTLOOP
WHERE DATE_TIME >= '2007-05-02 00... more >>
Before insert trigger
Posted by Willo at 5/6/2007 5:31:05 PM
Hi;
i have this trigger, where i need to write the value of @CTA on the field
CTA in dbo.cnt_detpolizas...
so i need to set the field's value BEFORE the insert is taking place,
right?...
Could someone give some directions to do it?
TIA
:
ALTER TRIGGER [TVERIFAFECTABLE]
ON [db... more >>
Invalid column name in subquery
Posted by esmlima at 5/6/2007 11:26:11 AM
This SQL returns the following error:
SELECT ped.id_pedido, ped.id_loja,
(
SELECT sum(item.valor_produtos)
FROM tb_pedido_item item
WHERE item.id_pedido = ped.id_pedido
) as valor, valor+1
FROM tb_pedidos ped
WHERE data='6/5/2007' -- id_pedido=31999
Server: Msg 207, Level 16, ... more >>
Script to populate for a large DB
Posted by Hassan at 5/6/2007 8:43:32 AM
can someone help me provide a script that will populate around 50GB of data
? Ideally it would be multiple tables with some various data types...if I
could add more data to Northwind or pubs or even AdventureWorks, that would
be fine..
Thanks
... more >>
How do I write this sql statement to delete records?
Posted by Fendi Baba at 5/6/2007 2:00:40 AM
Hi, i need to write a delete query. The data resides intwo tables.
One condition is that they do not exist in a third table. They are all
joined by the same UserID as the primary key.
Thanks in advance.
... more >>
SQL Query , Help
Posted by Hadidi at 5/6/2007 1:32:02 AM
I've got The Customers table : T1 .. has two columns : ID(int) , IsDeleted(bit)
I want in a one sql query to return :
NumberOfAllCustomers -- NumberOfDeletedCustomers --
NumberOfExistingCustomers
... more >>
Simple update question
Posted by inadsad NO[at]SPAM hotmail.com at 5/6/2007 12:51:58 AM
Greetings,
I have a simple update query in Sql 2k and want to update only
one field instead of all 3 fields.
Update customer set
Name = @inName,
City = @inCity
State = Case when @instate is not null then @instate else
State end
Where Customer = @in... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
2005: UPDATE "from" inserted/deleted in INSTEAD OF UPDATE trigger
Posted by R.A.M. at 5/6/2007 12:00:00 AM
Hello,
I am learning T-SQL and I have such problem. I have a table Materials(Number
PK, Name) and I need to write an instead-of-update trigger in which I have
to (under some conditions) perform action of application of all Materials'
current changes. I have written it in this way:
....
... more >>
|