SQL Questions


un-format object viewer sql tab
Hi experts, Can someone tell me, how can I turn off automatic code formating on the Object viewer’s SQL tab (i.e. the sql code in the SQL tab of an opened view is automatically formated compared to the code I used to create it) Thnx in advance for yr answers

Answer Question   |  February 11, 2011  8:13 AM
Oracle SQL, Oracle SQL Developer, SQL, SQL Server
15 pts.

Oracle opportunities
I completed my B.E in 2009, so I want interested to go to oracle side, so I know the concept of sql and pl/sql. Relating to this I dont have a project of this. So please give me some titles of project atleast I can go through this.. regard@sadashiv

Answer Question   |  January 28, 2011  5:25 AM
Oracle, Oracle PL/SQL, Oracle projects, SQL
asked by:
5 pts.

VIEW_TABLE_USAGE SQL 2005
In MS SQL 2005, when I select * from VIEW_TABLE_USAGE, I get incomplete results. At least one object that is used in at least one of the views is not listed. View “PTP__MARA_MARC” uses two tables and one view, but VIEW_TABLE_USAGE only lists one table and one view.  Can you please help?

Answer Question   |  January 26, 2011  2:53 PM
SQL, SQL 2005, VIEW_TABLE_USAGE
asked by:
5 pts.

SQL and Dates
Can someone date a look at this SQL and recommend a cleaner way to go about this? [BMDTOR is a date field in the file stored as CCYYMMDD] SELECT (DAYS(CURRENT DATE)-DAYS(SUBSTR(BMDTOR,5,2)||’/'||SUBSTR(BMDTOR,7,2)||’/'||SUBSTR(BMDTOR,3,2)))/30 AGE, SUBSTR(BMDTOR,5,2)||’/'||SUBSTR(BMDTOR,7,2)||’/'||SUBSTR(BMDTOR,3,2), (CURRENT DATE) FROM XXXXDATA/FILEXX

Answer Question   |  January 25, 2011  5:31 PM
SQL, SQL Query, SQL Server
asked by:
5 pts.

Recursive Association with compound primary key in SQL database
Hello, I’m afraid I’m very new to this and really struggling. I have a table with a compound primary key composing of Code, Date, Client to represent an attendee on a course. I need to include a ‘Lead Client’ column to represent a recursive relationship where one attendee can be nominated to lead others attending [...]

Answer Question   |  January 3, 2011  11:53 PM
Database issues, Design principles, SQL, SQL Database, SQL Server database, SQL Server errors
asked by:
15 pts.

SQL Server Plan Cache
There is a bucket in plan cache with 75 objects in it and it is the same sql statement. Other than using DBCC FREEPROCCACHE what will clear out the cache? Restarting SQL SERVER Service? I use the code below to look up how many plans are in a bucket. SELECT   bucketid,   entries_in_bucket = [...]

Answer Question   |  December 29, 2010  11:30 PM
Cache, Cache Mode, SQL, SQL 2005, SQL performance, SQL Server
asked by:
585 pts.

Is it possible on iSeries that an index is defined keeping in mind an sql select criteriea however when the queryis run this index does not get used.
Is it possible on i series that an index is defined keeping in mind an sql select criteriea however when the queryis run this index does not get used. We had an issue wherein an entire library had to be cleared and all files from had to be restored from a previous backup, after the [...]

Answer Question   |  December 24, 2010  9:45 AM
Index Performance, iSeries, SQL, SQL Select, V5R4
asked by:
1,160 pts.

Letting users upload pictures MYSQL Database
What is the easiest way in DW to allow users to upload a picture to my website. I don’t know much coding so …how can it be done using the functionality of DW. I am using a MYSQL database.

Answer Question   |  January 17, 2012  3:30 PM
MySQL, MySQL Database, SQL
asked by:
5 pts.

When using IfNull in my SQL, records are ignored
I know my data table has nulls in it. If my select statement doesn’t include those fields, I get hundreds of records. If I include those fields with an IfNull, it skips all but 4 records. Here’s my testing snippet: C/Exec sql C+ DECLARE C1 CURSOR FOR C+ SELECT C+ accountID, C+ ifNull(address,’ ‘) C+ [...]

Answer Question   |  December 24, 2010  12:10 AM
AS/400, AS/400 Records, Data Tables, RPG, SQL
asked by:
20 pts.

Two SQL server synchronization
How can I merge two SQL Server databases? One sql server is in web  and another in local machine  both sql servers will have daily data transactions entries. how to merge those daily data transactions between the two sql server?  i am new to sql synchronization and merging. could you kind enough to help me?

Answer Question   |  December 20, 2010  3:14 PM
.NET, SQL, SQL Server, SQL Server synchronization, VB.NET
20 pts.

Value of() in SQL Server?
what is the equivalent statement of valueof() of oracle in sql server?

Answer Question   |  December 16, 2010  12:22 PM
Oracle Statements, SQL, SQL Server, SQL Server 2005
asked by:
220 pts.

How do I retrieve data from Visual Basic 6.0 with SQL?
how can i rertieve data in vb6.0 from sql?

Answer Question   |  December 13, 2010  4:58 AM
Retrieve Data Area, SQL, SQL Server, VB 6.0, Visual Basic 6.0
asked by:
5 pts.

Using a variable in the LABEL ON SQL statement
Is it possible to use a variable in the label-string of the LABEL ON sql statement so that the variable can be changed dynamically in an SQLRPGLE program ?

Answer Question   |  December 14, 2010  7:26 PM
AS/400 SQL, RPGLE, SQL, SQL Server
asked by:
180 pts.

Find missing numbers with SQL
In a large logfile I have records containing the field INVNO (invoice-number). The lowest and highest values are easy to find, BUT it looks like some numbers in between are not there. Anyone got a trick with SQL, which can tell which numbers are missing within the numberrange (step 1) ?

Answer Question   |  December 14, 2010  2:35 PM
AS/400 SQL, SQL, SQL Server, V6R1
asked by:
2,540 pts.

Crystal Reports 8.5 compatibility with SQL 2005
Is crystal 8.5 compatible with SQL Server 2005?

Answer Question   |  December 10, 2010  4:45 PM
Crystal Reports 8.5, SQL, SQL Server, SQL Server 2005
asked by:
5 pts.

Create trigger using iSeries Navigator
I am trying to ceate a simple trigger to a table to update a history file with the old rate when the rate changes in the master table. I have gone as far as creating the sql statement, but I am not able to make it to work (my sql is very limitted). Would it [...]

Answer Question   |  December 2, 2010  2:28 AM
AS/400 triggers, iSeries Navigator, SQL, Triggers
asked by:
5 pts.

Complex SQL query in SQL Server 2008 tables
Sir, i have 2 tables , first table column one is 1,2,3,4, and column two is x,y,w,z and second table  first column of 1,2,3 second column is (1;2),(1;2;3;4),(2,4), i wand to display the result as in first colum 1,2,3 and second column as (x,y),(x,y,w,z),(w,z) please help me in this regard

Answer Question   |  February 9, 2011  12:42 PM
SQL, SQL Query, SQL Server, SQL Server 2008, SQL Server tables
asked by:
5 pts.

How to transfer database from SQL Server 2008 to SQL Server 2005
how to attach database of  sql 2008 into sql 2005

Answer Question   |  December 1, 2010  6:13 AM
SQL, SQL Database, SQL Server 2005, SQL Server 2008, SQL Server migration
asked by:
5 pts.

3rd party connectivity to SQL server through firewall
We need to allow a third party to connect to one of the SQL servers in our DMZ via an externally initiated SQL connection. What is the best approach and what are the risks?

Answer Question   |  November 29, 2010  11:59 AM
DMZ, Firewalls, SQL, SQL connectivity, SQL Server
asked by:
15 pts.

Do I need SQL?
DO I need it? I am just a home user anf oerform simole tasks, but have 8 examples of SQL programs in my program list. I have win 7 64 bit O/S

Answer Question   |  November 29, 2010  11:19 AM
SQL, SQL procedure, SQL Server, SQL statements
asked by:
0 pts.