Hi Julie,
Could you give me the sample data?
Then I can give you the answer quickly.
Thanks
Koichi
http://aboutabi.blogspot.com/ (SQLServer & Cognos Tips)
Hi,
This is the steps which I recommend.
-Configure database size to avoid auto expansion
-Create flat file of target data
-Insert flat file with BULK INSERT
Koichi
http://aboutabi.blogspot.com/ (SQLServer & Cognos Tips)
Hi,
You can get only date part by this SQL.
SELECT CONVERT(DATETIME, FLOOR(CONVERT(FLOAT, GETDATE())))
SELECT CONVERT(DATETIME, FLOOR(CONVERT(FLOAT, CAST('4/8/2008 12:03:14 AM' AS DATETIME))))
Koichi
http://aboutabi.blogspot.com/ (SQLServer & Cognos Tips)
Hi,
If LoanNumber has no null,it will work.
But if yes, SQL should be modified like this.
SELECT
CM.ControlID
,CM.LoanNumber
FROM
tblControlMaster CM
WHERE
ISNULL(CM.LoanNumber'')=''
ORDER BY
CM.ControlId
Koichi
http://aboutabi.blogspot.com/ (SQLServer & Cognos Tips)
Hi baran121,
You can get the result with this.
select
CONVERT(DATETIME, FLOOR(CONVERT(FLOAT, sdate))))
from
ab_date_def
where
sdate between '2008-01-01' and '2008-03-30'
order by
sdate
By the way,
You need to take care the condition too when you use the datetime.
This SQL...
Just for your information,
CSE is famous SQL query tool in Japan.
It is free software and very small package.
You can connect SQLServer via ODBC,Oracle,MySQL and so on.
CSE web site:
http://www.hi-ho.ne.jp/tsumiki/
Screen shot:
http://www.hi-ho.ne.jp/tsumiki/image_odbc.html
However this tool...
How about this?
Test data creation:
CREATE TABLE [dbo].[TEST1](
[Loc] [varchar](50) NULL,
[LocOrder] [int] NULL,
[IsLocation] [char](1) NULL
) ON [PRIMARY]
GO
INSERT INTO [TEST1] ([Loc],[LocOrder],[IsLocation]) VALUES ('22XXX','19','N')
INSERT INTO [TEST1]...
I recommend you check sqlserver log if the database log file is required to be expanded before that.
If it is required, it is better to re-configure the database log file size to avoid auto expanse.
koichi
http://aboutabi.blogspot.com/
Is this what you want to get?
SELECT
LEFT(LOC,2) + 'xxx' AS SummaryGrp
,MAX(LocOrder) AS LocOrder
FROM
TEST1
GROUP BY
LEFT(LOC,2) + 'xxx'
koichi
http://aboutabi.blogspot.com/
I'm not understanding your environment either...
-Create DTS package to export .xls file.
-Execute DTSRun to run this package
(Or you can create SQL job to run DTS)
If I don't understand what you want to do, please give me more detail.
koichi
http://aboutabi.blogspot.com/
There might be better way.
But anyway I'll show you the sample with dynamic SQL.
CREATE TABLE [dbo].[TEST](
[TableName] VARCHAR(255) NOT NULL,
[NrOfRecords] [int] NOT NULL
) ON [PRIMARY]
DECLARE @TABLE_NAME VARCHAR(255)
DECLARE @SQL VARCHAR(8000)
DECLARE C_TABLE CURSOR...
You can get the result by this query.
SELECT
A.ReceiptNo
,A.ReceiptDate
,A.ItemNo
,A.WhseID
,A.QtyRecvd
,A.QtyOnHand
FROM
#Temp1 A
INNER JOIN
(
SELECT
ReceiptNo
FROM
#Temp1 T1
WHERE
QtyOnHand = (SELECT...
It is possible both.
You can make users access the database directly.
You can prepare some datamart for uses.
Besides,
You can also make users access the report which was saved.
In this case, user does not access the database.
koichi
http://aboutabi.blogspot.com/
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.