SQL Questions


Problem converting numeric to date data type
I have a zoned decimal field as s 6 and i am trying to convert it to date format as mmddyy in sql…It giving error ..please help me out ..I tried using date and cast function but its not working !!

Answer Question   |  March 19, 2012  11:24 PM
DB2/400, SQL
asked by:
420 pts.

InfoPath cannot connect to data source
Hi all, I have an InfoPath form in SharePoint 2007 that has dataconnections to SQL server DBs. I have a group of users that have been using them for the past few months with no problem. The permissions on the site have not changed but users can no longer access the Data connections. They get [...]

Answer Question   |  November 14, 2011  7:46 PM
Data Connector, Infopath, SharePoint 2007, SharePoint permissions, SQL
asked by:
5 pts.

how to store radio button responses in MySQL
I am creating an online test. Each item has 5 response options (radio buttons with 1-5 values, or 5-1 values depending on the question). How do I store these values in a database, to be able to score the test later?

Answer Question   |  November 8, 2011  1:53 PM
HTML, Radio buttons, SQL, Testing, Web development
asked by:
5 pts.

Select substring from clob-field with sql
How do you copy substring from clob-field with SQL if substring from/to positions are varables? This works OK (RPG free w embedded sql): exec sql select substr(myclobfield, 25, 70)                 INTO :mystring                 FROM MYLIB/MYFILE; [/pre] Whereas this causes a compilation error: from = 25; to    = 70; exec sql select substr(myclobfield, :from, :to)                 [...]

Answer Question   |  March 31, 2012  3:03 PM
Embedded SQL, RPG, SQL, SUBSTR, Variable Length Subnet Mask
asked by:
2,555 pts.

pl/sql fixed file creation
I am new to the pl/sql world. I’m ok with writing out a comma delimited file but I can’t figure out how to write out a file where the fields are fixed length. I could use some examples. thanks,

Answer Question   |  October 28, 2011  12:48 PM
PL/SQL, SQL
asked by:
5 pts.

export xml file of new stored data into a folder through trigger in sql server!
Hello everyone , im newbie on SQL and need to make a trigger that generate an xml file of the new data whenever an action happens ( INSERT ), i looked around and found a clause that can query an output as xml format (FOR XML )but i cant make the actual (xml)file and put [...]

Answer Question   |  October 24, 2011  12:08 PM
SQL, XML
asked by:
10 pts.

Question on Database Development Options
Our organization is going to build a database program where there will be millions of entries. Data entry will be done from around the country. The central server will be located in the capital city. Presently we use Windows OS, planning to migrate to Linux OS in next 4-5 years. I’d like to know the [...]

Answer Question   |  March 7, 2012  7:02 PM
Database, MySQL, SQL
asked by:
5 pts.

Free SQL software with interface to enter data
Hi, I need to enter about 5000 lines of data with about 10 columns. and then i would query the data (by lets say sql, but i am open to suggestions). Can anyone recommend a simple freeware to use. My queries would be like ordering the data based on certain column, or getting to view [...]

Answer Question   |  October 17, 2011  10:08 PM
Data entry, Free software, Freeware, SQL, SQL Query
asked by:
5 pts.

Return only one word– SQL
Hello, I have a column called Profile in a table and I am searching for a specific word in that column. I use the keyword LIKE with the wildcard (%) and that is working fine, but how do I have the query only return that word and not all the text in the Profile column. [...]

Answer Question   |  March 31, 2012  7:12 PM
Oracle, Oracle SQL, SQL, SQL Server
asked by:
5 pts.

How can do iSQl*Plus login for DBA
I want to create iSQL*Plus login for DBA. How can i do this ?

Answer Question   |  March 31, 2012  4:25 PM
DBA, iSQL*Plus, SQL, SQL Plus, SQL Server
asked by:
6,315 pts.

Finding Holes in Numerical Sequence
I need help in identifying the missing numbers in a large query. The only problem is that some of the numbers may be alpha and numerical combined or not-they are mixed. Yet all the numbers are in the same column.  The query looks like this SELECT MSPMP100.PRDNO,MSPMP100.CLASS,MSPMP100.DESCP     FROM CARF1.MSPMP100 MSPMP100                                          Where MSPMP100.CLASS= ‘72′ MSPMP100.PRDNO is the [...]

Answer Question   |  March 31, 2012  10:58 AM
Access Datasheet, AS400 iseries, SQL, SQL Query
asked by:
1,185 pts.

SQL to query a file
I want to use SQL to query a file and summurize data, using multiple scalars( min, max, sum) and display the results on a workstation screen.  Can i use one select statement in RPG iseries or should I create a stored procedure?   Any code samples,etc would be greatly appreciated.  

Answer Question   |  March 31, 2012  4:31 PM
Open Query File, RPG, SQL, SQL Query
asked by:
rmb
115 pts.

What is the best why to get started in DBA
I have some experiance in SQL and Access and all the other MS software too. I deal alot with spreadsheets, and database in my job. I work alot with the AS400 and do alot of queries throught MS Access. What is the fasted and tghe most inexpensive way to get to the piont of being self [...]

Answer Question   |  March 31, 2012  11:00 AM
Access, DBA training, iSeries database, SQL
asked by:
1,185 pts.

t-sql and AS400
I want to develop a TSQL query. First I need to determine if all the numbers in one of the fields are in numerical order and also find the missing holes in the number sequence. Secondly I need to sort by another field and by a particular criteria.  The words that I need to sort-by [...]

Answer Question   |  March 31, 2012  12:34 PM
AS/400 Query, SQL, SQL Query, T-SQL
asked by:
1,185 pts.

Data Fields outside of report section
I am looking at a previously written Crystal 8.5 report in which most of the data fields are outside of the report section. I can only see these fields if I reduce the report size to 50%. I have tried landscape orientation and adjusting the paper size to 11X17, but I still have many fields [...]

Answer Question   |  March 31, 2012  4:45 PM
Crystal 8.5, Crystal Reports 8.5, SQL, SQL Reports
asked by:
15 pts.

Querying against Views vs Tables
I have a view that combine several tables, so that the view presents more information that each table taken individually. I want to write an “INSERT INTO … SELECT … FROM xxx” query. Should I use the View in that “FROM xxx” or should I expand what the view shows? What’s better in terms of [...]

Answer Question   |  March 31, 2012  3:38 PM
MySQL query, SQL
asked by:
5 pts.

Updating a Date Time Field
I need to update the Confirmation Date Time field to NULL for a specific meeting but am unsure how to insert it.  The script below works for an individual but if they have more than 1 confirmation date it clears then all. Meet_Master.MEETING is where the meeting code AM2011 is. UPDATE   ORDERS SET CONFIRMATION_DATE_TIME = [...]

Answer Question   |  March 31, 2012  4:27 PM
Scripts, SQL, SQL 2005, SQL Server, SQL Server 2005
asked by:
130 pts.

Update a Date_Time Field
I’m trying to update a DATE_TIME field to a NULL value. When I run the script below I get an error. Any ideas on what I’m missing? UPDATE Orders SET CONFIRMATION_DATE_TIME = ‘ ‘ WHERE ST_ID = 102690 ERROR: Msg 245, Level 16, State 1, Line 1 Syntax error converting the varchar value ‘Ê’ to [...]

Answer Question   |  March 31, 2012  3:05 PM
Scripts, SQL, SQL 2005, SQL scripts, SQL Server 2005
asked by:
130 pts.

SQL REPLACE with pointer
I need to manipulate xml-files larger than char-field max-length allowed with RPG.   [strong]Background info:[/strong] My current solution uses a char-field… My app stores XML-files in CLOB-fields. I copy the xml-file from CLOB-field to a char-field: I then use %scan to find relative position of the string to be replaced, which is done using the [...]

Answer Question   |  March 31, 2012  11:32 AM
AS/400 SQL, RPG ILE, SQL, SQL Server, XML File Creation
asked by:
2,555 pts.

Update SQL Server 2005 Scripts
I don’t right code & don’t have the confidence to try on my own so, I’m asking for help. I need to run an update script to clear out the data from iweb_conf_demo.Attendee_ribbons. Then I’ll need to run multiple scripts to update multiple records on the same field iweb_conf_demo.Attendee_ribbons for different groups of registrants. For [...]

Answer Question   |  March 31, 2012  1:19 PM
SQL, SQL scripts, SQL Server 2005, SQL Server Scripts
asked by:
130 pts.