Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. rodeomount

    Executing a query held in varchar variable

    I have a variable called @FilterCmd wher I am creating a query based on many different factors. The query is a select query. I tried running the query like so: exec @FilterCmd But I get an error. How can execute this?
  2. rodeomount

    IIF in SQL Server

    How can I translate the following to its equivalent in TSQL? IIF(CONVERT(age, int) < 18 AND ltrim(rtrim(age)) <> '', CONVERT(1, SQL_BIT), CONVERT(0, SQL_BIT)) AS IsJuvenile
  3. rodeomount

    Adding int values from database in C#

    I am writing an active report where I am trying to add 2 values from the database in the following way: this.txtNumAddedTotal.Text = (this.Fields["intNewBPVRegistrations"].Value() + this.Fields["intNewBPVRegistrations"].Value()); But I'm getting an error stating...
  4. rodeomount

    Grouping Active Report

    I have been asked to create a report with the following look and feel grouped by type. How can I accomplish this grouping using Active reports? Also, if anyone knows where I can find a tutorial on Active reports I'd appreciate it. Number Type Count1 Count2 2425 1...
  5. rodeomount

    Comparing date from SQL Serv with System.Date.Now

    I keep getting an error that states: "Operator '>' cannot be applied to operands of type 'string' and 'string'" when using the following. I'm trying to compare to see if the dtExpire date is greater than todays date. How can I do this in C#? if(this.Fields["dtCertExpire"].Value.ToString() >...
  6. rodeomount

    Select Distinct but want lower ID

    I made a mistake. I meant to post the following query: Select intTblID from tblMyTable and Select DISTINCT intTblID from tblMyTable. Will the following work as well? Select intTblID from tblMyTable Order By dtPrinted
  7. rodeomount

    Select Distinct but want lower ID

    I have the following query which will return 2 records (Each has different dtPrinted values but the same intTblID values): Select intTblID * from tblMyTable How can I modify the query below to return the record with the oldest dtPrinted value Select DISTINCT intTblID * from tblMyTable
  8. rodeomount

    Query Issue

    I'm trying to create a query I can use inside a DTS by dynamically setting the Query inside a dynamic properties task. Below is my select statement for creating the Select statement. I keep getting an error. It's mandatory that I use the query to load the values into the "IN" clause because...
  9. rodeomount

    inserting an image into SQL Server error

    Thanks, that did the trick!
  10. rodeomount

    Using the &quot;IN&quot; filter in Select statement for source

    does 2000+ include SQL Server 2000? If so could you explain how to go about doing it? Thanks
  11. rodeomount

    Using the &quot;IN&quot; filter in Select statement for source

    Does anyone know if it's possible to pass in a query as a global parameter? I tried adding a Dynamic Properties Task to set the global variable to the values I wanted posted inside the "IN" filter of the query but it never set the entire string to the value of the global variable.
  12. rodeomount

    Using the &quot;IN&quot; filter in Select statement for source

    I need to use a parameter to pass in one string with multiple values for use inside the "IN" filter of a select statement. Example: parameter is named myParam I want to set myParam value to 'A2fg','A2fh','A2fi','A2fj' And use it in the select statement inside the source query of a dts package...
  13. rodeomount

    Call DTS from Sproc and pass in a global variable

    I ended up clicking start/Run and pasted the following in "dtsrunui" and clicked OK. First select the server where your DTS packages is. This option is in the lower half, it says "Server". Then select the package name from the top button with the ellipse. Then click on Advanced. Type in the name...
  14. rodeomount

    Call DTS from Sproc and pass in a global variable

    I have a DTS package where I'm using a Global Variable in the where clause of the query for retrieving a record from the source. How can I call this from a sproc and pass in a value for the global variable?
  15. rodeomount

    Importing Subset of Records From Oracle.

    Unfortunately I don't have a timstamp nor a primary key to keep up with which fields I have copied over.
  16. rodeomount

    Importing Subset of Records From Oracle.

    Is there a way to use parellel processing to accomplish this? I have a linked server and running the following query times out: Update dbo.TPSVCREQ SET dbo.TPSVCREQ.ResultsFlag = 1, --dbo.TPSVCREQ.ClientID = V.ClientID, --dbo.TPSVCREQ.SolutionID = V.SolutionID, dbo.TPSVCREQ.ResendFlag =...
  17. rodeomount

    Calling SP on another server

    You can try creating a DTS package if you are using SQL Server 2000 or SSIS in SQL Server 2005. Or you could create a linked server. The DTS and SSIS has better performance I believe.
  18. rodeomount

    Need Help Converting Access Query to TSQL

    How does "WorkDaysDiff" work? I'm assuming the following: WorkDaysDiff(A,B) Is equivalent to A - B
  19. rodeomount

    Need Help Converting Access Query to TSQL

    I need to convert the following Access query to TSQL. The only problem is that I don't have any experience with a query like this. Any help is deeply appreciated. (((IIf([tbl0000Tracking]![AvailableScanDate] Is Not Null,CStr(Format([tbl0000Tracking]![AvailableScanDate],"mm/dd/yyyy")),Null))...

Part and Inventory Search

Back
Top