• Delete OLD files from Table not having date or timestamp

    Hi, In DB2, Is it possible to get the insert date of a record in a table which doesn't have a seperate field for creation date or timestamp. I have a task where I have to delete record older than 1 year from a table, but the files doesn't have creation date field. So, like RRN does DB2 have any...

    RJES45 pointsBadges:
  • iSeries performance question

    Hello everybody, I'm trying to figure out the best way to count the number of records matching specified criteria in large PF. (The file has over 50 million records currently and with some purging we hope to bring it down to around 20 mil.) Anyway, I created the (SQL) view: create view largePF99 (...

    Dushan0 pointsBadges:
  • Inner join Solution

    i write the following Query to execute against the 1500000 in SQL Server 2000 DECLARE Cur_Prefix CURSOR FOR SELECT PrefixNo,PrefixLen,AfterPrefixLen FROM NoSeriesMaster_Prefix WHERE PrefixType='SMS' order by ID OPEN Cur_Prefix FETCH NEXT FROM Cur_Prefix INTO @PrefixNo,@PrefixLen,@AfterPrefixLen...

    Mxaxyogesh200230 pointsBadges:
  • Learning SQL

    I work in a large company in the automotive industry. We use the AS400 system corporately. I am just learning the query system. I have used a little of the iSeries and found that to be somewhat burdensome. My co-worker introduced me to the SQL language. What I am trying to do is using MS Access and...

    CompEng1,185 pointsBadges:
  • Can a command button macro run a make-table query with an auto-inputted parameter value?

    I want to run a make-table query with a parameter, using a command button click event on a form showing a single record. The parameter value needs to be inputted automatically using the value of a control in the current record of the same form. Can this be done with a macro event? If so, what does...

    Shdrc5 pointsBadges:
  • Equivolent HLOOKUP using SQL

    I am a beginner at SQL... I've come across a situation maybe someone can help me out. I have a table with the following structure: bkt_id am bkt_101 bkt_102 bkt_103 ... bkt_228 bkt_101 $100 $100 $20 $0 bkt_102 $50 $100 $20 $0 ... I want to compare am with the proper bkt_n value using the bkt_id...

    Pg385285 pointsBadges:
  • Help Refactoring SQL Query

    Dear Friend Below is my SQL Query select DISTINCT Auditdata.ID,ns.ProviderMaster_ID as CDRComment from Auditdata AuditData inner join AuditMaster am on am.ID=AuditData.AuditMaster_ID inner join HomeCircleMaster hcm on hcm.Ori_CircleMaster_ID=am.CircleMaster_ID and hcm.Ori_ServiceTypeMaster_ID=1 and...

    Mxaxyogesh200230 pointsBadges:
  • slow update Query(Primary Key)

    dear Friends when i run below query its take more than 10 minutes and still running.... update auditdata set TATCallType='12',TATCallUnit='1' from auditdata auditdata inner join Auditdata_sms_12 a_sns on auditdata.ID = a_sns.id auditdata is my original table in above table ID is primary key...

    Mxaxyogesh200230 pointsBadges:
  • Variables in T-SQL

    Hi, I want to know y does the following script run in SQL and not in T-SQL DECLARE @tblName varchar(30) SET @tblName = CONVERT(VARCHAR(20),GETDATE(),112) + 'Table' DECLARE @sql nvarchar(4000) SELECT @sql = 'CREATE TABLE "' + @tblName + '" ( ID VARCHAR(15), Name VARCHAR(15) )' EXEC(@sql) go it gives...

    Babar198220 pointsBadges:
  • Create a file with formulas on the iSeries and send to Excel.

    I can create a file in SQL that has formulas in it (i.e. '=A1*B1') and I can send them to my PC and open them in Excel. However, the formulas are showing instead of the results. If I click inside the cell and hit Enter, I get the value instead of the formula. BUT, I want this automated and don't...

    JeffWilson20 pointsBadges:
  • SQL embedded in RPGLE

    RPGLE program with five modules updating different set of files. Main module calls others each time a customer is being processed to change some specific detail in many files. There are many customers, so the modules are called many times (LR is set on only at the end of the whole process). Each...

    Mawc10 pointsBadges:
  • Why is SSIS xml variable in escaped format?

    In SSIS 2005 I use Execute SQL task to execute a proc that returns an xml resultset using these clauses (For XML Auto, Type within a For XML Path, Type). I return that resultset into string variable User::vSelectedClients. When I look at that variable within a breakpoint, I see all the doublequote...

    PaulDav5 pointsBadges:
  • Convert column from Number(9) to varchar2(3) in SQL

    What is the quickest way of achieving a total column datatype change from number(9) to varchar(3)? I have a few million rows in this table and SQL will run forever ....

    GeoMar5 pointsBadges:
  • Using SQL Connect Statement in SQLRPGLE

    I need to use the SQL CONNECT statement within a SQLRPGLE program to connect from one AS400 system to another. I need to get data from one file to another. Does anyone know how to do this? Can it be done within a program. I have no trouble when I do it on an SQL command line... I use CONNECT to...

    JCCPT5 pointsBadges:
  • 0 Row affected

    Could you please assist with the following? UPDATE dbo.[Elution_Report_Template] SET [Elutriation_Set_SqM] = dbo.[Elution_Report].[Elutriation_Set_SqM], [Elutriation_Pump_SqM] = dbo.[Elution_Report].[Elutriation_Pump_SqM],

    GPNel200675 pointsBadges:
  • Update DateStructure Field through SQL Query

    I wanna update a field in the table(which is a Data Structure) through Sql Query.. Can anyone help in this regard>>

    ragav5 pointsBadges:
  • Separator Line in ASP.NET Gridview

    Hello, I’m relatively new to ASP.NET and SQL, so what I’m asking maybe a simple question for some, but not for me. What I have is a Grid View that I’m trying to populate softball hitting statistics with. In it I’ve stacked statistics yearly statistics on top of career totals at the very...

    Rtodd5 pointsBadges:
  • top values and ranking

    What function do i use to give a field a ranking based on it's current sorted position in a query. I do not want to use a running sum on a report - it needs to be in the underlying query as I am going to have to join several together.

    PenguinWaddle5 pointsBadges:
  • SQL script to disable views after a demo period.

    Hi, I have a sql view that I created for someone on a test basis. I want to create something (stored procedure, trigger, etc) that will delete or disable this view after a 30 day trial period. I prefer to make the view unvisible even to the "sa" administrator so that the view can not be recreated...

    Katiekat5 pointsBadges:
  • Crystal Reports Duplicating Records

    Hi, I hope that someone can help me. We are currently replacing a system with a new version and as such we are building a new SQL DB. Although the two DBs store the same information they don't share a common layout. I have created a basic report to see if the record count for a certain select...

    Simonlevey5 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following