Click here to Skip to main content
16,012,759 members
Home / Discussions / Database
   

Database

 
AnswerRe: how to set the id manually while inserting the record? Pin
Eric Dahlvang18-Aug-06 11:18
Eric Dahlvang18-Aug-06 11:18 
Questionselect statement not working for excel as a database [modified] Pin
playout17-Aug-06 23:17
playout17-Aug-06 23:17 
AnswerRe: select statement not working for excel as a database Pin
Michael Potter18-Aug-06 5:29
Michael Potter18-Aug-06 5:29 
GeneralRe: select statement not working for excel as a database Pin
playout20-Aug-06 3:53
playout20-Aug-06 3:53 
Questionjoin 2 tables from 2 different databases Pin
playout17-Aug-06 23:09
playout17-Aug-06 23:09 
AnswerRe: join 2 tables from 2 different databases Pin
Stephen McGuire18-Aug-06 4:25
Stephen McGuire18-Aug-06 4:25 
AnswerRe: join 2 tables from 2 different databases Pin
S Douglas19-Aug-06 20:14
professionalS Douglas19-Aug-06 20:14 
QuestionDTS Package Parameter Passing Pin
dioey17-Aug-06 22:33
dioey17-Aug-06 22:33 
I've created a Stored Procedure called GetFlashExportValues. See Below:

CREATE PROCEDURE [dbo].[GetFlashExportValues]

@WhereClause varchar(1000) = NULL

AS

DECLARE @sql varchar(5000)
SET @sql=
'SELECT DISTINCT
mr.GroupCode , md.PC, mi.RootControlName, md.YearNumber, fc.FISCAL_PERIOD_NUMBER , mm.ServiceType, md.StringMetricValue, md.NumericMetricValue

FROM
MetricIdents mi INNER JOIN MetricData md ON mi.RowKey=md.MetricIdentKey
INNER JOIN MetricMappings mm ON mi.RowKey=mm.MetricIdentKey
INNER JOIN MetricReportTypes mr ON mr.ReportTypeID=mm.ReportTypeID
INNER JOIN (SELECT DISTINCT FISCAL_PERIOD_MONTH, FISCAL_PERIOD_NUMBER from fiscalcalendar
WHERE SUBSTRING(FISCAL_PERIOD_NAME,1,3) = SUBSTRING(FISCAL_PERIOD_MONTH,1,3)) fc
ON md.MonthText=fc.FISCAL_PERIOD_MONTH
WHERE
mm.ExportToWareHouse=1 AND mm.RollupExport=0'

IF @WhereClause != NULL
BEGIN
SET @sql = @sql + ' AND ' + @WhereClause
END

EXEC (@sql)
GO


I then created a package to call this stored procedure and wanted to pass a value for the parameter @WhereClause from the command line. I was thinking of using the /A of dtsrun..

e.g. 'DTSRun /S "(local)" /U "user" /P "pass" /N "FlashExportValues" /A "@WhereClause":"8"="""MonthText=''August'' AND YearNumber=2006"""'

but I wasn't sure how to map it to the @WhereClause I declared in the code of the stored procedure.. can somebody show me how please? I'd really appreciate it. Thanks a bunch! Smile | :)
QuestionGet table details in SQL 2005 Pin
Vipul Mehta17-Aug-06 18:29
Vipul Mehta17-Aug-06 18:29 
AnswerRe: Get table details in SQL 2005 Pin
Colin Angus Mackay17-Aug-06 20:08
Colin Angus Mackay17-Aug-06 20:08 
QuestionSqlDependency and which rows actually changed? Pin
rpheaney17-Aug-06 14:56
rpheaney17-Aug-06 14:56 
AnswerRe: SqlDependency and which rows actually changed? Pin
Stephen McGuire18-Aug-06 9:46
Stephen McGuire18-Aug-06 9:46 
QuestionQuestion on SQL syntax Pin
leckey17-Aug-06 8:17
leckey17-Aug-06 8:17 
AnswerRe: Question on SQL syntax Pin
Paul Conrad17-Aug-06 8:28
professionalPaul Conrad17-Aug-06 8:28 
GeneralRe: Question on SQL syntax Pin
leckey17-Aug-06 8:50
leckey17-Aug-06 8:50 
GeneralRe: Question on SQL syntax Pin
Ennis Ray Lynch, Jr.17-Aug-06 9:06
Ennis Ray Lynch, Jr.17-Aug-06 9:06 
GeneralRe: Question on SQL syntax [modified] Pin
Jon Sagara17-Aug-06 10:07
Jon Sagara17-Aug-06 10:07 
AnswerRe: Question on SQL syntax Pin
Eric Dahlvang17-Aug-06 8:34
Eric Dahlvang17-Aug-06 8:34 
AnswerRe: Question on SQL syntax Pin
unclepaul17-Aug-06 10:10
unclepaul17-Aug-06 10:10 
QuestionSQL Log File - how to remove / reduce Pin
BSRK17-Aug-06 3:12
BSRK17-Aug-06 3:12 
AnswerRe: SQL Log File - how to remove / reduce [modified] Pin
Stephen McGuire17-Aug-06 7:20
Stephen McGuire17-Aug-06 7:20 
AnswerRe: SQL Log File - how to remove / reduce Pin
Eric Dahlvang17-Aug-06 8:13
Eric Dahlvang17-Aug-06 8:13 
QuestionHow do I get an SQL query to return 2 values as 1? Pin
Red_Wizard_Shot_The_Food17-Aug-06 1:58
Red_Wizard_Shot_The_Food17-Aug-06 1:58 
AnswerRe: How do I get an SQL query to return 2 values as 1? Pin
i.j.russell17-Aug-06 2:39
i.j.russell17-Aug-06 2:39 
QuestionSome Interview Question , Dammmmmmmm Urgent Plz Pin
VishalSharmaDev17-Aug-06 0:02
VishalSharmaDev17-Aug-06 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.