Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Qmoto
  • Content: Threads
  • Order by date
  1. Qmoto

    How do I write this type of query?

    The select statement I'm using to create my view has about 4 joins to get to various files that I need, however, there are two main files that I am pulling data from. One is the orders_current [ oC ] and the other is orders_historical [ oH ]. Here's what I need to do: If I find a record in [...
  2. Qmoto

    10 Character date field (I've tried cast & convert) ...

    Thanks for taking a look at my question. I'm sending data to corporate for analysis by their programmers, However, this past Friday I received the following email (emphasis supplied by me). Here's the problem: The code I'm using was nicely provided by gmmastros over on Link: this thread...
  3. Qmoto

    Strip special characters like [ ¿ · } ]

    Hello Again, I've got some special characters I need to strip out of a field but there are a few rows that do not seem to be affected. Actually, I should say that I have it 90% working, but there are some records with a trailing curly bracket ( } ) that will not leave... *sigh* Ok, here's a...
  4. Qmoto

    Msg 8114, Level 16, State 5, Line 1

    Hello Everyone, I'm trying to combine a view for current orders, and a view for historical orders. The view is created without error, but when I try to query the view I get the following error. The interesting thing is that if I create the views (current / historical) seperatly the query works...
  5. Qmoto

    Which is Faster: Left(), Substring(), or Cast()

    I'm working with a smallish recordset of just over 2 million records. In order to select the correct information, one of the select statements needs only the 5 leftmost characters. Currently I'm using LEFT(col3, 5) Does anyone have any advice as to which of the three methods would be faster...
  6. Qmoto

    Convert cyymmdd to mmddyyyy

    Hello Again, I've got funky date fields coming from an AS/400 that I need to convert to an accepted date by SQL. I'm looking for a fast/correct way to do this for a SQL View I'm creating. Today's date on the iSeries (AS/400) looks like this: 01061204 (ccyymmdd) I need the dates to look like...
  7. Qmoto

    Select a column that doesn't exist.... (hot project)

    Hello everyone, I've got a project that I need to create a view with several columns that I do not have in my database. I'm also supposed to set the columns that don't exist in our database to a default value. I think this is a simple problem, but as I'm no SQL expert I'm at a loss. What...
  8. Qmoto

    Is there a default sql date_mod column/function?

    I have created a simple database along with an import table and script. The import script automatically assigns a datestamp to the datemod field when it's run. This field is being used to identify which records to print. Recently, users have asked that the datemod field auto update when they...
  9. Qmoto

    Help with multidimensional Array...

    How would I turn something like this... public function __construct() { // LINK TYPE // ASSOC KEY, FILE NAME, LINK TEXT $this->KanbanLink_array = array ( 'KANBAN STATUS' => array ( 'CHKRFLST' => array('KanbanStatus.php?p=', 'Check Refill Status'), 'KBSTLE' =>...
  10. Qmoto

    IF ,or chained IF...ELSE IF | Which is faster?

    Here's an snippet of the code I'm using... which do you think would be faster - or does it really make a difference? IF (@FORMVAL NOT IN (SELECT KanbanID FROM KBDATA)) BEGIN DECLARE @ReturnVal decimal(3,0) SET @ReturnVal = '-1' RETURN @ReturnVal END IF (SELECT KBCLR FROM KBDATA WHERE...
  11. Qmoto

    Linked server "x" was unable to begin a distributed transaction.

    Hello Everyone, I’m creating a simple web application in php with SQL 2005 as the backend server. Within SQL I’ve created a linked server to an AS/400 which is supposed to be updated at the end of the stored procedure. However, everything works fine until the procedure tries to insert a record...
  12. Qmoto

    SQL 2000 Import Question

    I've got a excel file I need to upload to the SQL server; seems simple right? However, the comments field in the file I’m trying up import has tabs (or some other special character) and every time I try and do an import, major amounts of data get lost. How can I get the data in cleanly without...
  13. Qmoto

    An error occurred trying to import file.... ?? Grrr!

    Does anyone know how I can get a more detailed error of what's happening, so I can import my excel file into access?
  14. Qmoto

    Why does the "same" code give different results?

    I'm trying to pass the following variables to an MS SQL 2000 server. The first example inputs the correct value [Grant], the second example inputs [NULL]. Any ideas as to why this is, or how I can fix this? Example 1: mssql_bind($sp, "@ZZSALES", $_POST['ZZSALES'], SQLCHAR, FALSE, FALSE, 5)...
  15. Qmoto

    Invalid argument supplied for foreach()

    Could someone please tell me why I am getting an error with this code at line 40... This has been kicking by beginner butt all over town and I'm gettin sick of it! Line 40 is the one containing: foreach ($data as $dat => $d) { echo "<td>$d</td>"; } Here's the actual code... <?php $host...
  16. Qmoto

    Dynamic Dataset?

    I am having problems with a dataset that calls an SQL 2000 stored procedure. Each time the page loads, a record is inserted, then when I hit the submit button a second record is inserted. Is there a way I can specify that a dataset is to load only if a certain condition is true? e.g. the form...
  17. Qmoto

    How do I reference web form fields in a stored procedure?

    This is my first foray into stored procedures and I'm getting the following error: Server: Msg 128, Level 15, State 1, Procedure MultiTableInsert, Line 23 The name 'req_id' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted...
  18. Qmoto

    How do I: Select only first 5 characters in 0-9 char set?

    FYI: I'm using MS SQL 2000 & I'm a noob... (well at least it feels like it) :) Step 1: How do I select only zip code records that fall within 0-9 character set (there are international zipcodes in the data) and trim the them to 5 characters in length? e.g. turn 12345-1234 into 12345 Step 2...
  19. Qmoto

    Not sure how to describe this... sorry

    I'm looking for a way to take a list of files and automatically import that information into an SQL database. For example I have four or five hundred adobe acrobat files in a folder, with a new file automatically generated each morning. What would I need to do in order to get the name of the...
  20. Qmoto

    Setting a default Value for Dynamic Dropdown List

    Hello all, I'm stuck and could really use some help here.... What I've got is an update record page that displays the current values on the left hand side of the window, then next to that I give the user dropdown lists (DDL) to change or ‘update’ the record in the database. What I need to do...

Part and Inventory Search

Back
Top