• insert date only into SQL table

    The getdate() function returns the date and time. How can I just get the date?

    Gina35 pointsBadges:
  • ms sql case statement

    I have written a case statement in MS SQL that is returning a single phone number for a single id. This is valid as the database contains multiple phone numbers attached to the same id number, with differentiation based on phone type. Once I have found the prefered phone number, I do not want to...

    Espqueen5 pointsBadges:
  • SQL Right Trim Nulls

    How can I trim any trailng nulls from a selected record set. I have a table with up to 17 cols that I need to extract data from which included all embedded nulls but no trailing nulls

    Tim442025 pointsBadges:
  • Using SQL and given a table X with columns labeled A, B, C, and D -how do you get the count where column A = ‘TREK’

    Using SQL and given a table X with columns labeled A, B, C, and D - how do you get the count where column A = 'TREK'?

    Shellken6940 pointsBadges:
  • Using SysObjects Table

    I have a database that I need to know what tables are in it and also what views. I also need to know what tables are used in the views. Is this possible with the Sysobjects table? Any help would be greatly appreciated. TIA SQL Newby

    Gdckboyer20 pointsBadges:
  • Why is the query using the index even though the perecentage of unique values is 52%?

    I have a table with no primary key and a non-clustered composite index of two columns. When I look at the number of distinct values (selectivity ratio), the table has a ratio of 52% unique values. I thought an index should be at least 90% unique in order for it to be used. Yet when I run the query...

    Abbi20 pointsBadges:
  • SQL MERGE

    I have a view like below generated from my time and attendance software. staffNo EmployeeName title TransactionType Cdate time 556 JOHN WEB DEVELOPER IN ENTRY 24/01/2008 13:47:30 556 JOHN WEB DEVELOPER OUT ENTRY 24/01/2008 16:38:33 556 JOHN WEB DEVELOPER OUT ENTRY 24/01/2008 16:40:03 556 JOHN WEB...

    Binu.emiliya10 pointsBadges:
  • RPG with Dynamic SQL Problem – SQLCOD 501/312

    I'm trying to do simple dynamic SQL in a program to select records for a subfile but it doesn't seem to be working. sSql = 'SELECT orderno FROM ordhdr ' 'WHERE custno = :scSrchCust '; following this I have: exec SQL CLOSE @Orders; exec SQL Prepare Stmt from :sSQL; exec SQL Declare @Orders SCROLL...

    MMAGuy85 pointsBadges:
  • rows to columns

    I have a table containing answers from different forms. the forms are created dynamically so some forms will have 3 answer fields, some will have as much as 20 answerfields. ex : form_id field_id unique_id field_value 1000 631 1 john doe 1000 632 2 washington 1000 633 3 john@ws.com 1000 631 4 anny...

    Aabbccddee25 pointsBadges:
  • ROW_NUMBER in SQLServer

    In Oracle, I can use the analytic ROW_NUMBER function to assign sequence numbers to output rows, re-starting the sequence as certain values change (e.g., there's a separate count for each deptno in this example:) SELECT deptno , ename , ROW_NUMBER () OVER ( PARTITION BY deptno ORDER BY ename ) AS...

    FrankKulash1,240 pointsBadges:
  • Need to create SQL DTS Package

    We are using SQL 2000 DTS Packages and I want to create a DTS Package which can copy only all text file names from folder(source) to SQL table column(Destination). Also i want to write number of rows in particular text file to SQL table. DTS or Procedure or Activex Script??

    JimmyIT1,725 pointsBadges:
  • SQL Server Schema Best Practices

    I am in the process of establishing a "sandbox" database for a mix of users with SQL development skills. I have done this before with Oracle but not with SQL Server. What I would like to do is build a database whereby each user has their own play area. We are running SQL Server 2005 so I thought of...

    MortimerSchnurd0 pointsBadges:
  • SQL 2000 to Yukon Migration

    We have 4-5 applications on the front end of a portal. On the backend we have mapped these applications to SQL server 2000 Databases. Now, we are planning to migrate on the backend databases to Yukon and map it to the application on the front end. My question: Is it possible to use Yukon for one of...

    Kilaru0 pointsBadges:
  • SQL statement using RRN(file) on join pulling only Max(date) records from second file in iSeries

    I am using WebSmart with the I-series data base files. I am joining two data base files receiving the RRN so that I can use the fetch rrn and the fextnext to display one screen at a time in my WebSmart program. I have used this method many times except this time I have a one to many relationship...

    Isjld35 pointsBadges:
  • SQL Packages

    I have a query on SQL packages.Is it necessary to create an SQL package every time we connect to a remote system?Is there any other alternative?

    Sweta30 pointsBadges:
  • Query Criteria

    Hello. I have a report with multiple subreports. User enters date range when prompted from query in main report. I want to refer the subreport date criteria to the date range the user enters for the main report, via the query. I used this in the query criteria under the date...

    Bec10 pointsBadges:
  • How to make a single row in SQL

    Dear all, Please help me I am not good in sql queries. I have a view like this. SNo Employee title Cdate IN TIME OUT TIME 258 john accountant 27/01/2008 7:28:12 258 john accountant 27/01/2008 7:28:30 258 john accountant 27/01/2008 16:03:42 258 john accountant 27/01/2008 16:03:48 258 john accountant...

    Binu.emiliya10 pointsBadges:
  • need print a table that contain bulk number of records.but it have to display one screen at a time and next screen next time

    i need print a table that contain bulk number of records. but it have to display one screen at a time and next screen next time( like PLESS ANY KEY....) Thanks & Regards, krishna.

    Venkatakrishna10 pointsBadges:
  • trigger to update

    My Table Structure is: Table A Table B Table C colA -PK Col B-PK Col C-PK Col B-FK Col B-FK Col C-FK This relation establish a Concurrent relation where in Cascade Property fails.I can set Cascade property for any two tabnles...but not the third table. My requirement is : 1)To Update PK of Table B...

    Adithi5 pointsBadges:
  • ‘m trying to verify that a SQL DATABASE is empty ,

    I am modifying a VB program that is taking ALL the tables from an ACCESS Database and converting them to a SQL DATABASE. They VB Program opens the SQL DATABASE, but I want to verify the database is completely empty. Is there a function or call that can be added to the code??

    MAB TRIBEFAN5 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