Viewing 15 posts - 106 through 120 (of 173 total)
Try this: -
SELECT CASE WHEN F1 is NULL THEN F2 ELSE F1 END F11,CASE WHEN F2 is NULL THEN F1 ELSE F2 END F22
FROM #Test1
Regards,
Andy Jones
.
August 7, 2002 at 5:29 am
I just ran
SELECT command,len(command) FROM msdb.dbo.sysjobsteps
and didn't see and spaces at the end of command, are you talking about the grid output in query analyser?
Regards,
Andy Jones
.
August 6, 2002 at 8:02 am
You do not say where the country_ID is stored, is it in a customer table? If so join ProductOwn_Details to customer and filter on country_ID = 8.
e.g.
insert into Newsletter_Details
(
customer_ID, NewsletterSubscribe_ID
)
select...
.
July 26, 2002 at 1:54 am
Hi, from BOL: -
Within its scope, a table variable may be used like a regular table. It may be applied anywhere a table or table expression is used in SELECT,...
.
July 26, 2002 at 1:39 am
Is your server configured to allow updates to system catalogs (see allow updates option in BOL)? If so maybe somebody updated master.sysxlogins.name (the table on which the view syslogins is...
.
July 24, 2002 at 5:07 am
This is the test I ran, give this a go: -
--Create table
create table tab
(
c1int
,c2int
,c3int
,c4int
,c5int
,c6int
,c7int
,c8int
)
GO
--Create trigger
create trigger tg_tab_up on tab for update as
begin
if columns_updated() | 128 = 128
begin
select 1
end
end
GO
--Insert record
insert into...
.
July 24, 2002 at 2:20 am
I tested using a bitwise OR operator and it seemed to work so try: -
if columns_updated() | 128 = 128
Regards,
Andy Jones
.
July 23, 2002 at 2:43 am
Is ID numeric? If so try: -
select
'expr1'
,sum(Value)
From
Tab
where
Id between 1100 and 1199
union allselect
'expr2'
,sum(Value)
From
Tab
where
Id between 2015 and 2025
Regards,
Andy Jones
.
July 17, 2002 at 8:55 am
You would need to use dynamic sql for this task:-
CREATE PROCEDURE NAME_PROC
(
@TABLENAME sysname
)
AS
declare @sql varchar(1000)
select @sql = 'CREATE TABLE ' + @TABLENAME + ' (OID int IDENTITY(1, 1) PRIMARY KEY...
.
July 17, 2002 at 3:23 am
There are a number of articles submitted about this. Click the search menu above and search on 'naming and standards' to retrieve some relevant articles.
Regards,
Andy Jones
.
July 17, 2002 at 1:43 am
Could use: -
SELECT @prmSKUResult = FSP.SKU
FROM FSProducts FSP
where
(sizevalue = @prmsizevalue)
and
(colorvalue = @prmcolorvalue)
and
case
when @prmwidthvalue is null then @prmwidthvalue
...
.
July 16, 2002 at 7:38 am
-t is the field terminator not the text qualifier.
Regards,
Andy Jones
.
July 16, 2002 at 4:37 am
Need some more information here: -
Should this update be performed as a one off job or each time the customer's products are updated?
Also, you don't give any information on the...
.
July 16, 2002 at 2:29 am
I believe the convert function is independent of regional settings: -
select convert(char(16),getdate(),106)
will give '16 Jul 2002' (i.e. not full month but char(3)).
Regards,
Andy Jones
.
July 16, 2002 at 1:45 am
Viewing 15 posts - 106 through 120 (of 173 total)