Viewing 15 posts - 91 through 105 (of 429 total)
/*I assume from your post Product_id 00001 in the second table is a typo instead of 0001 and you need '23-Nov-2005' in the resultset instead if '20-Nov-2005'. If you really...
December 6, 2005 at 12:39 pm
This will take a lot of time. I would create an Excel file in the webserver and send it to the browser.
Dim ii , con, rs, stroutput
con = server.createobject("adodb.connection")
rs...
December 6, 2005 at 12:24 pm
In Query Analyzer
Ctrl+Shift+F = Results to File
Menu Tools > Options > ResultsTab and Select Tab Delimited
Execute Your Query (SP)
File window will pop. Choose allfiles and name your file as...
December 6, 2005 at 12:07 pm
/*
Sergiy I would say every one knows what you say. But the confusion is how they interpret set ansii nulls off.
If ansii nuls is off When comapring the column...
December 5, 2005 at 3:12 pm
We have that problem Query Analyzer quits displaying after that value. Get the results to MSWord or EXcel from the database directly you will be able to see that.
Character is...
December 5, 2005 at 3:04 pm
INNER query will return multiple tables and is not possible to do such a join
CREATE THE UDF AS dbo.fnTransferEntries() such that it returns all transferId, and TransferAmount
without a parameter passed...
December 2, 2005 at 11:11 am
I tested executing several times I did not get the error. I am not sure now. May be some who had or has this problem can check into this.
I asked...
December 2, 2005 at 8:37 am
If a GO is used one blank line in the end is avoided. Check using results to grid. (Ctrl+D)
First this
/*use GO */
CREATE PROC TESTTEST
AS
SELECT 'TEST'
Go
sp_helptext TESTTEST
GO
DROP PROC TESTTEST
GO
Then...
December 2, 2005 at 7:54 am
My Mistake.
Friday Morning. I didn't realise @churn1 holds a table name. Sushila is right. Dynamic SQL is the answer.
Print statement works and select didn't misled me.
December 2, 2005 at 7:49 am
/*use GO */
GO
CREATE PROC TESTTEST
AS
SELECT 'TEST'
GO
sp_helptext TESTTEST
GO
DROP PROC TESTTEST
December 2, 2005 at 7:43 am
Do I miss something here Friday.
Wouldn't this work!
declare @churn varchar(20),@churn1 varchar(20)
set @churn='1005'
set @churn1='base'+@churn
print @churn1
--select * from @churn1
select @churn1 churn1
December 2, 2005 at 7:38 am
Select the column in question in Excel. Right click. Format cells. Choose the formar required.
SQL way to get the round
DECLARE @MyNum DECIMAL(10,5)
SET @MyNum = 12345.67899
SELECT @MyNum MyNum, CONVERT(DECIMAL(10,2), @MyNum) Converted,...
November 30, 2005 at 7:47 am
It would be possible to use NTID as WorkStationID when you use ADO to connect to the databse. I don't know about the others.
If the connection string is blank...
November 29, 2005 at 2:40 pm
Sorry I missed this post.
Workstation ID is the property of SQLConnection's connection string property.
If you pass the Workstation ID as your NTID then you can get the NTUser...
November 28, 2005 at 6:27 am
SET NOCOUNT ON
DECLARE @TempTable TABLE
(
patient varchar(10),
datebegin datetime,
dateend datetime
)
INSERT @TempTable
SELECT 'A', '1/1/05', '1/31/05' UNION
SELECT 'A', '4/1/05', '6/30/05' UNION
SELECT 'B', '2/1/05', '2/28/05' UNION
SELECT 'B', '3/1/05', '5/27/05' UNION
SELECT 'C', '5/2/05', '7/1/05' UNION
SELECT 'C', '7/2/05', '8/15/05'
SELECT patient, MIN(datebegin) datebegin,...
November 28, 2005 at 6:13 am
Viewing 15 posts - 91 through 105 (of 429 total)