Viewing 15 posts - 1,366 through 1,380 (of 1,417 total)
You will have to provide more information.
Your query will not run as Col1 is ambiguous.
Why do you left join when the join to #temp will take out any nulls in...
September 8, 2006 at 5:41 am
You probably have a null in either LastName or Firstname. ( null + 'Anything' = null)
There is no need for a function as something like the following should work:
SELECT LastName
,FirstName
,CASE WHEN...
September 8, 2006 at 4:03 am
There is no need for an outer join here:
SELECT T.*
FROM dbo.Ticket T
JOIN dbo.Audit A ON T.ticket_id = A.ticket_id
JOIN ( SELECT A1.ticket_id, MAX(A1.last_updated_date) AS last_updated_date
FROM dbo.Audit A1
GROUP BY A1.ticket_id) D
-- filter audit...
September 7, 2006 at 11:16 am
>> I want to ask what type of sp can be used
You do not allow your users delete access to the table and force them to use a...
September 3, 2006 at 10:33 am
select *
from YourTable
where ShipToNum not like '%[^0-9]%'
September 1, 2006 at 11:00 am
There are no BEFORE Triggers so you have to use an INSTEAD OF trigger or a SP.
September 1, 2006 at 3:38 am
Just noticed that you do not want AcctCode in addition to 'Payment Servi'.
This may work:
-- Do not have enough info to tell if distinct is needed
select distinct PR.PrmLog_Acct_Code, PR.PrmLog_Customer_ID
from dbo.PrmrLog...
August 31, 2006 at 11:47 am
A quick perusal of your code suggests that the following may work.
-- Do not have enough info to tell if distinct is needed
select distinct PR.PrmLog_Acct_Code, PR.PrmLog_Customer_ID
from dbo.PrmrLog PR
where exists (select...
August 31, 2006 at 11:29 am
If the position of the !'s is not fixed use the following, otherwise hardcode in the numbers.
ALTER PROCEDURE dbo.spGetInks
(@Company varchar(50), @Site varchar(50), @Zone varchar(50))
AS
SET NOCOUNT ON
SELECT D.[Name]
,D.[Description]
,RTRIM(SUBSTRING(D.[Description], D.P1 + 1, D.P2...
August 31, 2006 at 8:23 am
Sybase uses a different dialect of T-SQL. There is some documentation at:
http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug
August 31, 2006 at 7:00 am
I think you need to force the join order with something like:
select T1.[Name], T1.tracking_number, T2.start_date, T3.first_name, T3.last_name
from Table1 T1
left join
(
Table2 T2
join
( select T22.tracking_number, max(T22.start_date) as start_date
from Table2 T22
group by T22.tracking_number) D
on...
August 31, 2006 at 4:38 am
I think this would be best done either in the middle tier or by using a cursor.
If you have less than 1000 rows something like the following ghastly looking query...
August 30, 2006 at 10:54 am
Try sp_executesql with output parameters. Something like:
declare @EmployeeNo int, @AccessLevelID int, @err int
set @queryString = 'select @EmployeeNo = b.employee_no, @AccessLevelID = a.Access_Seq from '
+ @dbName + '..employee a, '...
August 30, 2006 at 7:26 am
-- Test data
declare @t table
(
refNo char(5) not null primary key
)
insert @t
select 'ABC-0' union all
select 'ABC-1' union all
select 'XYZ-0' union all
select 'XYZ-1' union all
select 'XYZ-2' union all
select 'PQR-0' union all
select 'MNO-0'...
August 24, 2006 at 9:21 am
Viewing 15 posts - 1,366 through 1,380 (of 1,417 total)