• SQL query to select highest test score

    I am writing a sql to bring someone's highest test score into a table. The sql is bringing in the highest test score possible, rather than the person's test score. I assume MAX is making that happen. If I take MAX out, it returns the single row subquery returns more than one row error. What can I...

    Cmyers40 pointsBadges:
  • Need SQL query

    Hi, I have a emp table in which I have 7 columns and hiredate is one of the columns. I need to query for the hiredate which has maximum number of employees joined the company on a particular date?

    Kirankg5 pointsBadges:
  • SQL to pull consecutive numbers rows

    Hello, I have a table with these sample recs. ColA ColB ColC 00100 295.00 295.00 00100 295.01 295.01 00100 295.02 295.02 00100 295.03 295.03 00100 295.04 295.04 00100 295.05 295.05 00100 295.10 295.15 00100 295.98 295.98 What SQL query (prefers not to use cursor if possible since it will involves 2...

    WarrenDar5 pointsBadges:
  • Issue SQL Query with Localized String through PowerShell

    Hello, I am attempting to execute a an SQL query through PowerShell against an MS Access database. My query works 99% of the time, but occasionally a localized string will cause an error beacuse it contains a single quote (') somewhere within the localized string. You can look at the following...

    Bgsullivan15 pointsBadges:
  • SQL help

    hiow to pick only alphbets in a string or a column using sql

    Ecsbc35 pointsBadges:
  • I need to display only last two characters

    i need to disply only last two characters in a column, the column data like this 1.3.2NE,1.2.2NN,1.10CE,1.11.1NN,10.3 for this i need output like this NE,NN,CE,NN

    Ecsbc35 pointsBadges:
  • Slow performance for a SQL query

    I have a SQL query I am running, but it is experiencing significant slowdown. The main table - has over 1 million records and a unique key of cusID. It has a one to many relationship with the other two tables mentioned. The query code is as follows: Select customer.cusID,customer.VisitDate,...

    SQL Server Ask the Experts2,585 pointsBadges:
  • Return specific level parent

    Can anyone help? I have a table, with 7 records ID ParentID Level ------- ------------- --------------- 01 (empty) 1 A 01 2 BC A 3 X BC 4 B 01 2 DE B 3 Y DE 4 I need a query to return, for every record in the table, the corresponding 'Level 2' ID, excluding records with a Level of 2 or higher (i.e....

    Paulvian5 pointsBadges:
  • T-SQL Query- how to explode XML fragment stored as NText into table?

    I'm using a commercial storefront software that offers "extension data" fields as NText to store custom data. I am storing an xml fragment that looks like this: <priceSplit xmlns="http://tempuri.org/priceSplit.xsd"> <split> <type>Credit Processing Fee</type>...

    Lambrite5 pointsBadges:
  • Can I do create dynamic table while bulk insert ?

    Hi, I am Software Engineer, I am using SQL-SERVER, I have a issue with it. I want to write a query to dynamically create a table when using BULK Insert. No of Column is dependent upon no of fields available in first row. Assume that in each row no of column is same.Column name can be any string,...

    ARUNKUMAR1125 pointsBadges:
  • Writing a query in SQL for use in SQL Server 2005

    I’d like to write a query that would allow me to view items with a characteristic of my choosing and filter out the others. Is it possible to write something like this in SQL and use it in SQL Server 2005?

    SQL Server Ask the Experts2,585 pointsBadges:
  • Writing a specific query involving primary keys in SQL

    I need to write a query in SQL that will get the fifth-from-last record from my database when either a primary key is defined or no primary at all is defined. How would this query look?

    SQL Server Ask the Experts2,585 pointsBadges:
  • Records with null value not in output

    See query: select distinct f2.description Business_Unit, f3.description Department, f4.description Function, a.segment5 Account, f5.description Account_Description, sum(nvl(d.entered_dr,0) - nvl(d.entered_cr,0)) Actual, (Select sum(nvl(dd.entered_dr,0) - nvl(dd.entered_cr,0)) from...

    Tams5 pointsBadges:
  • How Do I assign a value if a value in the field is empty

    In my script (that is not working yet) I want to make sure if "full_value" (a field) is empty in a particular record then the value zero will be inserted. This is working in Access, but I'm trying to rebuild the query in SQL. Thank you. SELECT DISTINCT oas_balance.cmpcode, oas_balance.el1,...

    Ilfoprog50 pointsBadges:
  • equivalent for crosstab query

    Is there any function in MySQL that can create a query similar to crosstab query in MS Access???

    Sgheorghian5 pointsBadges:
  • Saving the results of a SQL Server 2005 table query in a XML file

    I have data in a table on a SQL Server 2005, and I need to query this table and save the results in a XML file that conforms to a given XSD. Is there an easy way of doing this?

    SQL Server Ask the Experts2,585 pointsBadges:
  • Toggling a case sensitive query in SQL Server 2005

    It appears that my queries of stored procedures, tables, columns, etc. are case sensitive in SQL Server 2005. Is there a “case sensitive” option that I can toggle on and off?

    SQL Server Ask the Experts2,585 pointsBadges:
  • SQL Query

    I created a SQL query to restore several databases from a remote location to a test environment. I would like to add a check in the script so that it will not run if connected to certain servers so production databases are not accidentally overwritten

    Asdemers5 pointsBadges:
  • Create a sequence called Store_seq with the following values: increment by 10, start with 500

    Create a sequence called Store_seq with the following values: increment by 10, start with 500

    VB RD45 pointsBadges:
  • Looking for a database name query in SQL

    Is there a query in SQL that could return me the name of a database, or whether it is connected to SQL Server or Oracle?

    SQL Server Ask the Experts2,585 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