• DB2 SQL select x number of rows per grouping

    How do I select only x number of rows per group in a db2 sql query? For instance, I'm group records by company and division. I only want to retrieve 5 records for each division within each company. If I use "Fetch first 5 rows only", it limits the overall query results to 5 records. Is thera a way...

    MichaelPatt0 pointsBadges:
  • SqlDumpExceptionHandler Error Message In MS SQL Server 7.0

    I am trying to restore a database in MS SQL Server 7.0. I keep getting the following error message. Backup or restore operation terminating abnormally. SqlDumpExceptionHandler: Process 8 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. I...

    Bkr0963c0 pointsBadges:
  • select SQL where data contains a hex value

    I have a file/table with 3 fields. The first field is a batch #, the second field is a record #, and the third field contains data. I need to select from the third field where it contains a hex value of X'0A' which doesn't relate to any character on the keyboard. Can someone show me how to do a...

    Carolh0 pointsBadges:
  • Difference Between “NOT IN” and “NOT EXISTS”

    Whats the difference between "NOT IN" and "NOT EXISTS" and which is better to use in SQL Queries for the performance aspects.

    Goelneeraj0 pointsBadges:
  • Extracting SAP R3 data in custom DW

    We are in the process of building a custom data warehouse (SQL with Business Objects Universe for reporting) - this is continuing the existing company strategy. The difference this time is that we need to extract data from SAP R3 to feed into the warehouse. What I'm not sure about is the best...

    Jroth730 pointsBadges:
  • SQL multiple distinct

    I have a program in SQL plus that is currently duplicating. I beleive i need to add a distinct. I currently have a distinct at the beginning of my select, but i need to another distinct somewhere in the middle. how do i do multiple distincts. I.E; select distinct 'ver12345', a.ssn_id, b.ssn_id, (I...

    Alex88090 pointsBadges:
  • ASE Trigger

    select @command = 'INSERT INTO tablename SELECT * FROM inserted' execute(@command) Hi all, i am building a dynamic SQL Command inside a trigger, i received an error message that table inserted is not found. (i am using ASE 12.5.1) thanks,

    Ghassanhaith0 pointsBadges:
  • Selecting SQL Column Names for use in a query

    How do I select the column names from a DB? I'm looking to do something like: SELECT * FROM db1 WHERE column_name like 'Z%' AND column_value = 'grant' If you could educate me on this I would appreciate it. Thanks for you time, Steve Graham Beginner

    Sgraham0 pointsBadges:
  • Invoking stored procedures returning result set from COBOL/RPG pgm

    I am currently trying to invoke an SQL procedure (Language SQL) that returns a result set (open cursor)from within a COBOL or RPG program, all residing on an AS/400. However, I cannot find the command that will associate the result set with any mnemonic that I can issue FETCH/CLOSE commands...

    BAGray0 pointsBadges:
  • What is the best practice when using vb6/ado/ms sql server stored procedures to retrieve updatable recordsets that can be filtered and sorted?

    I am having trouble implementing ado filter and sort on a recordset returned from a stored procedure. The following 2 lines are the same for both adUseClient and adUseServer. prsCommissions.CursorType = adOpenStatic prsCommissions.LockType = adLockOptimistic I found that if I use a client side...

    CallCTC10 pointsBadges:
  • Generating Random numbers in SQL

    I HAVE a problem How can i use command or functios to combine numbers For example If k = 6 and n = 3 The command should return (as B1,B2,B3) 1,2,3 1,2,4 1,3,4 1,3,5 1,3,6 1,4,5 1,4,6 1,5,6 2,3,4 2,3,5 2,3,6 2,4,5 2,4,6 2,5,6 3,4,5 3,4,6 3,5,6 4,5,6 For all n of k numbers Thanks

    Ajibola110 pointsBadges:
  • COMPARING CELLS IN SQL

    My database KoloID FIRST SECOND THIRD FORTH 01 4 8 6 10 02 10 8 12 9 03 4 5 6 9 04 3 6 6 9 ETC How can I use select to return P,P1, P2,... P10 ETC P = relationship between values of the last koloId(04) and koloID(3) = Number of cell with the sam values = 2 (6 and 9) P1 = relationship between values...

    Ajibola110 pointsBadges:
  • COUNT IN DATABASE

    My database NumberId jb1 jb2 jb3 jb4 jb5 jb6 01 1 2 0 5 7 9 02 2 2 2 1 0 9 03 0 2 1 6 6 7 select( cast(case when jb1 = 1 then '1' else '0' end as int)+ cast(case when jb2 = 1 then '1' else '0' end as int)+ cast(case when jb3 = 1 then '1' else '0' end as int)+ cast(case when jb4 = 1 then '1' else...

    Ajibola110 pointsBadges:
  • Report second try

    the code below is currently pulling a report in sql. I am trying to move that sql to visual basic to be a downloadable report. That is problem number one. Problem number 2; Currently my program goes in and grabs employee and dependents depending on the plan, so if they belong to a plan it will...

    Alex88090 pointsBadges:
  • Confused report

    the code below is currently pulling a report in sql. I am trying to move that sql to visual basic to be a downloadable report. That is problem number one. Problem number 2; Currently my program goes in and grabs employee and dependents depending on the plan, so if they belong to a plan it will...

    Alex88090 pointsBadges:
  • sql return and social

    brief question, i have to create a carrier return for a specific line in a file is this syntax correct; select a || b || c ||; also i have 2 sets of social security number which i am pulling from a table. both socials are brought in as lpad(ssn_id, 11, '00'), lpad(ssn2_id, 11, '00') now the first...

    Alex88090 pointsBadges:
  • DB2 function

    Hi! I am using following expression in report filter. It gives parsing error. Presentation Layer].[Recent Claims].[Specific Service Date YMD] BETWEEN (?Parameter1?) AND ((?Parameter1?) - 200 DAYS). The database is DB2. Please let me know what is wrong? Thanks a lot,

    Meenac0 pointsBadges:
  • Disconnected from SQL Server

    I'm currently making an attendance system whereas all transactions (scan in and out) are stored on an SQL Server. My problem is, how can I keep all transactions going in case the server is down? Do I need to incorporate it in my VB code?

    Trojanz0 pointsBadges:
  • Help with building an archive

    Hi! I'm trying to build an archive of files (documents, media, etc.) and need some help with the table structure and to make the archive searchable. This is what I have: File FileID FileName FilePages FileDate FileAuthor FileDescription Classification ? essay, article, joke, quote, etc. Types...

    Gfrankel0 pointsBadges:
  • Transfer specific “EXCEL CELLS” to specific AS/400 DB2 fields

    I have an EXCEL spreadsheet that Users enter specific information and the sheet performs numerous calculations. I need to pull information from various cells on the spreadsheet and load to an AS/400 file. There will be numerous spreadsheets created during the day. I would like to load each...

    Lstephan0 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