• Select SQL date without time

    When I'm trying to select a date in SQL, it keeps giving me this: 2016-06-05 20:17:33:933. Here's the thing: I actually only need the date (not the time). Is there a SQL command for this?

    ITKE1,068,105 pointsBadges:
  • Get first character of SQL column

    Currently in SQL, I have a column with a length of 6. In that specific column, I need to get only the first character. How can I do that? Is there a SQL String function?

    ITKE1,068,105 pointsBadges:
  • Recover unsaved scripts after SSMS crash

    Our SSMS just crashed and I have to recover a bunch of unsaved scripts. Is there a way to do that? Any help is appreciated.

    ITKE1,068,105 pointsBadges:
  • How do I run and import a large .SQL file?

    I've been using RedGate Software for SQL data comparisons and it turns the data into a .SQL file (this is for running on another machine). Here's my issue: It's a pretty large file so copying and pasting won't work and when I try to open it in SSMS, I always get the error message that it's too...

    ITKE1,068,105 pointsBadges:
  • SQL: Avg function for calculating the age of a man and woman in different columns

    I would like to use avg function for calculating the age of a man and woman in different columns but as a total in each case. Could you help me" For instance, Select Sum(case when woman then '1' else '0')woman Sum(case when men then '1' else '0')men Avg(birthday woman)avg1 Avg(birthday men)avg2

    pe444000hhhhh5 pointsBadges:
  • SQL (QMQUERY) date conversion issue

    I inherited a QMQUERY program that my user came to me today indicating that the week number was not correct. This query puts data into a workfile and a second query is called that splits other data into fields. As far as the two relevant fields are concerned, the second program does not modify...

    azohawk3,235 pointsBadges:
  • SQL average command for column IDs

    For SQL, does anyone happen to know if I can use the SQL avg() function for average by my column IDs? Basically, I have several different IDs and I'm trying to get the average of each through one query. How can I go about this?

    ITKE1,068,105 pointsBadges:
  • How to SQL update several records in a query

    In SQL Server, I have a table that's labeled this: config_name | config_value. I'm looking to update several records in one query. Here's what I have so far: UPDATE config SET t1.config_value = 'value' , t2.config_value = 'value2' WHERE t1.config_name = 'name1' AND t2.config_name = 'name2'; But...

    ITKE1,068,105 pointsBadges:
  • Copying SQL Azure database to development machine

    I'm looking to copy my SQL Azure database to my local development machine. I already have a development database in the cloud but don't want to pay for it anymore. I have copied by production database to the new development database but I need that same one on the local machine. How can I go about...

    ITKE1,068,105 pointsBadges:
  • Create first database in Oracle Database 11g Express

    Recently, I installed Oracle Database 11g Express on my Windows 7 machine. Also, I installed Oracle SQL Developer too. Now, I'm looking to create a database with two tables, followed by using SQL Developer to add / query data. But when I opened Developer, it's asking me to make a new connection (I...

    ITKE1,068,105 pointsBadges:
  • Three ways to login in to SQL database server?

    Does anyone know what are the three ways to login in to SQL database server?

    melbourne5 pointsBadges:
  • SQL7919 Data conversion error

    Hi, I have an embedded SQL program in which I generate an XML element as a VARCHAR(256). This is done via: select xmlserialize( xmlelement(NAME "Name", 'Something') as VARCHAR(256) ) as XmlResult from sysibm/sysdummy1 The SQL statement is run via sqlcursor and I fetch the result into a RPGLE...

    mathypaesen10 pointsBadges:
  • Export Oracle SQL Developer query to CSV file

    I'm currently using Oracle SQL Developer and I need to export one of my queries to a text file. I would like it to be a CSV file. But I'm not seeing any export options at all. Even double clicking on the query itself didn't work. What should I do here?

    ITKE1,068,105 pointsBadges:
  • Confirm what version the Oracle Database is in SQL

    My partner and I are currently creating an installer for a new application. Basically, a user gets to select a data source for their configuration -> nominate what database it is. But here's what we have to do: Basically make sure that the database is Oracle / the version too (this will be done...

    ITKE1,068,105 pointsBadges:
  • How to substring and cast in select where statement on iSeries with RPG free

    Hi. I'm relatively new to free form RPG and I rewrote a program to be RPG free and SQL. I'm having problems with my where clause. I'm trying to substring the second byte on a 2 digit packed field. I've tried to use the CAST statement to convert the packed field to CHAR and then do the SUBSTRING on...

    raynesnf65 pointsBadges:
  • How can I change SQL language and date format?

    I'm using an older version of SQL Server (2005 to be exact). So when I try to execute, DBCC USEROPTIONS, it's giving me a foreign language and the date format DMY. I need the language to be in English / format in MDY. Is there a way to change this? Thank you very much

    ITKE1,068,105 pointsBadges:
  • Should I run a SQL view in my SQL Server database?

    For SQL Server, should I run a SQL view in my database? My friend told me to just run a stored procedure but I would rather run a view for security purposes. What should I do?

    ITKE1,068,105 pointsBadges:
  • Online report missing data that is in PDF

    When we view a report on Report Manager it shows 5 rows and a group count of 10. If you spool the report out to PDF or print it, it shows 10 rows and a count of 10. If you search online, the data in rows 6-10 cannot be found but they are there in the PDF and the printed version. Why is the data...

    AndreaFl15 pointsBadges:
  • SQL split column into multiple rows.

    I'm going nuts.. I have a table with 30+ columns. One of the columns has a string with serial numbers that are comma separated. What I'm trying to do is create a new temp table with the identityID and the serial number. This way I can add each parsed out serial number value to our production data...

    ToddN2000100,265 pointsBadges:
  • RUNSQLSTM command failed

    I have created one member with SQL table type under which I have written create table query. But when I tried to compile program using RUNSQLSTM, it's showing RUNSQLSTM command failed. I am using pub1 demo server.

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

Thanks! We'll email you when relevant content is added and updated.

Following