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 strongm 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: *

  1. Connatic

    Select where Value is between 2 Column Values ??

    Doh!, I really was asleep this morning, couldn't think SQL, now with brain fully functioning, i have easily done this Query myself using the BETWEEN function! -Richard
  2. Connatic

    Select where Value is between 2 Column Values ??

    I am having a problem with a query, and because it is Monday morning i don't think my Brain is quite working properly yet, so maybe some one can help me out ? I have a table in which i have 2 Columns (see below) Start No / End No __________________ 1! 200 ! 300 2! 400 ! 500 3! 600...
  3. Connatic

    Tricky Update Query !!!

    Thanks PH, but for some reason this didn't seem to work quite right. And finally today, the Informix DBA guy at my work had some time free & and has written me a stored procedure using Informix 4GL that does the job spot on ! Thanks Anyway, i think i learned something from this !
  4. Connatic

    Tricky Update Query !!!

    Thanks for replying so quick PH, but how can i get the WHERE clause to bring back the 50 OLDEST records with out doing an Order by ????? WHERE req_Created = ???? If you could tell me that it would solve my problem !!!! Cheers Richard
  5. Connatic

    Tricky Update Query !!!

    Thanks for that Nigel, but that wont work in Informix, as firstly 'top' is not a key word, you need to use 'first' and temp tables work differently ! Anybody know how i can get this to work with an Informix database ????? Or does anybody know of a good informix forum where i could ask this...
  6. Connatic

    Tricky Update Query !!!

    I have a query where i need to Update the Top 50 records of a resultset. The way i figured to do this was, Select the Top 50 of the records i want into a temporary table, and then update from the table. The problem with this is that i need to Order the 50 by Date, so i am getting the 50 oldest...
  7. Connatic

    Select ... Where ... IsNumeric ????

    Hi SQLBill, I knew that the where clause was wrong, i had been hoping that i could use Is Numeric the same as is null Which works fine in the WHERE clause like: SELECT LinkRef FROM Derivedaddresses WHERE LinkRef is null Obviously i can't, but i thought my examples would show what i was...
  8. Connatic

    Select ... Where ... IsNumeric ????

    Cheers guys, that worked spot on !
  9. Connatic

    Select ... Where ... IsNumeric ????

    I feel that i should know how to do this but the ways i have tried don't work; SELECT linkref FROM Derivedaddresses WHERE right(linkref,1) IS NUMERIC SELECT linkref FROM Derivedaddresses WHERE ISNUMERIC(right(linkref,1)) linkref is a varchar field, and has both Alpha ~& numeric...
  10. Connatic

    Removing Double Spaces from a field ???

    Hi, I have an Address Field in a table, that is a bit of a mess, and I am trying to clean it up. The first step I would like to do is to remove all the Double spaces for the records in this column, and by this I mean, reducing any double space to a single space! Joe Bloggs --> would become...
  11. Connatic

    Still problems with Stored Proc...

    FattyFatPants, i think your problem is to do with your table fields ! Am i right when i think you are saying the Values of cost.cbiper & periodt.pe would be in a format of e.g. - '06030404' If this is the case then they will be giving you the conversion error !!!
  12. Connatic

    Scheduled DTS package always fails.

    I believe that when you run a DTS from a SQL Statement or by Executing it manually you will be running it LOCALLY, where as SQL Server JOBS run on the SERVER machine. It may just be a case of permissions !!!
  13. Connatic

    Still problems with Stored Proc...

    Have you tried Converting the Date Values you want to use into smallDateTime, outside of the SELECT statement, so you can see if that is the problem. Example: If the Char Dates wont Convert using DECLARE @TestDateConversion as smalldatetime set TestDateConversion = cast(@EndBillPer as...
  14. Connatic

    Trying to Create a query that queries 2 different DBs!!!

    Oh i forgot to add, the syntax for using a linked server after you have created it is [LinkedServerName].[DBName].[TableName].[fieldname] You may want to alias in the WHERE statement as SQL server doesn't like you using 3 dots like above in a statement. So, SELECT * FROM...
  15. Connatic

    Trying to Create a query that queries 2 different DBs!!!

    ArtieChoke is correct, if you go to the Security tab in SQL Server Engine, and expand it, you should see an option called LINKED SERVERS! By bringing up the right click menu (on the Right Pane) you can select Create New Linked Server, here you need to give details about the Server you want to...
  16. Connatic

    Local Variables - benefits

    In your examples, thier is no difference, both will run exactly the same. Where Variables come in very useful in the above context is in Stored Procedures. If you want @find to be dynamic, then create it as a parameter for a stored procedure, then each time you run the Stored Proc, you can...
  17. Connatic

    How to make query use an Indexed View ?

    Have tried your suggestion HROARKE, but it seems that thier is something different about 1 server we are using from the others. You see i have even gone as far as detaching the database and re-attaching it on two different servers now!, and yet my query runs in 1 second on one server and 6...
  18. Connatic

    Something like Oracle's ntile function?

    What does Oracle's ntile function do ? if you post this, you may get more help, as i for one have no idea what it does, and therefore can't tell you what it's SQL Server equivalent is !
  19. Connatic

    Can this be done?

    It can be done, but your syntax is wrong. Sorry don't have the time to give example now, but basically you cannot put your 'LEFT JOIN ... ON' command next to the update statement, it must come after the WHERE statement !
  20. Connatic

    Configuring ODBC With An SQL Server Database.

    Is almost the same as for an access database. Go to your Datasources[ODBC] in Admin Tools in Control Panel. Select Add to add a dsn, then Where it asks you for a driver, go to the very bottom of the list and select SQL SERVER. The rest is easy, just follow the Wizard, giving a name for your...

Part and Inventory Search

Back
Top