Viewing 15 posts - 226 through 240 (of 314 total)
SQL Books Online is the good place to go.
Thanks
Sreejith
September 7, 2006 at 2:24 pm
If u want 1 customer to belong to more than 1 group then ur design has got to change.
Need to have "Customer" table, "CustomerType" table and "Customer_X_CustomerType" table to get...
September 7, 2006 at 2:22 pm
Are you trying to use the record dated Jan 2 2006 (Most current b4 insert) and insert it again (with the Name Changed to BOB abd Date Changed to Current...
September 7, 2006 at 11:39 am
Here you. This should get you close.
--Update Existing
Update Destination set SRC1_NAME = SOURCE.SRC1_NAME,
SRC2_NAME = SOURCE.SRC2_NAME,
LAST_UP_DATE = SOURCE.LAST_UP_DATE
from (Select SRC1.SRC1_ID,SRC2.SRC2_ID,SRC1.SRC1_NAME, SRC2.SRC2_NAME, SRC1.LAST_UP_DATE
--SRC1.SRC1_NAME,SRC1.SRC2_ID,SRC1.LAST_UPD_DT
from SRC1 INNER JOIN SRC2 ON SRC1.SRC1_ID= SRC1.SRC1_ID )...
September 7, 2006 at 11:34 am
I forgot to add the where clause on created_date
so here it is:
Select audit.* ,ticket.* from audit INNER JOIN
(
Select ticket_id,max(last_updated_date) as MaxUpdateDate FROM audit
group by ticket_id ) MaxAudit on audit.ticket_id...
September 7, 2006 at 11:23 am
Hope this helps.
Select audit.* from audit INNER JOIN
(
Select ticket_id,max(last_updated_date) as MaxUpdateDate FROM audit
group by ticket_id ) MaxAudit on audit.ticket_id = MaxAudit.ticket_id
and audit.last_updated_date = MaxAudit.MaxUpdateDate
where audit.Status not in ('EXCLUDED','ACCEPTED')
order by...
September 7, 2006 at 11:20 am
Declare @i_Error int
set nocount on
set @i_Error = 0
Begin Tran TR1
Insert into REPLAY_LOG_NEW(ACTIVITYID , Student)
select ACTIVITYID , Student from REPLAY_LOG
Select @i_Error = @@ERROR
If @i_Error = 0
Begin
Insert into REPLAY_LOG_ARCHIEVE(ACTIVITYID , Student)
select ACTIVITYID...
September 7, 2006 at 1:40 am
Here you go.
Declare @i_Error int
set nocount on
set @i_Error = 0
Begin Tran TR1
Insert into REPLAY_LOG_NEW(ACTIVITYID , Student)
select ACTIVITYID , Student from REPLAY_LOG
Select @i_Error = @@ERROR
If @i_Error = 0
Begin
Insert into REPLAY_LOG_ARCHIEVE(ACTIVITYID ,...
September 7, 2006 at 12:14 am
You can use ActiveX transformation property and look for the ascii value in the first column and exclude it if it has CR. That will exclude the last line to...
September 6, 2006 at 10:52 pm
DB Owner gives complete access to the database. To be able to run JOb the user must be assigned to "processadmin" fixed server role(thats erver wide permission and he can...
September 6, 2006 at 10:45 pm
Try this:
Delete tableName where Cast(Convert(Char(10),DateIN,101) + ' ' + Cast(TIMEIN as varchar(10)) as datetime) <= Cast(Convert(Char(10),getdate(),101) + ' 08:00:00' as Datetime)
Sreejith
September 6, 2006 at 10:42 pm
Delete on table with lot of rows will take a lot of time to commit all those Xaction.
If you want to wipe away then use Truncate table
Thanks
Sreejith
September 6, 2006 at 8:06 pm
1.Open the table in Enterprise Manager (Design Mode) and Select all the Columns and paste it in to new table.
2.Right Click the table and generate script (with Indexes and Keys)....
September 6, 2006 at 8:03 pm
If you want Date Time to be converted to Char then u need to use Convert function cos I don't know why you would want to convert date to float...
September 6, 2006 at 8:00 pm
Try this:
select * from stores WHERE Stor_ID IN (7067,6380,8042,7896)
order by CharIndex(stor_id,'7067,6380,8042,7896')
September 6, 2006 at 4:24 pm
Viewing 15 posts - 226 through 240 (of 314 total)