SQL Questions and Answers

Recent IT Questions

181 - 200 of 830

CRViewer Logon Failed error within Visual Basic 6

I developed and tested a VB6 program that runs CR Viewer accessing with RDC Crystal Reports 11 reports from a folder on a remote server and uses data and queries from SQL2000 on the same server. All operating systems use MS XP. My problem is that the program works on my desktop and a few others,...

Answer Question   |  Mar 27 2009  11:40 AM GMT
Visual Basic 6, CRViewer, Crystal Reports XI
asked by Lamm

  10 pts.

STRDFU utility

I would like to get the pre & Post image of changes when I update data using SQL. Currently I am getting this facility when I update thru STRDFU utility.

View Answer   |  Mar 27 2009  10:30 AM GMT
STRDFU, Start DFU, Data File Utility
asked by Iamsubbarao

  55 pts.

Embedded SQL in an RPG FREE program

I am developing an on-line screen program, where the user can select a view of the data from a list of "views". This is my first crack at embedded SQL, Basically i issue the Prepare, declar the c1 scroll cursor, and then open c1, and then do the fetch. At this point I am loading the subfile. ...

View Answer   |  Mar 25 2009  5:17 PM GMT
Embedded SQL, RPGILE, SQL
asked by Merts

  25 pts.

Subtracting two numbers

Hi Using SQL, how can I subtract two values for the same parameter received at different times say 1am and 1:30am so sql to do value(1:30am)-value(1am)=? Regards

View Answer   |  Mar 25 2009  3:38 PM GMT
SQL, SQL Query, SQL macros
asked by Shajju

  10 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 Data Types Conversions

I'm new to SQL. Anyone have a good example or link of converting from one data type to another. We are converting from an iSeries (AS400) to SQL-based ERP solution and we are having some difficulty with how to get data from numeric fields to date or "numeric" data types. Our iSeries ERP...

View Answer   |  Mar 24 2009  2:41 PM GMT
SQL Data Types, ERP, SQL
asked by MikeBaker

  5 pts.

SQL - Pass the result of the first query as the second query select column name

I want to pass the result of a sql query as the column name in another query eg. (note there will be a single result for the first query) SELECT CASE WHEN fld_type1 = 'A' THEN 'VAL_ALPHA1' WHEN fld_type1 = 'D' THEN 'VAL_DATE1' ELSE 'VAL_NUM1' END AS FIELDNAME FROM TABLE1 I want the result of the...

View Answer   |  Mar 24 2009  11:07 AM GMT
Dynamic SQL, SQL, SELECT statement
asked by Chris123

  25 pts.

How to run SQL script with parameters in CL

I have to call an sql script with parameters from an existing cl program that runs daily (in batch). If I call it from the cl program, it is giving me this error "Pointer not set for referenced location referenced".

View Answer   |  Mar 22 2009  11:48 PM GMT
SQL, SQL/400, CL
asked by Ara

  5 pts.

SQL query to list databases that have a given table

Hi all I need your help for creating some SQL query that returns the names of all databases that have a given table name. Ex. I'd like to run this query against the master database and search for all databases that have a table called "customers". Is it possible to do this, if yes how? Thanks in...

View Answer   |  Mar 20 2009  5:38 AM GMT
SQL queries, SQL, Database programming
asked by Alessandro.panzetta

  9615 pts.

Reading an unknown file in RPG

Hi All, I am working on a DBU like utility which will provide a maintainance screen for each file. I need to read the file in an rpg program but i dont know the program name till runtime. I can't declare the file in F specs as i dont know the file name. SQL is very bothering and is very heavy for...

View Answer   |  Mar 19 2009  12:27 AM GMT
RPG ILE, SQL, RPG
asked by Detuli

  15 pts.

pass variable from Foreach loop to stored Procedure parameters

in control flow I run "Execute SQL Task" to retrive array variables like State Code ('AR', 'WI', .. et). Then I run ForeEach Loop Container and pass global variable gv_StateCode into Data Flow, where I run stored proc with one parameter in "OLE DB Source" (like exec sp_StProcname ?) and i assign...

Answer Question   |  Mar 18 2009  8:51 PM GMT
SQL, SQL variables, SQL Parameters
asked by IG1944

  10 pts.

SQL to insert comma-delimited string value to table column

I have string like '1,2,3,45,6,7,8' I want to insert each comma separated value in a table column...my output look like this: COLUMN 1 2 3 45 6 7 8

View Answer   |  Mar 18 2009  6:38 AM GMT
SQL Server Query, Comma-delimited, SQL queries
asked by 23121983

  5 pts.

table row values for column headers

Hi. I have two tables in a simple database: Prices ID (int, identity, PK) Year (smallint - year of value) Quarter (smallint - year quarter 1-4) Area (smallint - FK to Areas.ID) Index (float) Areas ID (int, identity, PK) Name (varchar) So, as you can see, the Prices table contains price...

View Answer   |  Mar 17 2009  7:25 PM GMT
SQL, SQL Database, SQL tables
asked by Snowbunny

  5 pts.

What is the difference between SQL and T-SQL?

What is the difference between SQL and T-SQL?

View Answer   |  Mar 10 2009  6:30 PM GMT
SQL, T-SQL
asked by SQL Server Ask the Experts

  2445 pts.

Oracle Forms 6i Database Objects

I have problem that Forms 6i does not see packages stored on Database with Dynamic SQL code on it. When I open Forms Designer it does see Database Objects at the bottom but with running the forms it gives and error that does see sys. dba_sql. Thank you

View Answer   |  Mar 9 2009  9:31 AM GMT
Oracle Forms 6i, Oracle Designer, Dynamic SQL
asked by Oikhleif

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

Crystal Reports XI - Showing records when setting criteria

Goal: To show all customer orders. Along with those orders, I want to show all related notes on the progress for filling those orders. Problem: Some orders have no notes. When I set the criteria to show all orders and to show the notes, only orders with notes now appear in the report. Question: Is...

View Answer   |  Mar 5 2009  11:42 PM GMT
Crystal Reports XI, SQL, Crystal Reports
asked by Hritguy

  5 pts.

Looping Queries in Oracle using data from SQL Server

I have a table of entries from SQL server called PID. Each of this entry should follow the following select * from HR.TABLES a START WITH a.SID = '0' CONNECT BY PRIOR a.parentid = a.sid' Where I have '0' in the query above, should take all the values from PID. Is there a easy way to write this?...

View Answer   |  Feb 28 2009  4:05 PM GMT
Oracle queries, SQL Server connectivity, SQL queries
asked by Sreedhar77

  5 pts.

How to validate user parameters in Oracle Reports 6i?

Hi! I am using Oracle reports 6i to modify a standard report. I need to add two user parameters and a field retrieved should be between them if they are not left blank. If they are left blank, then, they should not be taken into consideration. My problem is: These two parameters are included in my...

asked by Nafy

  5 pts.

181 - 200 of 830