Viewing 15 posts - 15,031 through 15,045 (of 15,381 total)
You can check for the length instead of the value like this.
Declare @Header VarChar(500)
Set @Header = ' '
If DATALENGTH(@Header) > 0
print 'True'
Else
...
February 11, 2011 at 12:53 pm
Rich Yarger (2/11/2011)
February 11, 2011 at 9:48 am
LadyRuna (2/11/2011)
Our product has a VIEW called "Customerz" defined as "SELECT * FROM CustomerTable" (view & table name changed...
February 11, 2011 at 9:41 am
You could combine the second two like this
update s
set s.clean_city = l.output_city ,
s.input_city= l.input_city from mst_Address as s
inner join digitlookups.dbo.city_lookup as l
on s.clean_country=l.city_country
and addressline5 LIKE '%' + L.input_City + '%'
where...
February 10, 2011 at 3:23 pm
You should probably try joining to the inserted table instead of just getting values from it. If there is an insert that inserts multiple records at once your trigger will...
February 10, 2011 at 3:05 pm
Lutz - that is exactly what I said...however yours can be interpreted by somebody other than myself. 😛 Well spoken!!!
February 10, 2011 at 2:50 pm
Your project(s), clients, requirements and your desire to learn sql are the answers to that question. If you are looking for a reason not to learn sql then just hire...
February 10, 2011 at 2:19 pm
WHILE EXISTS
(
SELECT top 1 NULL
FROM dbo.tmp1 TMP (NOLOCK)
INNER JOIN dbo.CTR (NOLOCK)...
February 9, 2011 at 3:16 pm
Rich Yarger (2/9/2011)
Thank you both. I guess there is no way to simply remove the column constraint then without having to copy the column/table to...
February 9, 2011 at 9:18 am
No worries. Just struck me as funny that we both basically wrote the exact same thing. 😛
February 9, 2011 at 9:15 am
ummm that is the same example i already posted. 😀
February 9, 2011 at 9:07 am
Sounds like CustomerID should be a parameter to the insert sproc.
February 9, 2011 at 9:01 am
It sounds like you are dead set on doing this. If you don't care about the order of columns you can do something like this.
drop table IdentityTest
go
CREATE TABLE [dbo].[IdentityTest](
[ID] [int]...
February 9, 2011 at 8:57 am
It sounds like you want to remove the identity property rather than the column itself? This can be done in tsql but like Mike said this sounds like a decision...
February 9, 2011 at 8:50 am
Suresh Kumar Madhavaraju (1/31/2011)
Let's say you want...
January 31, 2011 at 3:16 pm
Viewing 15 posts - 15,031 through 15,045 (of 15,381 total)