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

    Chris12325 pointsBadges:
  • 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 solution...

    MikeBaker5 pointsBadges:
  • 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".

    Ara5 pointsBadges:
  • 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...

    alessandro.panzetta9,725 pointsBadges:
  • 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...

    Detuli15 pointsBadges:
  • 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 information...

    Snowbunny5 pointsBadges:
  • 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...

    IG194410 pointsBadges:
  • 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

    Oikhleif30 pointsBadges:
  • 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 in...

    Calvin606165 pointsBadges:
  • 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...

    Hritguy5 pointsBadges:
  • 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? or...

    Sreedhar775 pointsBadges:
  • SQL DB MIRRORING ACROSS VPN?

    Can SQL 2005 DB mirroring work if the mirror server is to be in another building (building networks connected via VPN router)? We just want employees to be able to remote into the mirror server from home if power is lost at the main building.

    Kareemr695 pointsBadges:
  • Virtual machine setup – SQL 2005

    I’m setting up a virtual machine -- SQL 2005 install -- and I want to make a separate drive for the logs and one for the data, but as this is a virtual environment using the same mirrored physical disk, is that advisable?

    BladeMarvel35 pointsBadges:
  • Stored Procedures, One Database, Different Software Releases

    Hi Everyone. Currently at my work we use SQL in our VB.NET code. I have previously always used stored procedures for all of their benefits. My company has said that our customers might use different versions of our software against its one database. For example: While a customer is migrating from...

    Danol215 pointsBadges:
  • SQL Server 2005 query to get the average

    Hi, I'm using MSSql 2005 on Windows 2003 Server. I need some assistance to write a query to get the average of two columns and write the value to a third coulmn. All the transactions is in one table. Basically it is column 1 + column 2 devide by two = column 3 Thank you, George

    GPNel200675 pointsBadges:
  • Finding the number of rows of all tables of a user/schema in Oracle

    how can i know all the table names along with the no. of rows they contain for a user/scema in oracle 9i through sql? plz answer ......

    Chrishram15 pointsBadges:
  • SQL query and Oracle database design help needed

    Sorry for all the confusion with the questions.So let me clear myself,i am doing this not as assignment or homework,but something which interests me and trying to leran.Earlier as I stated that its a part of my school(** well frnakly speaking, it was my plan if i could put this as an item of the...

    Rohit331225 pointsBadges:
  • How can I select unique records from Access based on two criteria

    I need to do the following: SQL = "select amount, count(amount) from table1 group by amount having count(*) =1" This returns all unique records, but I need to add another criteria to that statement ie: I need to select all unique records only if a second value is met as well! This is what I had in...

    Grantp40 pointsBadges:
  • Server 2003 memory performance configuration

    We have a SQL application running in an n-tier environment. Some of the users are complaining about application performance. I am going through the environment looking at all of the elements involved in processing this application. The information below shows all of the server systems involved in...

    Labnuke9932,960 pointsBadges:
  • PL/SQL

    Hi Experts, I would like to mentione here i was trying to test one package and found the package has a procedure named SET() which hav UPDATE on Report table and INSERT on A_R table in same transaction Both the above mentioned tables hav a tim_upt column which s given as systimestamp and strange it...

    Inprise610 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