query returns...empty


I have a table, with one row in it, one of the columns is named bus_userstype this specific column at this specific row has a value of 1.

I am trying to retrieve that value with the below query:
SELECT * FROM busines_users WHERE bus_userstype =1

I am writing the above query not within a PHP script but from with PHPMyAdmin.
The message I get though(from PHPMyAdmin) does not make sense:

MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0005 sec )

How can it return an empty result set if there is a value of 1 as I mention above
Posted On: Sunday 30th of December 2012 10:19:39 PM Total Views:  188
View Complete with Replies

RELATED TOPICS OF Microsoft SQL Server PROGRAMMING LANGUAGE




Sql query for retriving the only 10 records per page

Hi friends... I want to run sql select query command to retrive the 10 records on each page based on the page number. for example if pagenumber = 2 then I want to retrive records only from 20 to 30. Right now what I am doing is that I am selecting the all records and for displaying records from 20 to 30, first I am looping to make cursor to read up to 20th position then from that I am displaying the records. Code: select * from table int loop=pageid*10 while loop sqlreader.read() end while Problem is that for large records it will take lots of time to run this query.. Please suggusts me some better way to do this....
VIEWS ON THIS POST

76

Posted on:

Thursday 25th October 2012
View Replies!

Float type steals my decimal points and money type kills my query

Happy Friday! A while since I have posted a question, and this one is probably real easy. I am trying to store numeric values from a php form in MSSQL 2000 database. However, the columns are set to float and if the value is 1.00, when entered into the table it is saved as 1 If I change the column type to money, the query fails, with an error message of conversion of datatype varchar to datatype money statement terminated. anybody know what I need to do do I need to do something in my query to specify that this is NOT varchar data
VIEWS ON THIS POST

49

Posted on:

Thursday 25th October 2012
View Replies!

A small query problem

, I have a database and I am trying to run a query against it, it returns the data fine, I just want it displayed differently. Here is the example; I am a novice at SQL I dabble here and there so any help would be great! Base Code Select LOA.Account0 as 'Account Name' From local_accounts LOA Where LOA.Account0 like '%Microsoft%' Group by LOA.ACCOUNT0 Account Name Win32_UserAccount.Domain='Microsoft',Name='Jason' I would like the data to be displayed differently in my query. I would like just the domain \ user name to appear in the row. Account Name Microsoft\Jason Does anyone have example code of something like this.
VIEWS ON THIS POST

55

Posted on:

Thursday 25th October 2012
View Replies!

SQL query to convert rows into column

I have detail table like date item_id grade in out ------ ------- ------- ----- ----- 01-01-08 001 A 10 0 02-01-08 001 O 8 0 01-02-08 002 O 1 0 03-01-08 001 T 0 10 02-01-08 003 O 20 0 02-01-08 003 T 0 10 02-01-08 003 B 0 8 Result View ======= Item_id A B O T Total ------- --- ---- --- --- ------- 001 10 0 8 -10 8 002 0 0 1 0 1 003 0 -8 20 -10 2 I want result group by Item_id and sum of grade in column . where grade could be any Alphabet, the column of result query could varies. Each grade contains sum of (in-out) of item_id of detail table. Smartsys99
VIEWS ON THIS POST

50

Posted on:

Thursday 25th October 2012
View Replies!

Need help with query

Hi , I have been working on this query but haven't gotten any luck. I'll give my table structure and then what I need to select. The tables actually contain more columns but I'm only including the relevant columns. User ------ UserId (int) First (varchar) Last (varchar) Program ---------- ProgramId (int) ProgramName (varchar) UserPrograms --------- UserProgramId (int) UserId (int) ProgramId int StartDate (datetime) EndDate (datetime) ***End date can be null, in which case substitute getDate() Primary (bit) ***Primary is either True(1) or False(0) In the UserPrograms table, for each user's record that has Primary = 0, we want every day between that records StartDate and EndDate to fall within another of that user's records Start and EndDate that has primary = 1. So an example of a good set of records would be: userprogramid,userid,programid,startdate,enddate,primary -------------------------------------------------------- 1,1234,3333,'1/1/1991','1/2/1993',0 2,1234,3334,'2/2/1992','3/3/1996',0 3,1234,3335,'1/1/1990','1/1/1997',1 This is good set of records for user 1234 because for every single day between the startdate and enddate that has primary = 0, he has a primary record. the record with userprogramid = 3 has a primary with startdate of 1990 and enddate with 1997. So.. for every day that he had a userprogram that wasn't primary, he also had a record that was primary. Get it Here is a bad record set example userprogramid,userid,programid,startdate,enddate,primary -------------------------------------------------------- 1,1235,3334,'1/1/1991','1/2/1993',0 2,1235,3335,'2/2/1992','3/3/1996',0 3,1235,3339,'1/1/1992','1/1/1997',1 It's a bad record set because for the record with userprogramid = 1, not every single day between 1/1/1991 and 1/2/1993 is in the date range of another record that is primary =1 for user 1234 . So what I need my query to do is to return all id,name of users who have bad sets of records. The only way I could think of doing it was to count days. Someone had suggested to have a calendar table with days spanning from my min entrydate to max enddate but that hasn't made it much easier for me. Anybody have any other ideas\t
VIEWS ON THIS POST

88

Posted on:

Thursday 25th October 2012
View Replies!

Help with a query, please

, relatively new to SQL, here's what I need to do, I've got two tables, CONFLICTS: cols: UID1 [char(3)], UID2 [char(3)] purpose: basically lists pairs of conflicting userID's, the purpose of which I will explain shortly. SCHEDULER: cols: UID [char(3)], TYPE [char(10)], ONDATE [smalldatetime], MODIFIED [smalldatetime], DELETED [bit] purpose: used in a calender to track which UID's have which TYPE of holidays on which ONDATE's. MODIFIED are used to maintenance, and not all that important. I need a query which will return UID, TYPE, and ONDATE from SCHEDULER for any rows where both UID's paired up in a row of the CONFLICTS table share the same date. For example, if in CONFLICTS I have UID1 = LB and UID2 = MD, and in my SCHEDULER I have a holiday entry for both UID = LB and UID = MD occuring on the same ONDATE, those rows in SCHEDULER should be selected.
VIEWS ON THIS POST

51

Posted on:

Thursday 25th October 2012
View Replies!

Mssql query sender

i am familiar with php mySql combo, but from now on the boss wants me on MS SQL. i have a little query sender that used mySql and i tried to switch it over to use mssql_functions like: php Code: Original - php Code mssql_connect($host,$user,$password); mssql_select_db($_POST['database']); mssql_query($cxn,$_POST['query']); mssql_num_rows($result) == 0;
VIEWS ON THIS POST

60

Posted on:

Thursday 25th October 2012
View Replies!

Optimized a 'LIKE' query

let said, i have a table which contains a column with value such as: ,1,2,3,4,5,6, ,3,4,5, ,1,2,4, and then i use the query: select col1, col2 from table (nolock) where (col3 like ',1,' or col3 like ',3,') is there any function which can be used to speed up the query or which more optimized one Maybe something similar to IN(xxxx,xxxx,xxxx)
VIEWS ON THIS POST

47

Posted on:

Thursday 25th October 2012
View Replies!

Subquery does not work

In the query below the subquery in RED does not work. It displays the following error message: Server: Msg 512, Level 16, State 1, Line 7 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, = or when the subquery is used as an expression. If I comment out the subquery, everything works fine. Code: Declare @DateFrom Datetime Declare @DateTo Datetime Set @DateFrom = '12/1/05' Set @DateTo = '12/15/06' SELECT L.LeadId, L.LeadDate, L.BusinessName, U.Firstname + ' ' + U.Lastname AS LeadRep, (SELECT COUNT(L.LeadId) AS TotalLeads FROM Leads L WHERE L.LeadDate BETWEEN @DateFrom AND @DateTo) AS TotalLeads, (SELECT COUNT(A.DealId) AS TotalDeals FROM AccountInfo A LEFT OUTER JOIN MerchantInfo M ON A.DealId = M.DealId LEFT OUTER JOIN Leads L ON M.LeadInfoId = L.LeadId WHERE (A.ValidationDate BETWEEN @DateFrom AND @DateTo) AND (A.IsValidated = 1) AND (L.HowSoonId = 10 OR L.HowSoonId = 12 OR L.HowSoonId = 14 OR L.HowSoonId = 16)) AS TotalProcessingDeals, CASE WHEN A.IsValidated = 1 THEN 'YES' ELSE 'NO' END AS Validated, AST.Status, (Select A.ExpectedMonthlySales From AccountInfo A Where A.IsValidated = 1)AS ExpectedMonthlySales FROM Leads L LEFT OUTER JOIN UserMap U ON L.SalesRepId = U.UserId LEFT OUTER JOIN MerchantInfo M ON L.LeadId = M.LeadInfoId LEFT OUTER JOIN AccountInfo A ON M.DealId = A.DealId LEFT OUTER JOIN AccountStatus AST ON A.StatusId = AST.StatusId WHERE (L.LeadDate BETWEEN @DateFrom AND @DateTo) AND (L.HowSoonId = 10 OR L.HowSoonId = 12 OR L.HowSoonId = 14 OR L.HowSoonId = 16) ORDER BY L.LeadDate I cannot figure out this puzzle.
VIEWS ON THIS POST

48

Posted on:

Thursday 25th October 2012
View Replies!

Convoluted query trouble

Our Client/Contact database works like this: CLIENTDB - This table holds the records of all Clients, Contacts, Suppliers, etc. They are defined as one type of record or another by the 'Contact_Type' field - Clients are type 'B', Contacts are 'D', etc. Contacts are often linked to a Client, but don't have to be. These links are stored in the LINKS table. So, what I'm trying to do, is generate a report of all Contacts that aren't linked to Clients but possibly should be because they share a company name. The SQL I've used to get this info is as follows: SELECT *, CLIENTDB.Formal_Name as FN FROM CLIENTDB WHERE (CLIENTDB.Contact_Type = 'D') AND (NOT EXISTS (SELECT * FROM CLIENTDB, LINKS JOIN CLIENTDB as CB ON CLIENTDB.Contact_ID = LINKS.Link_Record_ID)) AND (EXISTS (SELECT * FROM CLIENTDB WHERE (CLIENTDB.Contact_Type = 'B') AND (lower(CLIENTDB.Formal_Name) LIKE '$FN'))) The problem is the final AND condition - I want this to filter the results down to only those Contacts that have a Formal_Name like an existing Client, but when I add or remove this one line, it makes no difference to the output. Any suggestions greatly appreciated
VIEWS ON THIS POST

57

Posted on:

Friday 26th October 2012
View Replies!

Referencing data from a query

I'm quite new to using t-sql, so hopefully the answer to this should be fairly simple... I have the following basic stored procedure: Quote: CREATE PROCEDURE dbo.SP_Check_Login ( @arg_UserEmail VARCHAR(255), @arg_UserPassword VARCHAR(255)) AS BEGIN SELECT a.userArchived,a.userPasswordDate FROM app_users a WHERE a.userEmail = @arg_UserEmail AND a.userPassword = @arg_UserPassword END; GO What I want to do is some conditional statements on the query results. i.e: IF (userArchived = 1) RETURN "Archived" ELSE IF (userPasswordDate < dateadd(month,-3,getdate()) RETURN "UpdatePassword" ELSE RETURN "OK" So firstly how to I reference the data returned by the query, and secondly am I on the right track with the conditional code
VIEWS ON THIS POST

102

Posted on:

Friday 26th October 2012
View Replies!

search a column of comma delimited numbers (was "help with sql query")

I need to search a column in my database (varchar:50) that contains a comma delimited string of numbers (i.e. 1, 2, 3, 4, 5, 10). Currently, I am doing the following SQL query: SELECT * FROM people WHERE clubs_belongs_to LIKE '%1%' Where 1 is the number I'm searching for. The problem with the query above is that it returns records that contain 1, 10, 11, 12, 13, etc. in the clubs_belongs_to field. I want the query to only return those people who belong to club number 1, not 10, 11, 12, etc. Please help.
VIEWS ON THIS POST

99

Posted on:

Friday 26th October 2012
View Replies!

add checkbox column to access table (was "SQL query help.., please, any one??")

good people of this forum.. I am working on an eccess db, and using asp to update, change and so on... I want to add dynamicly a field to the db, using the ALTER TABLE command, but for some reson I can't find a way to make it work, the field type I am trying to add is boolean, and I want it to show up in the actual db as a checkbox, and not as a bit field (0/1), so I've been trying this and non of them work, and I couldn't find any sites with examples for this... any help would be very appricated..., this is what I've tryed so far and didn't work: "ALTER TABLE [Users] ADD [CHILD] boolean" "ALTER TABLE [Users] ADD [CHILD] boolean False" "ALTER TABLE [Users] ADD [CHILD] boolean(f)" "ALTER TABLE [Users] ADD [CHILD] boolean f" me out on this\t
VIEWS ON THIS POST

215

Posted on:

Friday 26th October 2012
View Replies!

Greater/Less than query from within subsets of results

I think I'm trying to do a simple query on maximum date. I've got 100 tools that have been used over the past three years. Some of the tools are used almost every day. Other tools haven't been used for a month, while other tools haven't been used for a year or more. Ultimately I'm trying to just find the list of tools whose latest date of use was a year ago. I have a list of tools and a list of times each tool was used. I think I'm going to have to do a search that for each tool what was the times it was used. That I can do. What I'm not sure of is how to then pull only the latest date for each tool. Once I get that I can then do a query off that result to pull the "oldest latest" date of use.
VIEWS ON THIS POST

168

Posted on:

Friday 26th October 2012
View Replies!

Trying to pull data from 2 tables into a query

I'm trying to create a SQL query to pull together a job info table and a customer info table in an Access DB. We can't have a unique ID on the customer that we can store in the job table because the customer info is dumped from Exchange and the ID (row number) in the cust_List table will change each time we export from Exchange. What I need to do is go through jobs, get the CO_ID, the CONTACT_LN and the CONTACT_FN and then match it against Customer_List>Account, Lastname, Firstname. Any ideas
VIEWS ON THIS POST

213

Posted on:

Friday 26th October 2012
View Replies!

specialization query problem

Two queries need to be joined such that the TSL-named column values are all unique. That is, only unique TSL values are returned in the result set (with the highest degree of specialization represented by ISO3166 - Country/Region Codes.) Query 1 returns: TSL ISO3166-1 ISO3166-2 x -- US y -- US Query 2 returns: TSL ISO3166-1 ISO3166-2 x US-WA -- Deed join result: TSL ISO3166-1 ISO3166-2 y -- US x US-WA -- How do I create a query such that if a TSL value exists in both query 1 and 2 that is the same, x in this case, that the row from query 2 (US-WA is more specialized than US) is taken over query 1 results. The two queries are actually from the same table.
VIEWS ON THIS POST

101

Posted on:

Friday 26th October 2012
View Replies!

Problems with query statement

I have the following query: Code: SELECT COUNT(Hit.fileID) AS counter, Hit.fileID, FileDetail.* FROM Hit,FileDetail WHERE (FileDetail.fileID = Hit.fileID) GROUP BY Hit.fileID Tables look like this: Code: Hit: [ hitId - pri key fileId - for key date other stuff ] FileDetail: [ fileId - pri key file name file type ] I want to count the number of times that each file appears in the hits table. The output I require is : fileId, name, type, number of times in hit table.... I know this is probably pretty simple but I keep getting silly errors
VIEWS ON THIS POST

121

Posted on:

Friday 26th October 2012
View Replies!

View the SQL query out-put in horizontal format.

I have the following SQL query that I like to view the out put in horizontal format: Select ID, First_name, Last_name from ABC Instead of getting out-put like Id First_name Last_name 1 Jim Smith 2 Tom Jones I like to see the out-put like: Id 1 2 First_name Jim Smith Last_name Tom Jones Please advice.
VIEWS ON THIS POST

158

Posted on:

Friday 26th October 2012
View Replies!

query help

Im trying to do a query to extract all the records from one table that are not in another table. Essentially the unique records from two tables. Not sure of the query though. Any ideas.
VIEWS ON THIS POST

114

Posted on:

Friday 26th October 2012
View Replies!

Use calculated field in same query

Right now I have one view that grabs records and sums up related records etc.... and returns a result. So basically it has the ID number and the number I calculated. THen I have another view that takes that number and performs calculations on it into three different columns. Is there any way to make these two view into one without a lot of repetative statements Here is an example: SELECT (tblTest.Quantity * tblTest.Price) as SubTotal, SubTotal * 1.06 as Total Obviously that doesn't work, but what could I do to get that basic thing to work
VIEWS ON THIS POST

112

Posted on:

Friday 26th October 2012
View Replies!

MS query help

This is for a college project: I am trying to average all records of the same ID but also have it do the same for all of the IDs within the same query. Is their a way of doing this From Tables Sow/Gilt ID Litter NumberBornLive
VIEWS ON THIS POST

126

Posted on:

Friday 26th October 2012
View Replies!

Help with query. Joins? Unions?

I have a few tables that I want to query and I need the output back in a certain way. This is an example of my problem. Users Table: ID, UserName 1 , Fred 2 , Bill DVD Table: ID, DVDName 1 , XMEN 2 , Terminiator 2 3 , MontyPhthon Holy Grail VHS Table: ID, VHSName 1 , Terminator 2 , StarWars DVD Users table: ID, UserID, DVD_ID 1 , 1 , 1 2 , 1 , 3 3 , 2 , 1 4 , 2 , 2 VHS Users Table: ID, UserID, VHS_ID 1 , 2 , 1 3 , 1 , 2 So, each person might 0 or more DVDs and 0 or more VHS. What I need to output is a flat table something like this. User, DVD , VHS Fred, XMEN , Fred, MontyPhthon Holy Grail , Fred, , StarWars Bill , XMEN , Bill , Terminator 2 , Bill , , Terminator What I am getting is something like. User, DVD , VHS Fred, XMEN , StarWars Fred, MontyPhthon Holy Grail , StarWars Bill , XMEN , Terminator Bill , Terminator 2 , Terminator
VIEWS ON THIS POST

88

Posted on:

Friday 26th October 2012
View Replies!

SQL query brainfade

Hi . New guy here. Ok, here's a project that I have. I'm wondering if anyone can give me insight if it's possible. Ok, I have two different tables. One contains a size code for an item we sell such as (along with measurements specific to that code, that are not important at this point) For information purposes, the table name is "size_data" and the value below is "size_code", which is the primary key in the table. THS-101 THS-102 THS-103 .... ... . I have another table that contains that material data that they're using. This has a code as well of : 700 701 702 727 728 ... .. . That table is called "material_data" and the value is "material_code", which is the primary code in that table. Now, what I want to do is concatenate the values, but in every combination possible so that we can document every possible combination of the numbers. For an output example: THS-101-700 THS-101-701 .. .. . THS-102-700 THS-102-701 THS-102-702 .. .. . Is a query like that even possible with SQL I can't figure it out and I'm spinning my wheels. I just want to take the first entry of one table, concatenate it to all the combinations of the second table.........go the next entry of the first table and concatenate it to all the combinations of the second table, and so on. Anybody able to help me out on this one\t
VIEWS ON THIS POST

101

Posted on:

Friday 26th October 2012
View Replies!

sql query in an asp page

hi..i am trying to read in record from a databse located in the web server... i am trying to do this sql query in an asp page..so this is an asp code...i have written the code as this just asking that is there any thing wrong with this sql query....because my page isn;t showing...and i donno if it is the right way to connect different tables...please help
VIEWS ON THIS POST

103

Posted on:

Friday 26th October 2012
View Replies!

joining a view to match main data in search query

I am currently building a telephone directory, i'm at the stage where I have the search functions runing smoothly. Except the way I have the database set up is that the main table holds the business type as a numeral which was entered from another table with coresponding names. I have built views to tie these two tables together. Now once a person searchs the listings they currently recieve a page of results, it is here that the problem occurs. I need to to in my sql statment tie the main table of data to the view to pull the business type name out instead of the business type numeral which is contained within the main data table. Here is my current Sql Statement: SELECT * FROM dbo.MAIN, dbo.VIEW_BUSINESS_NAME WHERE ENTRY_TYPE LIKE 'varSearchType' AND LAST_NAME LIKE '%varName%' AND INITIAL LIKE '%varInitial%' AND STREET_NAME LIKE 'varStreet' AND STATE LIKE 'varState' AND REGION LIKE 'varRegion' AND BUSINESS_TYPE LIKE 'varBusinessType' AND dbo.VIEW_BUSINESS_NAME.Expr1 = dbo.MAIN.BUSINESS_TYPE ORDER BY LAST_NAME It is being put together in dreamweaver mx. This is returning a multiple list of the one business repeated for as many listings as there are for that business type! Hope this makes sense it's very early in the morning.
VIEWS ON THIS POST

156

Posted on:

Friday 26th October 2012
View Replies!

sql query question...

Here is a snippet of my query..... select top 500 MAX (distinct userip), count(*) as hits, username, sum( convert( bigint, bytecount))/1024 as bytecount_MB, 0 as blocks from webproxy.dbo.transactionsunday group by userip, username union select distinct userip, 0 as hits, username, 0 as bytecount_MB, count(*) as blocks from webproxy.dbo.transactionsunday where status = '403' group by userip, username How can I get the same 500 userips from the first part, queried in the second part
VIEWS ON THIS POST

115

Posted on:

Friday 26th October 2012
View Replies!

ASP writing datetime to MS SQL (used to write to Access)

We have just begun the process of converting the datbase from Access 2000 to MS SQL Server 2000. I want to be able to write a null value to a datetime field(column); but I always get 1/1/1900 for a value. I want to be able to write a time value to a datetime field(column); but it is always prefixed with 1/1/1900. Am I asking/attempting the impossible! TIA, Chuck , You should NEVER allow NULL values in SQL Server, it can seriously hinder query performance. You should always set a default value on all of your columns.
VIEWS ON THIS POST

151

Posted on:

Wednesday 7th November 2012
View Replies!

Search Algorithm/Full Text Search

Hi , I want to search 27 millions of records within 2-3 seconds. when I run the T-SQL query it will take 45 seconds to give me result. Please give me some proper search algorithm to sort this out. Can I use Full Text Search Can I take this data in xml file and do search on that I used .net to accomplished this search task. waiting for positive reply.
VIEWS ON THIS POST

45

Posted on:

Tuesday 20th November 2012
View Replies!

Mapped Credentials

Hiya, I need to use Mapped Credentials in SQL Server (2008), so i'd just like clarification on what i'm doing. I am mapping to Active Directory user accounts. 1) Create the Credential in SQL Server, choosing the AD user account to be mapped 2) Create a SQL auth. User Account (Security > Logins), using the 'Map to Credential', choosing the Credential I created in step 1 However, during the creation of the credential (step 1), it asks me for a dedicated password. I would like for this to use the AD user password as we forcefully change user passwords every 6 weeks, and the fact I have to put something in makes me think it is a seperate password to the AD one. Is that the case
VIEWS ON THIS POST

52

Posted on:

Tuesday 20th November 2012
View Replies!

Business intelligence using olap

hello m currently working on a project of business intelligence.Its my final year project. i m having a company database n i have 2 analyze it n generate queries by finding patterns and create a report.how should i start the project\t\t i have database in the form of excel sheets.i have integrated d database in sql server 2008. i want 2 use business intelligence studio(visual studio 2008) as a front end and sql server 2008 as backend. is it possible\t where shud i write queries\t how do i connect sql 2008 wid visual studio\t should i use d analysis project in visual studio\t plzz help...!!!1 thanx.... sql2008
VIEWS ON THIS POST

68

Posted on:

Tuesday 20th November 2012
View Replies!

Cannot paste my text into column

Hi , I'm have a strange situation with SQL Server 2000. I am trying to paste this into a VARCHAR (8000): Admittedly this is a long piece of text but running a little letter count application I know that it is only 1211 characters long. However when I paste the above text into SQL Server I get this warning: "The value you entered not consistent with the data type or length of the column." I read on the web a little and discovered that somebody had this problem and they had used NVARCHAR instead which fixed it for them, this has not worked for myself though. Does anyone have any idea what SQL is objecting to
VIEWS ON THIS POST

68

Posted on:

Tuesday 20th November 2012
View Replies!

MSDE And remote connections

We have done a programme that connects to a SQL 2000 SERVER with ADO librarys, and it works ok both using ip address and machine names. But the same programme fails if it trys to connect to a MSDE, if the MSDE and the client programme are in differents machines. On the other hand it works propperly if MSDE and the client programme are in the same machine (DATA SOURCE=(local) in the connection string). Is that normal Should MSDE answer to remote connections Thank you very much for your help.
VIEWS ON THIS POST

89

Posted on:

Tuesday 20th November 2012
View Replies!

How to store/append images to DB

Hi I have worked in SQL/DBs but never had an experience of adding/appending images. Simply i want to display images on my website but these images are that of the ads that I'll receive from vendors so they can't be hard coded and will be changes on daily if not weekly basis. The following link explained the ways of accomplishing this but forbade from the first two. 1. Store images right into the DB (Doesn't recommends) 2. Store images (image data) inside a binary field (Doesn't recommends) 3. Store (upload) images in the folder and just upload the address to it. The third one is recommended (is this really the best one) but the article also says that The only problem to this approach is that you must synchronize the data in the link field with your file system. What does that mean Please elaborate. What and how do we synchronize CB
VIEWS ON THIS POST

62

Posted on:

Tuesday 20th November 2012
View Replies!

Counting number of columns that contain data

I got a table with 10 column. I would like to count the total of column from A1 - A8 which contain with data for a particular record. Example: Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- ID No. A1 A2 A3 A4 A5 A6 A7 A8 with the data as such: 01. 10 x1 x2 x3 x4 The above example should return value "4". Cause from column A1 to A8... only 4 column is filled with data. Is there such query to perform the count
VIEWS ON THIS POST

90

Posted on:

Tuesday 20th November 2012
View Replies!

Looping info into an SQL function

Hi I need to get a list of numbers from an sql satement i.e SELECT name_ctr FROM actNamePropertyAddressView then I need to do a loop inserting the name_ctr value in the procedure below select dbo.funnucNamePostAddress(name_ctr), 'pr', 0, GETDATE()) then I need to output the results I would appreciate any feedback on this
VIEWS ON THIS POST

74

Posted on:

Tuesday 20th November 2012
View Replies!

Confused...?

all, I've been using access for most of my applications but have decided to pickup a copy of MS SQL7 w 10 Cal to learn. I purchased an open box of the software and it contained one cd, license agreements, and manual. But when I attempt to install I get an error stating 'incorrect machine type'. The cd states Alpha Processor. Am I missing a cd for x86 Server Specs: 1.9 GHz Pent 4 4 - 100 Gig IDE drives 1 gig ram Windows 2000 Server ADV
VIEWS ON THIS POST

94

Posted on:

Tuesday 20th November 2012
View Replies!

All I want for the Holidays...

The feeling of the holiday season is in the air: people are whistling, the birds are migrating, and Old Jack Frost has decided to pay a visit once more. Of course, when youre in South Florida, that means that the air outside has dropped to a nippy 22 degrees Celsius, that is. Yes, the sweater inducing room temperature is almost too much for us Floridians to handle, but we get through. When it gets this nice and cool, one cant help but be happy, think about music, love, and look nostalgically back at sitting down in front of a warm glow, taking in some of those wonderful holiday treats: Cookies, Cocoa, and HotJava. In fact, this time of year makes me think of that wonderful holiday classic, The Night Santa Went Crazy, by the masterful Al Yankovick; its what I like listening to on the long drives from Ft. Lauderdale to the frozen tundra of Tampa, FL, where my family takes residence. Its always interesting to pull up next to the house and see them there, enjoying the weather next to their Igloo. Holiday traveling: theres nothing in the world like it. Of course, the feeling of the holiday season isnt just about temperatures, travels, and things remembered. To a great many of us, this is the season for giving kind of like celebrating a month long birthday party. Of course, we here at Developer Shed are always in the giving spirit towards our readers, which is why this month were giving away a FREE Sound Blaster MP3+ USB External Sound Card. Thats right, folks, you no longer have to sit through those long flights and drives with nothing more than the crappy sound card your laptop or PDA came with. This nice little item allows you to have high quality sound in even the most aurally challenged portable devices. This is truly a highly deed item, by man and beast alike! But how, pray tell, do you enter this months giveaway The rules are simple: 1) Write and submit an article to norbert@developershed.com, with the subject "Developer Shed MP3+ Contest" for publication in any of our websites and win this awesome device, featured in an upcoming review. (Don't worry. The review was written before our marketing monks came up with the contest, so the review's content has not been affected.) The article, a tutorial, hardware review, tech-oriented personal experience tale, or news-worthy report on a tech related field (no corporate business coverage of X, Inc. is suing Y.com, please), must be about one of the topics covered on one of the following websites: Dev Shed, ASP Free, Dev Articles, Dev Hardware, and SEO Chat. This pretty much covers all aspects of development and todays technology. The article must be at least 1500 words in length, subdivided into at least 5 pages of information. (Check out http://www.devhardware.com/hardware/how-to/809,1/ for an example of what were looking for.) 2) The Contest runs until December 31, 2003, so your article must be in by that time. Articles may be submitted in the following formats: DOC, SWX, RTF, TXT, and HTML (please do not use the Save as HTML function in MS Word or Star Office). If there are images in the story, please send them in a .ZIP file containing both the pictures and the article. Articles (and inquiries) should be sent to norbert@developershed.com, with the subject "Developer Shed Contest Entry." 3) Judging will look at subject matter, quality of content (so make it interesting), and grammar. In fact, chances are that if we have to edit it, you ain't winning. It might still be published, so not all is lost! You may yet still have the chance at the fame and geek chic that comes with having your writings read by millions worldwide. I don't want to have to spend three days correcting grammatical mistakes, though - I'm not your English teacher, daing it! By submitting an article you agree to give Developer Shed exclusive publication rights to the story. the credit for genius, however, will stay with you, so no worries about my placing our grubby little name on the story and claiming that its our brainchild. The winner will be announced on the website and via phone call, or e-mail, or IM which ever is easiest to reach him/her at. Start your typing!!! Gnorb P.S. Check this posting once in a while in case there's something which needs to be changed in the contest rules.
VIEWS ON THIS POST

101

Posted on:

Tuesday 20th November 2012
View Replies!

Odd date/locale issue

We are having a problem updating a datetime field via an ASP script. The ASP script is executing a stored procedure and passing it a datetime in the format '2008-08-01 00:00:00'. However, the database is storing this as the 8th of January 2008. If I run the exact SQL query that the ASP script does through the SQL Server Management Studio then the date is stored correctly as the 1st of August 2008. Any clues I'm at a total loss.
VIEWS ON THIS POST

75

Posted on:

Tuesday 20th November 2012
View Replies!

Spid auto clearing time

everybody, We tries to connect to the database, a new process (SPID) is created. Even when we close all connections properly, the SPID remains and it is automatically cleared after some time locally. On our hosting server we see that the SPIDs are not cleared for quite long time. any SPs/functions idea on finding out the clearing time
VIEWS ON THIS POST

104

Posted on:

Tuesday 20th November 2012
View Replies!

SQL connection question

Hi , so far i'm only using MS Access database, and i'm also using the following connection: Code: my question is, if i decide to move to MySQL, can i still use the same connection as above, and if not what should be changed also does the Access database need to be converted to MySQL database and how can i do that Finally i'm using 7host.com to host the asp files and the database, how can i upload the MySQL database and access it from the asp files also would the code in the asp files change if the database is changed, like( SQL commands) thx in adv..
VIEWS ON THIS POST

141

Posted on:

Tuesday 20th November 2012
View Replies!

Query: datetime dataType issues

Hi. I have a table with a datetime DataType. The datetime is stored like such: 11/23/2004 11:23:45 AM If I try to query my data by a specific date '11/23/2004' no records are returned. If I try to do a date range BETWEEN '11/23/2004 12:00:01 AM' AND '11/23/2004 11:59:59 PM' my webpage throws back and error.
VIEWS ON THIS POST

157

Posted on:

Tuesday 20th November 2012
View Replies!

DTS - using multiple data sources

How do I use a view or query that references two different data sources ie 1 Oracle (APPPCT_PROJECT_TYPE ) and 1 table within my Sql. (ProjectTypes) I want to use a query that looks and the data in the Oracle table compares it against my current table to determine if there are differenes and if so update current table with the differences in the data. This is the query I would have used in Access: Help me to convert it use using DTS. INSERT INTO ProjectTypes ( ProjectTypeCode, ProjectTypeDescrip, ProjectCatagory, ProjectClass, CapitalProjectNum, DateCreated, UserCreated, DateModified, UserModified ) SELECT APPPCT_PROJECT_TYPE.ID, APPPCT_PROJECT_TYPE.DESCR, APPPCT_PROJECT_TYPE.PROJ_DESCR_CATEGORY, APPPCT_PROJECT_TYPE.PROJ_CLASS, APPPCT_PROJECT_TYPE.CPN, Now() AS Expr1, "import" AS Expr2, Now() AS Expr3, "import" AS Expr4 FROM APPPCT_PROJECT_TYPE LEFT JOIN ProjectTypesON APPPCT_PROJECT_TYPE.ID = ProjectTypes.ProjectTypeCode WHERE (((ProjectTypes.ProjectTypeCode) Is Null)); Any assistance in this mater is greatly appreciated. Sincerely, Karen
VIEWS ON THIS POST

198

Posted on:

Tuesday 20th November 2012
View Replies!

Link request

, Does anyone have any website links related to SQL Server 2000 table relationships I can't get my 1-n relationship to work properly plz help,
VIEWS ON THIS POST

71

Posted on:

Tuesday 20th November 2012
View Replies!

Urgent! Please help. Can't insert!

I am running SQL2000 on W2k server. Everything was working fine untill sometime yesterday. in a sudden, I was not able to insert into my database table. I can do select, and I can even run sp_columns on the table, but when I try to INSERT, I get the following error ... Server: Msg 208, Level 16, State 3, Line 4 Invalid object name [tablename]. The insert statment should be working fine as they were run before the problem occurs! Has anyone ran into this before Any input is appreciated!
VIEWS ON THIS POST

103

Posted on:

Wednesday 21st November 2012
View Replies!

Query problem with 2 FK in table

, I have a problem with a query... and 2 tables I want to associate each travel with a departure and an arrival port. I keep all the ports in another table TravelsTable - Travel_ID(pk) ; DeparturePort(fk) ; ArrivalPort(fk) PortTable - Port_ID(pk) ; PortLocation my two foreign keys in the TravelsTable are linked to the Port_ID in the PortTable... so I have records like this in the Tables Travel_ID=1 DeparturePort = 1 ArrivalPort = 4 Travel_ID=2 DeparturePort = 3 ArrivalPort = 2 Travel_ID=3 DeparturePort = 4 ArrivalPort = 5 Port Table Port_ID=1 PortLocation= London Port_ID=2 PortLocation= Le Havre Port_ID=3 PortLocation= New York Port_ID=4 PortLocation= La Rochelle Port_ID=5 PortLocation= Zeebrugge ---------------- What I need is to have a list with the Name of the departure/arrival ports... I need something like this Travel_ID Departure Arrival 1 London La Rochelle 2 New York Le Havre .... Can you help me writing this query, in SQL I read about joins but I can't seem to put things together... I'm not even sure is the way to do it
VIEWS ON THIS POST

98

Posted on:

Monday 26th November 2012
View Replies!

Concatenate records from a sub-query together.

Hi , I'm building a website for a floor-tiles company and Im currently working on the online sample request section. I have a table called tblRequest and another table called tblSample. tblSample stores a list of information on all of the tiles available and tblRequest contains info on each request made by a customer. I have a third table calledtblSampleRequest which basically acts as the middle man for the many-to-many relationship between tblRequest and tblSample... tblRequest -> tblSampleRequest
VIEWS ON THIS POST

133

Posted on:

Monday 26th November 2012
View Replies!

passing parameter to stored procedure in Access

This is my first time using sql server and there's lots I'm still figuring out. I know how to pass a parameter to a stored procedure when my stored procedure is the data source for a report. But this is different - I created a stored procedure that gives data needed for a mail merge. The caseID is variable. I have a button on my case form that, when clicked, outputs the stored procedure to an excel document so that it can be used as a mail merge source. Right now it (as expected) prompts the user to enter the Case ID. But that is a hidden field anyway. I want to take the Case ID from the current record and make it the value of @CaseID. Can anyone tell me how to do this
VIEWS ON THIS POST

113

Posted on:

Monday 26th November 2012
View Replies!

what's the error in my mssql statement? :(

hi i always used this type of command PHP Code: \t\tresponse.write("") \t\t\t\tresponse.write("") \t\t\t\tresponse.write("") \t\t\t\tresponse.write("") \t\t\tresponse.write("") to send out my data to mssql.. but problems will occur when the users fill in the CommonName fields with values with whitespaces and/or ' how should i fix this in java there's some method called preparedstatement.. how about in asp any help is greatly appreciated.
VIEWS ON THIS POST

126

Posted on:

Monday 26th November 2012
View Replies!

dsn problem?????urgent

hi... at one server my asp files & at other server my sql database. i had created dsn for connection.....and now i m using this dsn to my asp files which is at other server......it gives me invalid connection or connection is closed........ can any one tell me proper way to uset it......... its urgent..........thanx
VIEWS ON THIS POST

116

Posted on:

Monday 26th November 2012
View Replies!

Extraneous spaces in job text output

Hi Rather than providing several web-based reports for the company directors, I've opted to produce these with the SQL Server Agent by running the queries as overnight jobs and sending the output to .txt files in a secure folder Everything is absolutely fine apart from the fact that the reports always have masses of white space between columns: Code: See attachment Is anybody aware of what causes there to be so much space between columns and if it's possible to reformat the report or the query to stop it
VIEWS ON THIS POST

108

Posted on:

Monday 26th November 2012
View Replies!