Viewing 15 posts - 106 through 120 (of 315 total)
Ninja,
Aren't u doing "Instead of Trigger" like I mentioned?
Thanks
Sreejith
September 22, 2006 at 1:18 am
Server: Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'RowCount'
September 22, 2006 at 1:15 am
The query below assumes Provider is the unique key on Master table. If Not u will get duplicate information.
Select mastertable.Provider,mastertable.col1,mastertable.col2,
mastertable.col3,...childtable.col1,Childtable.col2...
from mastertable LEFT OUTER JOIN childtable on mastertable.Provider = childtable.Provider
Thanks
Sreejith
September 21, 2006 at 4:58 pm
MSDB is used by automated process thats run on SQL. Its used by SQL Agent where as Mater is the master cataolg used by SQL to run the Server itelf.
You...
September 21, 2006 at 4:53 pm
Try this and expand it to suit ur needs:
Select PINTbl.PIN,ADDR1.VALUE,ADDR2.VALUE from
(Select PIN from sourceDB.dbo.sourcetbl group by PIN) PINTbl
LEFT OUTER JOIN sourceDB.dbo.sourcetbl ADDR1 On PINTbl.PIN = ADDR1.PIN
LEFT OUTER JOIN sourceDB.dbo.sourcetbl ADDR2...
September 21, 2006 at 2:04 pm
Or this one:
declare @dt_Date Datetime,
@s_SourceTableName varchar(255),
@s_Sql nvarchar(4000)
set @dt_Date ='08/28/2006'
set @s_SourceTableName ='MyTable'
set @s_Sql =N'If exists (Select 1 from sysobjects where name =''' + @s_SourceTableName + '_' + Convert(Char(8),@dt_Date,112) + ''')...
September 21, 2006 at 1:46 pm
Try this:
declare @dt_Date Datetime,
@s_SourceTableName varchar(255),
@s_Sql nvarchar(4000),
@s_ColName varchar(255),
@i_Collength int,
@s_ColType varchar(255),
@i_Precision int,
@i_Scale int
set @dt_Date ='08/28/2006'
set @s_SourceTableName ='MyTable'
set @s_Sql =N'If exists (Select 1 from sysobjects where name =''' + @s_SourceTableName + '_'...
September 21, 2006 at 1:43 pm
Anita,
Why haven't u considered SQL Maintenance plan. There u can specify the number of days that u want to retain the backup.
Thanks
Sreejith
September 21, 2006 at 11:44 am
If you want to updated the records that have Null in ad_num then modify your query to exclude Not Null ad Column.
But by modifying your query slightly will give the...
September 21, 2006 at 11:41 am
You can use Enterprise Manager.
Select the Database->View->Taskpad. Then on the Right plane Click on Table Info
You can use sp_spaceused procedure to do one object at a time.
Thanks
Sreejith
September 21, 2006 at 9:58 am
Just to add to Ninja's response if u do select * then the columns that you join will appear more than once(once for every table that has those columns).
Thanks
Sreejith
September 21, 2006 at 9:51 am
Please look at instead of trigger. That might be what u want.
Thanks
sreejith
September 21, 2006 at 8:00 am
Vijay,
I ran the query that Jeff send and it works. You need to change the database Name after "FROM" CLAUSE and the SErverName after "-S". Jeff's code assumes that your...
September 20, 2006 at 10:25 pm
If you want to use it against the column in the table try this:
select DATENAME(mm,ColumnName)
Thanks
Sreejith
September 20, 2006 at 3:33 pm
Viewing 15 posts - 106 through 120 (of 315 total)