• How to select 1 record in DB2

    As usual, I often use: select top 1 * from table but in DB2, I can't. I use the Toad tool to input SQL statement. Does anyone have a solution? Please share it with me. Tkanks a lot!

    Linhntk5 pointsBadges:
  • Advantages and disadvantages of certain SQL commands

    Where can I find information about the advantages and disadvantages of using SQL commands like BCP, BULK INSERT, SELECT INTO, etc.?

    SQL Server Ask the Experts2,585 pointsBadges:
  • SQL View performance vs. SELECT

    I am experiencing slow views on my database. If I create a view and run it, then use the same select statement from the view and run. They both return the same data, but View runs slower. My expectations was that since views are compiled, they should run faster. Could some one clarify this for me....

    MHM2815 pointsBadges:
  • How to find a specific word in a SQL table

    How do you write a SQL query to find a specific word in a SQL column. Example: I want to show all records that have the word Bob in it but do not want to include records that are Bobby or Bobble etc., only the exact word Bob. Hope that makes sense.

    Boomer15 pointsBadges:
  • SQL Server trigger, insert result of multiple where clause into a variable

    Hi All, I have a select statement that stores the result in a variable,this works fine if there is only one condition and field in the clause.How do I go about it if there is more than one? For example (Working one) SELECT @Variable = (SELECT [Field] FROM [Table] WHERE [FIELD] = Value) But I am...

    Jacquesvdm20 pointsBadges:
  • Calling a stored procedure in a SELECT list on SQL Server 2000

    I am using SQL Server 2000, and my question is: is there any way to call a stored procedure in a SELECT list?

    SQL Server Ask the Experts2,585 pointsBadges:
  • Accessing another database using a variable

    I have a select like this: SELECT a.part_id, a.descript, b.location from PART_MASTER a, anotherdatabase.INVENTORY b where a.part_id = b.part_id Is it possible to use a @variable to identify the other database, rather than hard coding it? (I've tried @db2.INVENTORY b) but SQL SERVER 2000 doesn't...

    CO Bill120 pointsBadges:
  • How to retrieve, add and update data manually using VB.NET 2005

    Hey guys! I'm quite new to VB.NET 2005. I need to know how to add, update and retrieve data manually using VB.NET 2005. In the software which I'm trying to implement, data is entered in text boxes and then they are updated/added into an SQL table. When retrieving the data, for example: A student is...

    Obhasha0795 pointsBadges:
  • I am getting ORA-01422: Exact fetch returns more than requested number of rows

    Hi experts, I am getting this error when I run my test case for my PL/SQL procedure, which has select and insert statements only. Not clear where I would have went wrong, Please guide me where should I check exactly. Its popping up with this error message which i caught in a exception piece after...

    Inprise610 pointsBadges:
  • oracle explain plan from yesterday

    Is it possible to see the explain plan used by Oracle for a select statement that was run yesterday?

    Nightoracle5 pointsBadges:
  • Execute SQL SELECT via RUNSQLSTM error

    Trying to execute SQL-statement "SELECT * FROM mylib/myfile" give errormsg SQL9010. Some say that SELECT is not supported with RUNSQLSTM, but IBM command parameter text indicates otherwise. Is SELECT supported and what am I doing wrong?

    DanTheDane2,555 pointsBadges:
  • SQL Server equivalent of Oracle’s “when no data found” exception

    In a stored procedure, I'm storing the result of a select statement in @variable. Is there a way to capture a SQL Code 100, like Oracle's SQLERRM(100)/ORA-01403 if no records are returned? I'm currently setting @variable = '*' before the select and and IF @variable = '*' afterwards, but there must...

    CO Bill120 pointsBadges:
  • SQL Select: Getting the previous records from a known record

    I issued a select statement like this: Select phone# from pltlcd where phone# >= 985143525 fetch first 20 records only PLTLCD is a file sorted by phone#. From the first record retrieved by the aboe select statement, how do I get the 20 records in the file that exist before the returned set of...

    bogeybetsy560 pointsBadges:
  • select parent where more than one child

    I want to select a row from the parent table based on whether there are two or more rows in a child table. What is the best way to do that?

    Ghjazz5 pointsBadges:
  • How to save the output from an SQL select statement to a spool file

    Please can someone tell me how I can save the output from an SQL select statement to a spool file. Thanks, Tom

    Tomotsk75 pointsBadges:
  • Modifying a Stored Procedure

    The stored procedure below pulls suspected duplicate records. What I need it to do is return suspected duplicates only if it meets the criteria of having a member record type (GEN) & a non-member record type (WEB). But if the duplicates both have a non-member record type I don't want it showing up...

    DJandLO130 pointsBadges:
  • Select statement in asp.net

    How can i use ms sql select statement with where clause in asp.net

    Pioneerinaspnet15 pointsBadges:
  • Select/Insert Statements causing out of memory error run under VB Script

    I'm using VB Script on a Windows 2003 Server against an Oracle 10g database to both query against a table and insert new rows of data against that same table but as it runs it starts eating up RAM and when it gets to about 1.5gb it causes the out of memory error.  As far as the Select...

    TheBandit15 pointsBadges:
  • Parameter in select statement

    Hi, I need to pass a parameter into a stored procedure which values are dynamic always. Executing a variable which having the Select statement. Following query working fine. BEGIN DECLARE @strQuery NVARCHAR(MAX) DECLARE @CountryId INT DECLARE @CityId INT SET @CountryId = 2 SET @CityId = ' AND...

    Plugsharma40 pointsBadges:
  • SQL RPGLE – How to override data set data structure at run time

    I currently have an SQL RPGLE routine that receives a SELECT statement as a parameter and then fetches the data set into a data structure based on the file. This only works over a single file as the datastructure is created at compile time and has to be based on filea. I would like to make this...

    NarkedDiver20 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