Viewing 15 posts - 1 through 15 (of 215 total)
I hope you are looking for this 🙂
CREATE TABLE #TABLE_1
(
job_cdvarchar(20),
permit_nbr int,
reference_nbr int
)
CREATE TABLE #TABLE_2
(
job_cdvarchar(20),
permit_nbr int,
reference_nbr int
)
INSERT...
September 15, 2015 at 5:12 am
Tried with both the options below. It seems to be working fine.:-)
SELECT * FROM
(
SELECT '"DFDJFDJLKLK"FSC"' COL1
)a
WHERE COL1 like '%FSC%'
----using replace
SELECT * FROM
(
SELECT '"DFDJFDJLKLK"FSC"' COL1
)a
WHERE REPLACE(COL1,'"','') like '%FSC%'
September 15, 2015 at 3:15 am
SELECT a.action as [begin],a.date,b.action as [end],b.date,a.Name
FROM(
SELECT * , ROW_NUMBER()OVER (order by action,date desc) as row_Num
FROM #SAMPLE_DATA
WHERE action='begin'
)a
INNER JOIN
(SELECT * , ROW_NUMBER()OVER (order by action,date desc) as row_Num
FROM #SAMPLE_DATA
WHERE action='end')b
ON a.row_Num=b.row_Num
September 8, 2015 at 4:15 am
select
substring(Filename,1,charindex('Bytes',Filename) -1) as Filename,
replace(substring(Filename,charindex('Bytes',Filename),charindex('Record',Filename) -charindex('Bytes',Filename)),'Bytes:','') as Bytes,
replace(substring(Filename,charindex('Records',Filename),len(Filename)),'Records:','') as 'Records'
from control_Total
September 3, 2015 at 12:57 am
This can be achieved by sub-query also 🙂
WITH SampleData (PERSON,TRANSACTDATE, STARTDATE, END_DATE, IN_PUNCH,OUT_PUNCH,HOURS) AS
(
SELECT 1234,'08/03/2015','08/03/2015','08/03/2015', '06:00','09:00','3' UNION ALL...
August 27, 2015 at 5:05 am
Hi ,
Run this script hope you find out a solution to your problem :-
create table Acc_count
(
Acc_row_no int identity(1,1),
acc_dt datetime ,
acc_count int
)
Go
insert into Acc_count(acc_dt,acc_count)
select convert(datetime ,'apr 13 2008 1:00')...
April 14, 2008 at 6:14 am
use the buit in sp of sql server :
sp_foreachtable 'delete from ?'
it will delete the values from all the tables.
Thanks ,
Amit Gupta
(MCP)
April 14, 2008 at 5:45 am
Hi ,
Here you can intoduce one more table that will contain the flagging like "DP" (Duplicate In Production Table) or "GR" (Good Records that not exists in Production) and after...
March 17, 2008 at 5:26 am
It means you want when stage 3 then perior to stage 3 (stage 1 & stage 2) should be inserted.
if i m right , then you can create a script...
March 17, 2008 at 4:08 am
To implement this you can create one extra table , and transfer all the records from your source to that table and after completion of this you can write the...
March 11, 2008 at 3:24 am
Hi ,
Try this !!!
select sum(case when app_amount = 0 then app_amount else 0 end ) '-ve Sum'
from AutoMail_Salary
Thanks,
Amit Gupta
MVP
March 7, 2008 at 4:28 am
Thanks Terri ..... its workng....:)
February 26, 2008 at 6:33 am
Hi Try this solution,
Its working.........
declare @STR varchar(30)
declare @str1 varchar(30)
set @STR='select * from tab_ind'
set @str1='''' + @STR + ''''
print @str1
Thanks & Regards ,
Amit Gupta
November 16, 2007 at 5:17 am
Oh........
U r calling a proc with an Output parameter...
Declare @computername varchar(50)
Exec proc_name @computername output
Thanks.
November 6, 2007 at 5:45 am
Hi ,
Use this sp..
sp_depends <Table Name>
ex. sp_depends 'authors'
Regards ,
Amit Gupta
MVP
July 27, 2007 at 8:21 am
Viewing 15 posts - 1 through 15 (of 215 total)