Viewing 15 posts - 496 through 510 (of 569 total)
Hi,
use the distinct in the source table
ARUN SAS
April 13, 2009 at 4:21 am
krayknot (4/13/2009)
u4umang2001 (4/13/2009)
I have to pass the database name dynamically.
Means This script should be executed...
April 13, 2009 at 3:52 am
Hi,
try this
CREATE PROCEDURE [dbo].[USP_ExecuteStructureScript]
@DabaseName NVarchar(10)
AS
BEGIN
Declare @QueryStr NVarchar(100),
@QueryStr1 NVarchar(1000)
set @QueryStr= N'USE ' + @DabaseName+ CHAR(13)
set @QueryStr1 = N'create table ABCDE('+
'COL1 int,'+
'COL2 int)'
exec (@QueryStr + @QueryStr1 )
END
----
exec USP_ExecuteStructureScript 'TEST'
ARUN SAS
April 13, 2009 at 2:11 am
Hi,
Use the DEFAULT options, while the creating of the tables,
CREATE TABLE #ABC
(
COL1 smallint,
COL2 smallint DEFAULT USER_ID(), --Preferred default definition
COL3 char(3) DEFAULT...
April 10, 2009 at 9:29 pm
Hi Kailash,
In 2000,
Use the information_schema.tables to get the table list with in DB,
For all DB
Try this
DECLARE ALLDB CURSOR FOR
SELECT name FROM master.dbo.sysdatabases WHERE dbid > 4
OPEN ALLDB
DECLARE @Stmt NVARCHAR(100)
DECLARE @DB...
April 10, 2009 at 5:14 am
Hi,
Just put the normal union
Select * from dbo.fnGetDatesforDday(‘’,’’,’’)
Union all
Select * from dbo.fnGetDatesforAday(‘’,’’,’’)
ARUN SAS
April 10, 2009 at 3:38 am
Hi,
Refer Greg answer in
Home » SQL Server 7,2000 » SQL Server Newbies » Sending mail through SQL server 2000 with ASP...
LINK http://www.sqlservercentral.com/Forums/Topic421947-169-1.aspx
ARUN SAS
🙂
April 10, 2009 at 3:19 am
Hi,
Fine with other statement,
Actually in OP the order by based on the last No of the field
Not the length of the field
declare @abc table
(
name1 varchar(10)
)
insert into @abc values ('NAME1')
insert into...
April 9, 2009 at 11:46 pm
Hi Manohar,
Try this
declare @abc table
(
name1 varchar(10)
)
insert into @abc values ('NAME1')
insert into @abc values ('NAME10')
insert into @abc values ('NAME11')
insert into @abc values ('NAME111')
insert into @abc values ('NAME2')
insert into @abc values ('NAME5')
insert...
April 9, 2009 at 2:08 am
Hi,
Use the
SET PARSEONLY (ON | OFF) to check
ARUN SAS
🙂
April 8, 2009 at 4:23 am
Hi,
try this
declare @abc table (
PID int,
date1 datetime,
BuyFee int,
SaleFee int
)
insert into @abc values(1,'2009-04-08',101,505)
insert into @abc values(1,'2009-04-07',99,500)
insert into @abc values(2,'2009-04-05',101,505)
insert into @abc values(2,'2009-04-04',99,499)
insert into @abc values(2,'2009-04-03',100,500)
insert into @abc values(2,'2009-04-03',100,500)
select a.pid,
(select top 1...
April 8, 2009 at 3:20 am
Hi saravanan,
In Sysprocesses the col DBID shows the database id and from sysdatabases you get the database name against this DBID
ARUN SAS
🙂
April 8, 2009 at 2:58 am
Hi abb,
One of the article by Jeff Moden
on Solving the "Running Total" & "Ordinal Rank" Problems in SS 2k/2k5.
link http://www.sqlservercentral.com/articles/Advanced+Querying/61716/
ARUN SAS
April 8, 2009 at 2:31 am
Hi,
Before entering TCP/IP port number in the connection,
Call the ip in the run cmd, once the run cmd calls the ip successfully, and then go to system DSN
ARUN SAS
🙂
April 6, 2009 at 5:10 am
Viewing 15 posts - 496 through 510 (of 569 total)