Latest date SQL
Hi I am Trying to grab only the latest date from a uniquie stock number wich has mutiple dates? All i want to show is the lastest date against the stock number. Bear in mind that theese are comming from two different tables. Any Ideas
Answer Question
| September 21, 2011 9:33 AM
Database programming, SQL
Hi I am Trying to grab only the latest date from a uniquie stock number wich has mutiple dates? All i want to show is the lastest date against the stock number. Bear in mind that theese are comming from two different tables. Any Ideas
Catching blocks using a stored procedure in SQL
I have a stored procedure in SQL that I use to catch blocks. This stored procedure is executed by a stored procedure higher up. How do I relay the error info, if there is error info, to the parent? Do I need to use a return code or is the error info just passed back, [...]
Answer Question
| August 6, 2008 3:16 PM
SQL, Stored Procedures
I have a stored procedure in SQL that I use to catch blocks. This stored procedure is executed by a stored procedure higher up. How do I relay the error info, if there is error info, to the parent? Do I need to use a return code or is the error info just passed back, [...]
sql
is it possible in vb.net to read two database(access) with one sql? like select * from databaseA!tableA union select * from databaseB!tableB what connection type to use ty in advance
Answer Question
| August 6, 2008 5:08 AM
Database programming, SQL, VB.NET, Visual Basic .NET
is it possible in vb.net to read two database(access) with one sql? like select * from databaseA!tableA union select * from databaseB!tableB what connection type to use ty in advance
Move/Copy System DB’s to new server in SQL 2005
Trying to move system DB’s to brand new server (really virtualized server). Server names are different. Any suggestions would be appreciated.
Answer Question
| August 4, 2008 5:12 PM
Database migration, SQL, SQL 2005, Virtual Servers
Trying to move system DB’s to brand new server (really virtualized server). Server names are different. Any suggestions would be appreciated.
Display number of records effected by update/delete/insert SQL statement
Whenever I carry out an insert/delete/update SQL statment I would like to show how many records have been effected in the Run History box. Sometimes this does work OK but not always. Need to know what if anything if is controlling the display of this information.
Answer Question
| August 4, 2008 2:50 PM
SQL, SQL statements
Whenever I carry out an insert/delete/update SQL statment I would like to show how many records have been effected in the Run History box. Sometimes this does work OK but not always. Need to know what if anything if is controlling the display of this information.
Error in SQL coding
I am having a specific problem with coding in SQL, and I was curious if you could give me any advice. I have entered this code: CREATE TRIGGER UpdateAfterPayment On SupplierTransactionDetails For Insert, Update, Delete As Update S If i.DebitValue>0 S.Balance = S.Balance + i.DebitValue else S.Balance = S.Balance – i.CreditValue from SupplierTransactionHead H, Suppliers [...]
Answer Question
| August 4, 2008 2:31 PM
Code, SQL, Triggers
I am having a specific problem with coding in SQL, and I was curious if you could give me any advice. I have entered this code: CREATE TRIGGER UpdateAfterPayment On SupplierTransactionDetails For Insert, Update, Delete As Update S If i.DebitValue>0 S.Balance = S.Balance + i.DebitValue else S.Balance = S.Balance – i.CreditValue from SupplierTransactionHead H, Suppliers [...]
Alternative to using a cursor in SQL
What is the best alternative to using a cursor in SQL if I am suffering from performance issues?
Answer Question
| July 31, 2008 7:22 PM
SQL, SQL performance
What is the best alternative to using a cursor in SQL if I am suffering from performance issues?
What effect will changing system date have on Exchange/Blackberry?
We have Windows Small Business Server 2003 with Exchange and Blackberry installed. SAP Business One and SQL are working smoothly. Now we want to change the system date from the last three months back for some upload work with SQL(SAP). If I could change the date, would my server continue to work smoothly with Exchange [...]
Answer Question
| July 30, 2008 3:30 PM
BlackBerry, BlackBerry Exchange, SBS 2003, SQL, Windows Small Business Server 2003
We have Windows Small Business Server 2003 with Exchange and Blackberry installed. SAP Business One and SQL are working smoothly. Now we want to change the system date from the last three months back for some upload work with SQL(SAP). If I could change the date, would my server continue to work smoothly with Exchange [...]
SQL CurDATE
I need to change the system CURDATE()to CYYMMDD so that I can subtract 2 days to compare to our data. Any suggetions?
Answer Question
| August 7, 2008 8:18 PM
CURDATE, SQL
I need to change the system CURDATE()to CYYMMDD so that I can subtract 2 days to compare to our data. Any suggetions?
Migrating shell scripts
We have to move more than 250 shell scripts from a unix to a linux environment, and also 100 sql scripts. Could you please give me some steps or a check list to follow to migrate these from unix to linux?
Answer Question
| August 4, 2008 4:35 PM
Migration, Scripts, Shell scripts, SQL, SQL scripts, Unix
We have to move more than 250 shell scripts from a unix to a linux environment, and also 100 sql scripts. Could you please give me some steps or a check list to follow to migrate these from unix to linux?
How do i replace a sql tables field value with another value
I have the following script that works in Access but not in sql. I trying to replace the the value in the field “RSAMSTORE” with another value I give it (i.e. 999994, etc.) when the data is displayed. In otherwords when the select distinct is ran instead of seeing the value in the table “RSAMSTORE” [...]
Answer Question
| July 28, 2008 7:18 PM
SQL, SQL scripts, SQL tables
I have the following script that works in Access but not in sql. I trying to replace the the value in the field “RSAMSTORE” with another value I give it (i.e. 999994, etc.) when the data is displayed. In otherwords when the select distinct is ran instead of seeing the value in the table “RSAMSTORE” [...]
Receiving an error consistently in SQL
I receive the following error constantly in SQL: “Notice: Use of deprecated function sql_query in /var/www/html/includes/sql_layer.php on line 43 Notice: Use of deprecated function sql_fetch_array in /var/www/html/includes/sql_layer.php on line 64″ It repeats over and over, and I am not sure how to stop it. Do you have any advice?
Answer Question
| July 28, 2008 3:46 PM
SQL, SQL Server errors
I receive the following error constantly in SQL: “Notice: Use of deprecated function sql_query in /var/www/html/includes/sql_layer.php on line 43 Notice: Use of deprecated function sql_fetch_array in /var/www/html/includes/sql_layer.php on line 64″ It repeats over and over, and I am not sure how to stop it. Do you have any advice?
Catching an uncaptured error in SQL
This is a batch of SQL code I’ve been using: BEGIN TRY begin BULK INSERT DBXMRPAS2.dbo.[STG_drive] FROM ‘Wdmyitpxmdev1xmmsbcpcsvfile20080715drive.200807151100.extracting’ WITH ( MAXERRORS =1000, FIELDTERMINATOR = ‘^’, ROWTERMINATOR = ‘|n’ ) end END TRY BEGIN CATCH SELECT ‘Error Caught’ SELECT ERROR_MESSAGE(), ERROR_NUMBER() END CATCH Why would an error from this statement not be captured by the catch [...]
Answer Question
| July 16, 2008 6:52 PM
CSV, SQL, SQL Server errors
This is a batch of SQL code I’ve been using: BEGIN TRY begin BULK INSERT DBXMRPAS2.dbo.[STG_drive] FROM ‘Wdmyitpxmdev1xmmsbcpcsvfile20080715drive.200807151100.extracting’ WITH ( MAXERRORS =1000, FIELDTERMINATOR = ‘^’, ROWTERMINATOR = ‘|n’ ) end END TRY BEGIN CATCH SELECT ‘Error Caught’ SELECT ERROR_MESSAGE(), ERROR_NUMBER() END CATCH Why would an error from this statement not be captured by the catch [...]
Getting the number of a row from a flat file source in SQL
How might I get the number of a row from a flat file source with a script component in SQL?
Answer Question
| July 15, 2008 6:42 PM
ROW_NUMBER, Scripts, SQL
How might I get the number of a row from a flat file source with a script component in SQL?
Explaining certain functions in SQL
What do the MOD function and the ROUND function do in SQL?
Answer Question
| July 8, 2008 3:48 PM
Functions, SQL, SQL statements
What do the MOD function and the ROUND function do in SQL?
SQL: Using a column created in the SELECT in the WHERE CLAUSE
Can I use a column in the WHERE clause that I created with ‘AS’ in the WHERE clause. I have tried and SQL tells me that the column is not in the table? Thanks, Ray
Answer Question
| July 9, 2008 7:26 PM
SELECT statement, SQL, SQL statements
Can I use a column in the WHERE clause that I created with ‘AS’ in the WHERE clause. I have tried and SQL tells me that the column is not in the table? Thanks, Ray
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?
Answer Question
| July 4, 2008 5:49 PM
Database, Query, SQL, SQL Query, SQL Server
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?
Trim 2 right characters in a string
In sql how would I trim off the 2 right characters in a variable length string
Answer Question
| June 30, 2008 8:13 PM
SQL, Strings
In sql how would I trim off the 2 right characters in a variable length string
excel report from rpg or sql
How do I produce an excel report via RPG or SQL inside an RPG program.
Answer Question
| November 25, 2010 6:07 PM
Microsoft Excel, RPG, SQL
How do I produce an excel report via RPG or SQL inside an RPG program.
Rookie Prolem: Using DIGITS() function on an INTEGER value
Folk, here’s my problem: My SQL knowledge is weak, but I know the basics based on RDBMS work. I have an SQL statement that contains the following statement: SUBSTR(DIGITS(b.SIN),2,9) My output looks like this: “.&114172661″ (Quotes added for clarity. The SIN is a 9 digit INTEGER (114172661). It’s the first two ‘characters’ (“.&”) that have [...]
Answer Question
| July 7, 2008 2:23 PM
DIGITS, SQL, SQL statements
Folk, here’s my problem: My SQL knowledge is weak, but I know the basics based on RDBMS work. I have an SQL statement that contains the following statement: SUBSTR(DIGITS(b.SIN),2,9) My output looks like this: “.&114172661″ (Quotes added for clarity. The SIN is a 9 digit INTEGER (114172661). It’s the first two ‘characters’ (“.&”) that have [...]





