SQL Statements Questions and Answers

Recent IT Questions

1 - 20 of 38
<<PREVIOUS 1|2 NEXT>>

Using sql code to read a filename

Can you write sql query that will read pdf filename from a dir and then match the filename to a data element in a table having the same name? For instance, the filename is 12345.pdf where 12345 is actually an invoice number. Can the query read the filename and then locate the same invoice number...

View Answer   |  Jul 11 2009  6:04 AM GMT
SQL Query, SQL, SQL statements
asked by Teedee

  5 pts.

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...

View Answer   |  Jun 24 2009  9:00 PM GMT
SQL, RPGLE, CLP
asked by JCCPT

  5 pts.

Finding nth most recent action with SQL

I am trying to determine the date on which a certain number of things have happened cumulatively, eg I have a varying number of buyers each month. I want to find out on what date of that month, those buyers make their 3rd purchase. My SQL doesn't seem to support TOP or ROWCOUNT so I would...

View Answer   |  May 18 2009  10:11 PM GMT
SQL query optimization, COUNT statement, SUM statement
asked by Munona99

  5 pts.

Group header section in VB Data Report

How to create Datareport in vb through Sql statement in dataenviroment having Group hader section

Answer Question   |  May 17 2009  2:59 PM GMT
VB Data Report, DataEnvironment, SQL statements
asked by Pnr526

  5 pts.

SQL Server 2005

CAN ANYBODY HELP ME "HOW TO ASSIGN A SQL-STATEMENT IN A VARIABLE". FOR EXAMPLE : TO ASSIGN A STRING IN A VARIABLE, WE DO LIKE THIS: DECLARE @A AS VARCHAR(20) SET @A='HAI' PRINT @A OUTPUT: HAI SIMILARLY HOW TO ASSIGN A SQL-STATEMENT IN A VARIABLE.

View Answer   |  May 8 2009  6:37 AM GMT
SQL Server 2005, SQL statements, SQL variables
asked by Narendar

  30 pts.

Different Results on Insert Select than Select

I'm struggling, along with others, where I'm getting different results when doing an Insert select verses just the select. Lots of joins to get data from various tables. Only want the first record from the uniqfield table so created the tmp_uniqfieldid table with that item fielded, creation_ts ...

asked by Bem

  35 pts.

I want to read a pf and build a corresponding SQL statement and save the statemnet in text file.

how can i read pf ?as pf is colomn speciffic have to read pf like it will have feilds and some constraint, key, record. how can i build a corresponding SQL statement ? i m new in AS/400 but i have to submit this utility to my manager this thursday.. can anybody help me in providing some code for...

View Answer   |  Apr 26 2009  11:10 AM GMT
RPGLE, SQL statements, SQL
asked by Ddaswani

  30 pts.

SEQUEL ViewPoint

We are using SEQUEL View point to execute some queries. We can achieve this using AS400 SQL statments itself. What is advantage of using SEQUEL View point?

View Answer   |  Apr 13 2009  12:05 AM GMT
SEQUEL ViewPoint, AS/400 SQL, AS/400 SQL View
asked by Rajeshece

  440 pts.

How do I write a SQL statement to get all data from a table called subscrib?

How do I write a SQL statement to get all data from a table called subscrib?

View Answer   |  Apr 5 2009  10:16 PM GMT
SQL statements, SELECT statement, SQL queries
asked by Thechriseco

  5 pts.

Can you force a user input in a SQL statement, then have the statement continue running

Hi, Can one in an sql statement , when run in sql, force a user input to be entered and when entered, the sql continues to completing

View Answer   |  Mar 25 2009  11:55 AM GMT
SQL statements, SQL, SQL Server development
asked by Bugsy

  5 pts.

SQL query for same phone number

I have 3 columns phone number, users and locations I would like to see only the name and phone numbers of the users that are calling the same phone number Not quite sure how to represent this in a SQL Statement Thank you very much for your assistance

View Answer   |  Mar 8 2009  1:07 PM GMT
SQL, SQL queries, SQL Query
asked by Iamnfo

  5 pts.

tell me why I'm getting the message "The multi-part identifier "134062-DB1.netFORUMSTaging.dbo.Individual.individualKey" could not be bound"

I'm trying to process this SQL statement select cxa_cst_key, cxa_key, cxa_key from [134062-DB1].netFORUMSTaging.dbo.Individual LEFT JOIN dbo.co_customer_x_address ON [134062-DB1].netFORUMSTaging.dbo.Individual.individualKey = co_customer_x_address.cxa_cst_key where delete_flag = 0 and source not...

View Answer   |  Mar 6 2009  3:36 PM GMT
SQL statements, SQL Statement Syntax Errors, SQL
asked by Calvin60616

  5 pts.

Alternative for LEFT OUTER JOIN

HI all, select code.batchno, detailA.batchfee , detailB.batchfee from Code code left outer join Detail detailA on (detailA.id= code.id) left outer join Detail detailB (detailB.id= code.id) where code.category = categoryA order by code.id I want an alternative for left outer join.. I cannot use...

asked by 4knowledgexchng

  20 pts.

PK allows null values in progress DB does this reduce performance of sql statements?

Hello Primary Key allows null values in progress DataBase, does this reduce performance of sql statements??

View Answer   |  Feb 27 2009  1:50 PM GMT
SQL statements, NULL values in PK, SQL performance
asked by Blom

  5 pts.

SQL Developer Views and Programs

I created a view to simplify the cursor within the package body. The SQL statement being used works as expected in SQL Developer but the program returns zero records. The program worked correctly before replacing one of the tables with this view. Not sure why all of a sudden the sql statement isn't...

View Answer   |  Feb 10 2009  2:44 PM GMT
SQL development, SQL Developer, AS/400 SQL View
asked by Petpat123

  40 pts.

SQL Statement to update a table with set conditions on another table

Hi, Can anyone help me? I am trying to update a second table with criteria in its own and another table being set. This is what I have come up with and various others. It should give an idea of what I am trying to do. UPDATE Clientextradetails LEFT JOIN Clients ON Clients.ClientRef =...

View Answer   |  Jan 29 2009  3:21 PM GMT
SQL statements, SQL
asked by Eddata

  5 pts.

Query performance and tuning

Hi, I wanted know as to what I can do to my query so that it improves in performance.RIght now it it taking 3-4 hrs because of the large no of records in the DB.If i remove the group by and order by clause for the same no of records it is fast but when it does sorting it hangs.But I need to do the...

View Answer   |  Dec 21 2008  9:34 AM GMT
SQL, SQL performance, SQL statements
asked by Mingley

  5 pts.

Joining Tables in SQL Server

What is the difference between Outerjoin and Left outerjoin.

View Answer   |  Dec 19 2008  10:23 AM GMT
SQL Server development, JOIN statement, SQL statements
asked by Bijaybehera29

  15 pts.

Using the SQL IN clause in SQLRPGLE

Can I use a variable with the IN clause in an iSeries SQLRPGLE program? Can I use: WHERE CUSTID IN(:CUSTNUMS) Instead of: WHERE CUSTID IN(145,1600,352)

View Answer   |  Dec 18 2008  10:09 PM GMT
iSeries, iSeries development, SQLRPGLE
asked by PWMASI

  5 pts.

SQL Column Headings

When I run an SQL statement the column headings I see are the field names. When any of the other members of our team run the same statement they get the field descriptions as column headings. I have compared user profiles and there are no differences. Is there some other place that this setting is...

View Answer   |  Dec 18 2008  4:44 PM GMT
SQL, SQL statements, SQL Column Headings
asked by Deniseg

  20 pts.

1 - 20 of 38
<<PREVIOUS 1|2 NEXT>>