(Urgent) Help Need With In Selecting Too Many Columns.

Oct 29, 2007

Hi,

   I have a dbf file and that file has around 154 columns and in that i want to pull just 88 columns to my sql server database... I am using a OLedb connection and a data reader to read the data from the DBF file and then using a sqlbulcopy to insert the data into SQL server 2005 database. I have created a destination table for the 88 columns. This is my select statement for the dbf file. I have also used a Rownumber which is Int identity so i am using a 0 in the first column.

Dim command As Data.OleDb.OleDbCommand = New Data.OleDb.OleDbCommand("Select 0,* from FUND.DBF", connection)

 Now my question is Since i want to pull 88 columns instead of 154 column, I was thinking to give a select statement like

("Select, 0,Column1,.....Column88 From Fund.DBF", connection)

 SO instead of doing this is there is a way that i can specify in the sql statement that will tell it not to pull the rows after the 88th column.

 

Any help will be  appreciated.

Regards,

Karen

 

View 4 Replies


ADVERTISEMENT

Selecting Data From A Temp Table In A SP -- Very Urgent

Sep 25, 2007

Hello. I have a SP. I am passing two variables to it that are comma seperated lists (ids) so that I can use an IN clause. But since I cannot use these CSV in an IN clause directly I wrote a temp table that first parses the CS list and creates a temp table with a single column of IDS.Then in a second temp table I am selecting the data using enrollment_id IN (Select enrollment_id From #temptable)Then the SP selects data from the second temp table.This works exactly the way it is supposed to work. But when I call the SP from ASP.NET it doesn't return any data. I just cant seem to return data by selecting from a temp table. And my ASP.NET code is correct because I commented out everything and just returned the parameters I was passing and that worked. So does anyone know how to select data from a temp table in a SP when executed from ASP.NET?I even tried Table Variables and same thing. It works great in SQL but when called from ASP.NET it doesnt return any data. I am guessing it's probably losing its scope. Any quick help would be appreciated. Thank you.Here is a snippet of the SP (even this fails):CREATE PROCEDURE [dbo].[returnEnrollments](@organization_id int, @test_item_list ntext, @enrollment_list ntext)As--select  @test_item_list as tilist, @enrollment_list as elistDeclare @report_start_date datetime;Declare @report_end_date datetime;Declare @test_item_id_list varchar(8000);Declare @enrollment_id_list varchar(8000);DECLARE @TestItemID varchar(10), @Pos intDECLARE @EnrollmentID varchar(10)--Set @IDList = @test_item_id_list;--Set @EnrollmentIDList = @enrollment_id_list;Set @test_item_id_list = Cast(@test_item_list As varchar(8000))Set @enrollment_id_list = Cast(@enrollment_list As varchar(8000))Select @report_start_date = report_start_date, @report_end_date = report_end_date From organization Where organization_id = @organization_id;-- Create a temp table to store all the enrollment idsIF OBJECT_ID('tempdb..#EnrollTemp') IS NOT NULLDROP TABLE #EnrollTempCREATE TABLE #EnrollTemp (enrollment_id int NOT NULL)SET @enrollment_id_list = LTRIM(RTRIM(@enrollment_id_list))+ ','SET @Pos = CHARINDEX(',', @enrollment_id_list, 1)IF REPLACE(@enrollment_id_list, ',', '') <> ''BEGIN    WHILE @Pos > 0    BEGIN        SET @EnrollmentID = LTRIM(RTRIM(LEFT(@enrollment_id_list, @Pos - 1)))        IF @EnrollmentID <> '' And @EnrollmentID > 0        BEGIN            INSERT INTO #EnrollTemp (enrollment_id) VALUES (CAST(@EnrollmentID AS int)) --Use Appropriate conversion        END        SET @enrollment_id_list = RIGHT(@enrollment_id_list, LEN(@enrollment_id_list) - @Pos)        SET @Pos = CHARINDEX(',', @enrollment_id_list, 1)    ENDENDSelect top 20 * From #EnrollTemp  Edit: Just used a DataReader instead of a datatable and it works. Dont know why it would fail with a datatable. 

View 4 Replies View Related

Selecting One Of 3 Columns...

Dec 29, 2004

Hi,

I have a table that has 3 different types of dates (date1, date2, date3), and they represent the edit times of the 3 different sections on the website.
How do I select only one of those three that's the most recent? (It would represent the most recent edit on the website overall).
It would be an easy task if it was only one column - I would simply select the MAX, but I have to be selective between 3 different columns and pick the one I "like".

Thanks,

NB

View 8 Replies View Related

Selecting Dynamic Columns

Jul 12, 2004

I have the following Tables:

Table1: Row1
----------------------------------
Name Gary
Garbage1 A
Garbage2 B

Table2: Row1 Row2 Row3
------------------------------------------------------------------
Name Gary Gary Gary
Value 1 2 3
Desc Day Afternoon Night

Table1 has a 1 to Many relationship with Table2

Id Like to have the select statement Return the data as follows:

Gary,A,B,Day,1,Afternoon,2,Night,3

not like this:
Gary A,B,Day,1
Gary A,B,Afternoon,2
Gary A,B,Night,3

Any Ideas?

View 3 Replies View Related

Selecting Columns From 3 Inner Joins

Nov 15, 2012

I have 3 tables. They are inner joined. When I choose to select from all three tables I get a cartesian product.I've used distinct and I've tried cross apply with top 1. Top 1 brings back the right amount of records but it repeats the fields used in that select top N.

Basic question. Can you select from 3 different tables and avoid a cartesian result? I can have all three tables joined and with distinct I can get records from two of the tables without a cartesian. It is when I choose to select from a third is where the cartesian appears.If this is possible, what other tsql commands/constructs should I be experimenting with? URL....

View 9 Replies View Related

Selecting Multiple Columns Into One

Mar 18, 2008

I have a product table that has a productID column and a productName column. Then I have a productCategory table that associates productIDs with categoryIDs. And lastly I have a category table containing a categoryID and categoryName. I want to write a query that will return a table with three columns...productID, productName, and and calculated column containing the categories the product belongs to separated by a comma. A sample output would be...

ProductID____ProductName____Categories
1____________Green Flats____Footwear, Accessories, Women's Apparel
2____________Purple Belt____Accessories, Women's Apparel
3____________Pink Tunic_____Women's Apparel

If any of this isn't clear please feel free to write with questions.
So far I have this query -
SELECT Products.ProductID, ProductName, CategoryName FROM Products, ProductCategory, Categories WHERE Product.ProductID = ProductCategory.ProductID AND Categories.CategoryID = ProductCategory.CategoryID

This returns....
ProductID_____ProductName____CategoryName
1_____________Green Flats____Shoes
1_____________Green Flats____Accessories
1_____________Green Flats____Women's Apparel
2_____________Purple Belt____Accessories
2_____________Purple Belt____Women's Apparel
etc....

Any suggestions on how to remedy this???

View 5 Replies View Related

Error Selecting Null Columns

Jun 22, 2007

I want to run a query that selects rows from the table where a datetime column has null values;
select * from Orders where IsNull(dClosedDate,'Null') = 'Null'
However i get this error:
Conversion failed when converting datetime from character string.
Any help appreciated 
 

View 2 Replies View Related

Selecting Exactly 1 Row But More Columns From A Related Table..

Jan 4, 2008

I have table 1 from which I select some values belonging to users.In table 2 I store tips a user might give: tipid, tiptitle, tiptext,tipcreatedateA user may give more than one tip.But now I want a query that selects the info of a SINGLE user and the LATEST tip he created, so resultset might look like:username lastname sex tiptitle tiptext tipcreatedateSo even though a user might have given more tips, only the latest will be retreived...and thus 1 row for a particular user is returned...How would I construct such a query? The problem is that I want to get exactly 1 row but more than 1 column from the table 2, so I think I cannot use the SQL Server "TOP" command...

View 6 Replies View Related

Selecting Columns By Colmn Numbers

Nov 13, 2003

Is there a method to construct select statement on a table without using column names, based on column numbers.

I want to create a function which returns the contents columns 1 and 2, given just the name of the table.

An Execute statement, after retrieving the column names with Column_Name is not useful as they are not permitted in functions.

View 2 Replies View Related

Selecting Distinct On 3 Columns In Ms Sql Server

Feb 26, 2006

Hi, I think you can do this in oracle but I'm trying to figure a way to do it in ms sql.. I need to select a distinct combination of columns, like so...

select distinct(ItemName,ItemData,FID) from tblSIFups

Does anyone know how to achieve that? I have multiple data where I shouldn't and I don't have any control over the application so I need to clean it this way.

thanks, nicki

View 1 Replies View Related

Selecting One Greatest Number From Two Columns?

Jul 20, 2005

I have table1 and table2.In table1 I have a column of numbers, numbers1.In table2 I have a column of numbers, numbers2.I'd like to select the highest number represented in either column.Example:table1:column1--------------345565643656555676table2:column2--------------3456564556456456456456The number I would want would be 56456 since it's the largest numberout of all combined.How can I get that number with one select statement?--[ Sugapablo ][ http://www.sugapablo.com <--music ][ http://www.sugapablo.net <--personal ][ Join Bytes! <--jabber IM ]

View 1 Replies View Related

Selecting The Latest Date From Different Columns

Jul 20, 2005

I have 6 columns, all with dates within them, i.e.Proposed Start Date 1Proposed Start Date 2Proposed Start Date 3Proposed Finish Date 1Proposed Finish Date 2Proposed Finish Date 3What I need to do is narrow this down into two fields:Start DateFinish DateSo I need to find the newest value from the columns. i.e.If PS1 filled PS2 and PS3 empty, then Start Date = PS1If PS3 empty and PS2 filled, then Start Date = PS2If PS3 filled then PS3and similarly for Proposed Finish Dates.Anyone knew how I can do this.(Maybe the following will help for the programmers out there:If PS3 <> nullThen StartDate = PS3Else if PS2 <> nullThen StartDate = PS2ElseStartDate = PS1End IFJagdip

View 5 Replies View Related

Selecting The Rows Based Off Of Unique Columns

Mar 18, 2007

Hi there, im still learning SQL so thanks in advance.I have a table with columns of customer's information, [customerID], [customerFirst], [customerLast], , [program] ... other columns ...  There will be entries where there can be duplicate customerFirst and customerLast names.  I would like to just return a single entry of the duplicate names and all associated row information.  IE: [customerID], [customerFirst], [customerLast],            [ email],             [program]         01               Bill                 Smith             bill.smith@hotmail.com    ymca        02               Bill                 Smith             bill.smith@hotmail.com    Sports        03               jon                   doe                 jon.doe@hotmail.com    AAA        04               jon                   doe                 jon.doe@hotmail.com    Ebay          05               Paul                 Sprite             paul.sprite@hotmail.com    Rec Desired Returned result:        01               Bill                 Smith             bill.smith@hotmail.com    ymca        03               jon                   doe                 jon.doe@hotmail.com    AAA
         05               Paul                 Sprite             paul.sprite@hotmail.com    Rec So in my code i have this:dAdapter = new SqlDataAdapter("SELECT * FROM [Poc_" + suffix + "] WHERE (SELECT DISTINCT [CustomerLastName], [CustomerFirstName], [CustomerEmail] FROM [Poc_" + suffix + "])", cnStr);         dAdapter.Fill(pocDS, "Data Set");        However this is throwing up an error when i build the app:  An expression of non-boolean type specified in a context where a condition is expected, near ')'.



Description: An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException:
An expression of non-boolean type specified in a context where a
condition is expected, near ')'.

Source Error:




Line 52: //dAdapter = new SqlDataAdapter("SELECT DISTINCT * FROM [Poc_" + suffix + "] ORDER BY [CustomerLastName]", cnStr); Line 53: dAdapter = new SqlDataAdapter("SELECT * FROM [Poc_" + suffix + "] WHERE (SELECT DISTINCT [CustomerLastName], [CustomerFirstName], [CustomerEmail] FROM [Poc_" + suffix + "])", cnStr); Line 54: dAdapter.Fill(pocDS, "Data Set");Line 55: Line 56: //Dataset for name comparison  1: Can someone explain to me why this error is happening?2: Can soemone confirm that my intentions are correct with my code?3: If I'm completely off, can someone steer me in the right direction?Thanks alot!-Terry  

View 12 Replies View Related

Selecting Columns From Different Tables Into A Single Table

Jan 5, 2008

I want to select columns from different tables into a single table...Not sure if a temp table is suited for this and if so how I should implement it (NOTE: this query will be executed many times by different users at the same time, so I'd rather avoid temp tables!)I have:TABLE1idfirstnamedescriptioncreatedateTABLE2idcarnamespecificationsimportdateNow, I want a resultset that has the columns (columns from other tables from which the values should be retreived are behind the desired columns):id  (TABLE1.id, TABLE2.id)title (TABLE1.firstname , TABLE2.carname)description (TABLE1.description , TABLE2.sepcifications)date (TABLE1.createdate , TABLE2.importdate)Thanks!

View 1 Replies View Related

QUERY HELP: Selecting Distinct For Two Columns Group By One

Jul 23, 2005

Greetings.I'm having a little trouble with a query. The idea is simple I need todisplay a list of recently unique visited URLs and the last time Ivisited.I have 2 table one stores the user and time/date and another has theURL.So all I need is the URL (no duplicates) and the last visit.Below is the SQL to create the tables and data to help with the query.Thank you for your help.CREATE TABLE [stat_hits] ([hit_id] [int] (1, 1) NOT NULL ,[hit_date] [datetime] NOT NULL CONSTRAINT [DF_stat_hits_hit_date]DEFAULT (getdate()),[user_id] [varchar] (12) NOT NULL ,[hit_ip] [varchar] (15) NOT NULL ,[shp_id] [int] NOT NULL ,CONSTRAINT [PK_stat_hits] PRIMARY KEY CLUSTERED([hit_id]) ON [PRIMARY]) ON [PRIMARY]GOCREATE TABLE [stat_hit_pages] ([shp_id] [int] (1, 1) NOT NULL ,[shp_url] [varchar] (1000) NULL ,[shp_count] [int] NULL ,CONSTRAINT [PK_stat_hit_pages] PRIMARY KEY CLUSTERED([shp_id]) ON [PRIMARY]) ON [PRIMARY]GOINSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37878,'2005-06-01 16:07:35','ADMIN','0.0.0.0',7323)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37877,'2005-06-01 16:07:13','ADMIN','0.0.0.0',7323)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37876,'2005-06-01 15:41:17','ADMIN','0.0.0.0',7339)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37875,'2005-06-01 15:41:03','ADMIN','0.0.0.0',7323)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37874,'2005-06-01 15:20:31','ADMIN','0.0.0.0',7330)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37873,'2005-06-01 15:20:28','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37872,'2005-06-01 14:45:46','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37871,'2005-06-01 14:35:51','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37870,'2005-06-01 14:30:25','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37869,'2005-06-01 14:28:28','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37868,'2005-06-01 14:28:23','ADMIN','0.0.0.0',7325)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37867,'2005-06-01 14:28:17','ADMIN','0.0.0.0',7322)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37866,'2005-06-01 14:28:15','ADMIN','0.0.0.0',7321)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37861,'2005-06-01 14:27:09','ADMIN','0.0.0.0',7339)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37860,'2005-06-01 14:27:05','ADMIN','0.0.0.0',7323)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37859,'2005-06-01 14:26:59','ADMIN','0.0.0.0',7322)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37858,'2005-06-01 14:26:58','ADMIN','0.0.0.0',7321)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37853,'2005-06-01 14:25:59','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37852,'2005-06-01 14:23:51','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37851,'2005-06-01 13:58:49','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37850,'2005-06-01 13:44:06','ADMIN','0.0.0.0',7330)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37849,'2005-06-01 13:44:04','ADMIN','0.0.0.0',7321)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37848,'2005-06-01 13:44:04','ADMIN','0.0.0.0',7340)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37847,'2005-06-01 13:43:58','ADMIN','0.0.0.0',7330)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37846,'2005-06-01 13:43:53','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37845,'2005-06-01 13:26:29','ADMIN','0.0.0.0',7325)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37844,'2005-06-01 13:22:34','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37843,'2005-06-01 13:22:29','ADMIN','0.0.0.0',7325)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37842,'2005-06-01 13:21:15','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37841,'2005-06-01 13:19:17','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37840,'2005-06-01 13:17:20','ADMIN','0.0.0.0',7321)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37839,'2005-06-01 13:17:20','ADMIN','0.0.0.0',7320)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37838,'2005-06-01 11:55:15','ADMIN','0.0.0.0',7339)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37837,'2005-06-01 11:55:09','ADMIN','0.0.0.0',7323)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37836,'2005-06-01 11:53:08','ADMIN','0.0.0.0',7338)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37835,'2005-06-01 11:53:01','ADMIN','0.0.0.0',7325)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37834,'2005-06-01 11:34:34','ADMIN','0.0.0.0',7337)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37833,'2005-06-01 11:34:24','ADMIN','0.0.0.0',7336)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37832,'2005-06-01 11:02:59','ADMIN','0.0.0.0',7335)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37831,'2005-06-01 11:02:53','ADMIN','0.0.0.0',7334)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37830,'2005-06-01 11:02:46','ADMIN','0.0.0.0',7324)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37829,'2005-06-01 11:02:40','ADMIN','0.0.0.0',7333)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37828,'2005-06-01 11:02:31','ADMIN','0.0.0.0',7332)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37827,'2005-06-01 11:02:25','ADMIN','0.0.0.0',7323)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37826,'2005-06-01 11:02:21','ADMIN','0.0.0.0',7331)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37825,'2005-06-01 11:02:12','ADMIN','0.0.0.0',7323)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37824,'2005-06-01 11:01:23','ADMIN','0.0.0.0',7330)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37823,'2005-06-01 11:01:21','ADMIN','0.0.0.0',7328)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37822,'2005-06-01 11:01:20','ADMIN','0.0.0.0',7327)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37821,'2005-06-01 10:58:23','ADMIN','0.0.0.0',7330)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37820,'2005-06-01 10:58:10','ADMIN','0.0.0.0',7328)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37819,'2005-06-01 10:58:09','ADMIN','0.0.0.0',7327)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37818,'2005-06-01 10:55:27','ADMIN','0.0.0.0',7326)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37817,'2005-06-01 10:55:23','ADMIN','0.0.0.0',7325)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37816,'2005-06-01 10:55:17','ADMIN','0.0.0.0',7322)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37815,'2005-06-01 10:55:16','ADMIN','0.0.0.0',7321)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37810,'2005-06-01 10:54:20','ADMIN','0.0.0.0',7330)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37809,'2005-06-01 10:54:12','ADMIN','0.0.0.0',7329)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37808,'2005-06-01 10:51:30','ADMIN','0.0.0.0',7328)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37807,'2005-06-01 10:51:29','ADMIN','0.0.0.0',7327)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37806,'2005-06-01 10:51:10','ADMIN','0.0.0.0',7328)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37805,'2005-06-01 10:51:09','ADMIN','0.0.0.0',7327)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37804,'2005-06-01 10:35:46','ADMIN','0.0.0.0',7326)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37803,'2005-06-01 10:35:41','ADMIN','0.0.0.0',7325)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37802,'2005-06-01 10:35:29','ADMIN','0.0.0.0',7323)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37801,'2005-06-01 10:35:21','ADMIN','0.0.0.0',7321)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37800,'2005-06-01 10:35:20','ADMIN','0.0.0.0',7320)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37799,'2005-06-01 10:33:58','ADMIN','0.0.0.0',7321)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37798,'2005-06-01 10:33:50','ADMIN','0.0.0.0',7328)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37797,'2005-06-01 10:33:50','ADMIN','0.0.0.0',7327)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37796,'2005-06-01 10:33:09','ADMIN','0.0.0.0',7326)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37795,'2005-06-01 10:33:05','ADMIN','0.0.0.0',7325)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37794,'2005-06-01 10:32:45','ADMIN','0.0.0.0',7324)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37793,'2005-06-01 10:32:18','ADMIN','0.0.0.0',7323)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37792,'2005-06-01 10:31:47','ADMIN','0.0.0.0',7322)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37791,'2005-06-01 10:31:31','ADMIN','0.0.0.0',7321)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37790,'2005-06-01 10:31:31','ADMIN','0.0.0.0',7320)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37789,'2005-06-01 10:30:04','ADMIN','0.0.0.0',7320)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37788,'2005-05-31 20:49:56','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37787,'2005-05-31 20:49:54','ADMIN','0.0.0.0',5942)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37786,'2005-05-31 20:49:54','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37785,'2005-05-31 20:49:02','ADMIN','0.0.0.0',5942)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37784,'2005-05-31 20:48:54','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37783,'2005-05-31 20:48:53','ADMIN','0.0.0.0',5942)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37782,'2005-05-31 20:48:52','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37781,'2005-05-31 20:48:41','ADMIN','0.0.0.0',5941)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37780,'2005-05-31 20:48:37','ADMIN','0.0.0.0',215)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37779,'2005-05-31 20:48:30','ADMIN','0.0.0.0',4)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37775,'2005-05-31 20:46:44','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37774,'2005-05-31 20:46:40','ADMIN','0.0.0.0',7319)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37773,'2005-05-31 20:46:39','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37772,'2005-05-31 20:46:12','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37771,'2005-05-31 20:46:09','ADMIN','0.0.0.0',7319)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37770,'2005-05-31 20:46:08','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37769,'2005-05-31 20:45:55','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37768,'2005-05-31 20:45:52','ADMIN','0.0.0.0',7319)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37767,'2005-05-31 20:45:51','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37766,'2005-05-31 20:45:33','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37765,'2005-05-31 20:45:29','ADMIN','0.0.0.0',7319)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37764,'2005-05-31 20:45:29','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37763,'2005-05-31 20:45:28','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37762,'2005-05-31 20:44:52','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37761,'2005-05-31 20:44:48','ADMIN','0.0.0.0',7319)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37760,'2005-05-31 20:44:47','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37759,'2005-05-31 20:44:23','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37758,'2005-05-31 20:44:18','ADMIN','0.0.0.0',7319)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37757,'2005-05-31 20:44:18','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37756,'2005-05-31 20:43:50','ADMIN','0.0.0.0',6258)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37755,'2005-05-31 20:43:41','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37754,'2005-05-31 20:43:37','ADMIN','0.0.0.0',7318)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37753,'2005-05-31 20:43:36','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37752,'2005-05-31 20:43:31','ADMIN','0.0.0.0',7317)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37751,'2005-05-31 20:43:16','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37750,'2005-05-31 20:43:10','ADMIN','0.0.0.0',6684)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37749,'2005-05-31 20:43:10','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37748,'2005-05-31 20:40:04','ADMIN','0.0.0.0',7318)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37747,'2005-05-31 20:40:00','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37746,'2005-05-31 20:39:52','ADMIN','0.0.0.0',7317)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37745,'2005-05-31 20:39:24','ADMIN','0.0.0.0',7316)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37744,'2005-05-31 20:39:23','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37743,'2005-05-31 20:35:56','ADMIN','0.0.0.0',7315)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37742,'2005-05-31 20:35:43','ADMIN','0.0.0.0',7311)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37741,'2005-05-31 20:34:17','ADMIN','0.0.0.0',7314)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37740,'2005-05-31 20:34:17','ADMIN','0.0.0.0',1449)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37739,'2005-05-31 20:34:01','ADMIN','0.0.0.0',7313)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37738,'2005-05-31 20:33:54','ADMIN','0.0.0.0',7312)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37737,'2005-05-31 20:12:57','ADMIN','0.0.0.0',6681)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37736,'2005-05-31 20:09:40','ADMIN','0.0.0.0',6681)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37735,'2005-05-31 20:09:33','ADMIN','0.0.0.0',6258)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37734,'2005-05-31 20:09:03','ADMIN','0.0.0.0',6681)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37733,'2005-05-31 20:08:49','ADMIN','0.0.0.0',7289)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37732,'2005-05-31 20:08:44','ADMIN','0.0.0.0',6254)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37731,'2005-05-31 20:08:42','ADMIN','0.0.0.0',3443)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37730,'2005-05-31 20:08:40','ADMIN','0.0.0.0',7282)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37729,'2005-05-31 20:08:32','ADMIN','0.0.0.0',5983)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37728,'2005-05-31 20:08:24','ADMIN','0.0.0.0',6960)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37727,'2005-05-31 20:08:22','ADMIN','0.0.0.0',5918)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37726,'2005-05-31 20:08:18','ADMIN','0.0.0.0',25)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37725,'2005-05-31 20:08:15','ADMIN','0.0.0.0',5740)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37724,'2005-05-31 20:08:11','ADMIN','0.0.0.0',4)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37723,'2005-05-31 20:08:09','ADMIN','0.0.0.0',3)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37720,'2005-05-31 20:08:03','ADMIN','0.0.0.0',4)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37617,'2005-05-31 18:51:08','ADMIN','0.0.0.0',7290)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37615,'2005-05-31 18:51:00','ADMIN','0.0.0.0',7289)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37598,'2005-05-31 18:48:08','ADMIN','0.0.0.0',7282)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37597,'2005-05-31 18:48:04','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37596,'2005-05-31 18:48:03','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37595,'2005-05-31 18:47:21','ADMIN','0.0.0.0',7282)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37594,'2005-05-31 18:47:12','ADMIN','0.0.0.0',6960)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37593,'2005-05-31 18:47:09','ADMIN','0.0.0.0',5918)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37592,'2005-05-31 18:47:02','ADMIN','0.0.0.0',5740)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37590,'2005-05-31 18:46:59','ADMIN','0.0.0.0',6587)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37583,'2005-05-31 18:46:40','ADMIN','0.0.0.0',9)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37582,'2005-05-31 18:46:31','ADMIN','0.0.0.0',1691)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37580,'2005-05-31 18:46:18','ADMIN','0.0.0.0',9)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37576,'2005-05-31 18:46:04','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37575,'2005-05-31 18:46:02','ADMIN','0.0.0.0',5942)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37574,'2005-05-31 18:46:01','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37569,'2005-05-31 18:45:24','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37568,'2005-05-31 18:45:16','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37567,'2005-05-31 18:45:16','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37563,'2005-05-31 18:44:07','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37562,'2005-05-31 18:44:05','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37561,'2005-05-31 18:44:04','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37545,'2005-05-31 18:40:30','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37544,'2005-05-31 18:40:30','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37543,'2005-05-31 18:40:12','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37536,'2005-05-31 18:34:19','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37535,'2005-05-31 18:34:15','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37534,'2005-05-31 18:34:14','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37532,'2005-05-31 18:27:02','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37531,'2005-05-31 18:27:00','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37530,'2005-05-31 18:27:00','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37518,'2005-05-31 18:00:34','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37517,'2005-05-31 18:00:31','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37516,'2005-05-31 18:00:31','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37515,'2005-05-31 17:59:41','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37514,'2005-05-31 17:59:37','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37513,'2005-05-31 17:59:37','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37512,'2005-05-31 17:59:01','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37511,'2005-05-31 17:58:58','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37510,'2005-05-31 17:58:57','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37509,'2005-05-31 17:56:16','ADMIN','0.0.0.0',6610)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37508,'2005-05-31 17:56:07','ADMIN','0.0.0.0',6989)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37507,'2005-05-31 17:56:01','ADMIN','0.0.0.0',6610)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37506,'2005-05-31 17:55:56','ADMIN','0.0.0.0',7271)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37505,'2005-05-31 17:55:52','ADMIN','0.0.0.0',7199)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37504,'2005-05-31 17:55:43','ADMIN','0.0.0.0',7271)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37503,'2005-05-31 17:55:41','ADMIN','0.0.0.0',7199)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37502,'2005-05-31 17:53:57','ADMIN','0.0.0.0',7269)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37501,'2005-05-31 17:53:44','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37500,'2005-05-31 17:53:40','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37499,'2005-05-31 17:53:40','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37498,'2005-05-31 17:52:18','ADMIN','0.0.0.0',7269)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37497,'2005-05-31 17:52:06','ADMIN','0.0.0.0',7271)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37496,'2005-05-31 17:51:28','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37495,'2005-05-31 17:51:22','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37494,'2005-05-31 17:51:22','ADMIN','0.0.0.0',31)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37493,'2005-05-31 17:51:01','ADMIN','0.0.0.0',6979)INSERT INTO [stat_hits]([hit_id],[hit_date],[user_id],[hit_ip],[shp_id]) VALUES(37492,'2005-05-31 17:50:57','ADMIN','0.0.0.0',6103)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(3,'/scripts/iMenu.asp?_Ref=450493&_XID=40000000&ParentID=',2245)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(4,'/scripts/objects/MyZBF.asp?_XID=19999900&_Ref=450493&_Ref2=',2917)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7329,'/scripts/objects/list.asp?_XID=70000005&_Ref=1398186089&_reset=true&_table=2002000&|MenuID=40000000',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7330,'/scripts/objects/edit.asp?_XID=70000005&_Ref=1398186089&_table=2002000&_item=ADAMDOUG',5)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7331,'/scripts/objects/edit.asp?_XID=70000028&_Ref=1398186089&_table=1002009&_item=225000000',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7332,'/scripts/objects/edit.asp?_XID=70000028&_Ref=1398186089&_table=1002009&_item=215000000',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7333,'/scripts/objects/list.asp?_XID=70000028&_Ref=1398186089&_table=1002009&',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7334,'/scripts/objects/list.asp?_XID=70000028&_Ref=1398186089&_table=1001000&_parenturl=1',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7335,'/scripts/objects/edit.asp?_XID=70000028&_Ref=1398186089&_table=1001000&_item=1002009&_parenturl=1',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7336,'/scripts/objects/edit.asp?_XID=70000028&_Ref=1398186089&_table=1001054&_item=1000006&_parenturl=3',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7337,'/scripts/objects/edit.asp?_xid=70000028&_ref=1398186089&_table=1001054&&_parenturl=3',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7338,'/scripts/objects/navigator.asp?_xid=70000030&_ref=1398186089',12)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7339,'/scripts/objects/navigator.asp?_xid=70000028&_ref=1398186089',2)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7340,'/scripts/iKnow.asp?_ref=1398186089&_deep=http%3A//ZBFw2kdev01/scripts/objects/edit.asp%3F_XID%3D70000005%26_Ref%3D1398186089%26_ table%3D2002000%26_item%3DADAMDOUG',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(9,'/scripts/objects/list.asp?_XID=70000052&_Ref=450493&_reset=true&_table=215000001&|MenuID=40000000',1532)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(25,'/scripts/objects/list.asp?_XID=70000028&_Ref=450493&_reset=true&_table=1002009&|MenuID=40000000',144)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(31,'/scripts/objects/save.asp?',3986)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(215,'/scripts/objects/list.asp?_XID=70000030&_Ref=450493&_reset=true&_table=3001062&|MenuID=40000000',138)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(1449,'/scripts/objects/mappings.asp?',17)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(1691,'/scripts/objects/edit.asp?_XID=70000052&_Ref=450493&_table=215000001&_item=11',26)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(3443,'/scripts/objects/list.asp?_XID=70000028&_Ref=450493&_table=1001000&_parenturl=2',16)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(5740,'/scripts/objects/consolemaster.asp?_XID=80000003&_Ref=450493&_reset=true&showall=false&page_id=215000002&|MenuID=40000000',177)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(5918,'/scripts/objects/consolemaster.asp?_XID=80000003&_Ref=450493&showall=false&mode=listitself&item=215000006&page_id=215000002',15)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(5941,'/scripts/objects/edit.asp?_XID=70000030&_Ref=450493&_table=3001062&_item=12',9)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(5942,'/scripts/objects/edit.asp?_XID=70000030&_Ref=450493&_table=3001062&_item=12&_formtab=&process=&step=&elem=',62)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(5983,'/scripts/objects/edit.asp?_XID=70000028&_Ref=450493&_table=1002009&_item=225000000',15)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(6103,'/scripts/objects/edit.asp?_XID=70000028&_Ref=450493&_table=1001002&_parenturl=3&_item=215000018&_formtab=&process=&step=&elem=',21)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(6254,'/scripts/objects/edit.asp?_XID=70000028&_Ref=450493&_table=1001000&_item=225000001&_parenturl=2',4)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(6258,'/scripts/objects/edit.asp?_XID=70000028&_Ref=450493&_table=1001000&_item=225000001&_parenturl=2&',4)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(6587,'/scripts/objects/consolemaster.asp?_XID=80000004&_Ref=450493&_reset=true&showall=false&page_id=215000003&|MenuID=40000000',81)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(6610,'/scripts/objects/consolemaster.asp?_XID=80000004&_Ref=450493&showall=false&page_id=215000003',88)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(6681,'/scripts/objects/edit.asp?_XID=70000028&_Ref=450493&_table=1001054&_item=225000175&_parenturl=4',3)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(6684,'/scripts/objects/edit.asp?_XID=70000028&_Ref=450493&_table=1001054&_parenturl=4&_item=225000175&_formtab=&process=&step=&elem=',7)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(6960,'/scripts/objects/edit.asp?_XID=80000003&_Ref=450493&_table=215000001&_item=68',3)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(6979,'/scripts/objects/edit.asp?_XID=70000052&_Ref=450493&_table=215000001&_item=161&process=215000001&step=215000003&elem=215000018',25)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(6989,'/scripts/objects/consolemaster.asp?_XID=80000004&_Ref=450493&showall=false&mode=drill&item=215000120&drill_id=215000005&page_id=215000003&group=1&desc=BTFG',54)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7199,'/scripts/objects/consolemaster.asp?_XID=80000004&_Ref=450493&showall=false&page_id=215000006',24)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7269,'/scripts/objects/consolemaster.asp?_XID=80000004&_Ref=450493&showall=false&page_id=215000010',3)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7271,'/scripts/objects/consolemaster.asp?_XID=80000004&_Ref=450493&showall=false&mode=listitself&item=215000200&page_id=215000006&group=1&desc=Operations%20Executive',3)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7282,'/scripts/objects/edit.asp?_XID=80000003&_Ref=450493&_table=215000001&_item=68&process=215000001&step=215000003&elem=215000018',2)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7289,'/scripts/objects/edit.asp?_xid=80000003&_ref=450493&_table=225000001&_item=75&_parenturl=1',1)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7290,'/scripts/objects/edit.asp?_xid=80000003&_ref=450493&_table=215000016&_item=86&_parenturl=1',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7311,'/scripts/objects/edit.asp?_XID=80000003&_Ref=450493&_table=225000001&_item=75',11)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7312,'/scripts/objects/showpopup.asp?_XID=80000003&_Ref=450493&_table=225000001&_item=75&destable=225000001&_mode=mappings&_seed=72528.66',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7313,'/scripts/objects/mappings.asp?_XID=80000003&_Ref=450493&_table=225000001&_item=75&destable=225000001&_mode=mappings&_seed=72528.66&_popup=true',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7314,'/scripts/objects/edit.asp?_XID=80000003&_Ref=450493&_table=225000001&_item=90&process=&step=&elem=',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7315,'/scripts/objects/edit.asp?_xid=80000003&_ref=450493&_table=225000001&_item=90',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7316,'/scripts/objects/edit.asp?_xid=80000003&_ref=450493&_table=225000001&_item=90&_formtab=0&process=&step=&elem=',0)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7317,'/scripts/objects/edit.asp?_xid=80000003&_ref=450493&_table=215000016&_item=86',1)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7318,'/scripts/objects/edit.asp?_xid=80000003&_ref=450493&_table=215000016&_item=86&_formtab=&process=&step=&elem=',1)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7319,'/scripts/objects/edit.asp?_XID=70000028&_Ref=450493&_table=1001000&_parenturl=2&_item=225000001&_formtab=&process=&step=&elem=',5)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7320,'/scripts/iknow.asp?_Ref=1398186089',6)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7321,'/scripts/iMenu.asp?_Ref=1398186089&_XID=40000000&ParentID=',10)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7322,'/scripts/objects/MyZBF.asp?_XID=19999900&_Ref=1398186089&_Ref2=',9)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7323,'/scripts/objects/list.asp?_XID=70000028&_Ref=1398186089&_reset=true&_table=1002009&|MenuID=40000000',8)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7324,'/scripts/objects/edit.asp?_XID=70000028&_Ref=1398186089&_table=1002009&_item=1000001',1)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7325,'/scripts/objects/list.asp?_XID=70000030&_Ref=1398186089&_reset=true&_table=3001062&|MenuID=40000000',6)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7326,'/scripts/objects/edit.asp?_XID=70000030&_Ref=1398186089&_table=3001062&_item=12',2)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7327,'/scripts/objects/save.asp?',4)INSERT INTO [stat_hit_pages] ([shp_id],[shp_url],[shp_count]) VALUES(7328,'/scripts/objects/edit.asp?_XID=70000030&_Ref=1398186089&_table=3001062&_item=12&_formtab=&process=&step=&elem=',4)

View 2 Replies View Related

Selecting Only The List Of Columns From A Table Based On Input

Apr 17, 2008

Hi,
i have a table like below

table:-
id col2 col3 col4 col5 col6
1 2 3 4 5 6
2 5 8 4 7 6
3 4 8 2 6 9
4 2 5 8 6 3
5 6 9 5 5 9

i want to write a stored procedure where i pass column names a parameters and i want to get result based on that
For ex:-
if i pass the parameters as
col3 and col5 where id =1 then i should the result as

id col3 col4 col5
1 3 4 5

and if i pass input as col2and col6 where id =3, the result should be
id col2 col3 col4 col5 col6
3 4 8 2 6 9

can anyone help on this??

View 3 Replies View Related

Sorting Problem? Most Recent Entry When Selecting Multiple Columns

Oct 19, 2007

I'm trying to determine the oldest timestamp that meets given criteria which includes a specific action_type code. That code can legitimately be performed more than once on an item (all actions are recorded in an actions table, so the full history is available).

actions table (columns: action_id, request_id, action_type, action_time, action_reason)

I'm having trouble getting the most recent timestamp for the given action_type I'm looking for, when that action_type has been performed more than once.

My intent with the query below is to get the most recent action_time and it's request_id that meets the criteria


SELECT TOP 1 a.action_time, r.request_id FROM requests r JOIN incident i ON r.request_id = i.request_id LEFT JOIN actions a ON r.request_id = a.request_id WHERE i.refund_type = 1 AND (r.status_code = 3 OR r.status_code = 14) AND a.action_type = 3 ORDER BY a.action_time


So for example, if the item with request_id 1334 has had action_type 3 performed on it twice, once at 2007-10-15 13:30:00 and then again at 2007-10-17 14:40:00, it's picking up the former, when I want the later. That it had action_type 3 performed on it twice is legitimate. (larger context an item was approved by a manager, then rejected by a processor, and then approved by a manager again after resubmission)

Hopefully this has made sense so far.

So, how do I make sure I'm getting the most recent action time, when I don't know if the item in particular will have more than one of this action type performed on it?

View 5 Replies View Related

Microsoft SQL Server 2005. Selecting Multple Columns From Multiple Tables

Mar 23, 2008

Im just curious how i would take multiple columns from multiple tables.... would it be something like this ???
table: Products COLUMNS ProductName, ProductID
table: Categorys COLUMNS CategoryName, CategoryID,ProductID
SELECT Products.ProductName, Categorys.CategoryName,Products.ProductID,Categorys.CategoryID,Categorys.ProductID
FROM Categorys, Tables
WHERE Products.ProductID = Categorys.ProductID
 

View 1 Replies View Related

SQL Server 2012 :: Dynamically Create A Script Only Selecting Columns Where There Is Data?

Dec 2, 2013

I have created some dynamic sql to check a temporary table that is created on the fly for any columns that do contain data. If they do the column name is added to a dynamic sql, if not they are excluded. This looks like:

If (select sum(Case when [Sat] is null then 0 else 1 end) from #TABLE) >= 1 begin set @OIL_BULK = @OIL_BULK + '[Sat]' +',' END However, I am currently running this on over 230 columns and large tables 1.3 mil rows and it is quite slow. How I can dynamically create a sql script that only selects the columns in the table where there is data in a speedier manner. Unfortunately it has to be on the fly because the temporary table is created on the fly.

View 1 Replies View Related

Multiple Columns Into Single Row -- Very Urgent

Jun 15, 2006

Hi. I want to return multiple rows into a single row in different columns. For example my query returns something like thisThe query looks like thisSelect ID, TYPE, VALUE From myTable Where filtercondition = 1ID       TYPE       VALUE1         type1      121         type2      152         type1      16   2         type2      19Each ID will have the same number of types and each type for each ID might have a different value. So if there are only two types then each ID will have two types. Now I want to write the query in such a way that it returnsID      TYPE1      TYPE2      VALUE1      VALUE21        type1       type2      12             152        type1       type2      16             19Type1, Type2, Value1, and Value2 are all dynamic. Can someone help me please. Thank you.

View 1 Replies View Related

Removing Columns From Table - Urgent

Feb 26, 2002

Hi,

Could you please tell me removing table columns with null value will reduce the datafile size.

Data file size needs to be reduced to make free space on the disk, Could please suggest what data type can be choosen to be removed from the existing table so that more space can be made(Char,varhchar,int,date etc )

Thanks
John Jayaseelan

View 2 Replies View Related

Convert Columns To Rows - Urgent

Jan 13, 2008

Hi,
I have a table with 5 columns, from that I need only 3 columns , but the columns should be rows in the output
Ex Table 1
col1 col2 col3

Now I want col1 as one row n col2 as 2nd row and col3 as 3rd row

What query should I write to get this?

Will union work


Thank You

View 1 Replies View Related

Urgent:Conditional One-to-Many Mapping Of Columns

Jul 7, 2006

Hi,

I am new to using SSIS. I am supposed to move data from a text file to a SQL Server table. I did that successfuly when I simply mapped column one-to-one, but when I could not conditionally map one column to different destination column depending on some criteria.

Example: I want to make SSIS map the column A depending on the value of field X:

If X= Value1 Map A -> B

if X= Value2 map A -> C and so on.

This is an urgent situation. I will really appreciate instant help.

Thanks,

Aref

View 3 Replies View Related

URGENT Plz ! Pivot Rows To Columns In SQL Server 2000

May 16, 2007

Hi,

I have the following data in a table called "Products" :

Product Qty LHinging RHinging
-------- ----- -------- --------
Panel_1 1 R
Panel_1 1 L
Panel_1 1 R
Panel_1 1 R
Panel_2 1
Panel_2 1 L


I need to group this data like this :

Product Qty LHinging RHinging
-------- ----- -------- --------
Panel_1 3 L R
Panel_2 1
Panel_2 1 L


How can I do that ???

Thanks !

View 3 Replies View Related

T-SQL (SS2K8) :: Selecting Data From Table With Multiple Conditions On Multiple Columns

Apr 15, 2014

I am facing a problem in writing the stored procedure for multiple search criteria.

I am trying to write the query in the Procedure as follows

Select * from Car
where Price=@Price1 or Price=@price2 or Price=@price=3
and
where Manufacture=@Manufacture1 or Manufacture=@Manufacture2 or Manufacture=@Manufacture3
and
where Model=@Model1 or Model=@Model2 or Model=@Model3
and
where City=@City1 or City=@City2 or City=@City3

I am Not sure of the query but am trying to get the list of cars that are to be filtered based on the user input.

View 4 Replies View Related

Hiding Columns -White Space At End Of The Table*****Extremely Urgent

Mar 27, 2008

Hello everyone,
In reports ,My customer requirement is to display column based on selected criteria in UI .
The columns which are not selected by him will hide.
for that we kept an expression in Visibility --> Hide



Code Snippet
= NOT Parameters!Parameters.Value.ToString().Contains("Name")




then coming to HTML Report
It is working fine,but white space coming at end of the Table.
can't we supress the white space?
The white space width is exactly the width of the column which is hidden.
My designing in layout is wrong?
Else is that Problem with the SSRS?
Experts Please let me Know!!!!
Give me Solution!!!
Customer is strictly focusing on that requirement.

***Note: white Space is Some what Acceptable.But My Reports are very big like 45 columns around.When he selects 10 out of 45 then you can assume how much space is coming????????****

View 4 Replies View Related

Selecting The Most Recently Edited Item AND Selecting A Certain Type If Another Doesn't Exist

Sep 20, 2007

I've got a big problem that I'm trying to figure out:
I have an address table out-of-which I am trying to select mailing addresses for companies UNLESS a mailing address doesn't exist; then I want to select the physical addresses for that company. If I get multiple mailing or physical addresses returned I only want the most recently edited out of those.

I don't need this for an individual ID select, I need it applied to every record from the table.

My address table has some columns that look like:
[AddressID] [int]
[LocationID] [int]

[Type] [nvarchar](10)
[Address] [varchar](50)
[City] [varchar](50)
[State] [char](2)
[Zip] [varchar](5)
[AddDate] [datetime]
[EditDate] [datetime]

AddressID is a primary-key non-null column to the address table and the LocationID is a foreign key value from a seperate Companies table.
So there will be multiple addresses to one LocationID, but each address will have it's own AddressID.

How can I do this efficiently with perfomance in mind???

Thank you in advance for any and all replies...

View 2 Replies View Related

Urgent. Output Columns Are Not Appearing When I Use OLEDB Data Source With An Oracle Stored Procedure In Dataflow Task

Nov 12, 2007

I am using execute sql task to run a stored procedure in oracle database which returns a resultset. This works. Now I need to send the ouput to a destination table in a sql database. Should I use for each loop to pick the resultset and insert it into the destination one by one (which I dont think is a great idea) or is there a better way to accomplish this task (in data flow task) ?

When I use dataflow task instead of execute sql task, the main issue is I am not able to see the output columns when I execute an oracle stored procedure, but when I see the preview I can see the resultset . But I can see the output columns for a sql server stored procedure.

View 9 Replies View Related

RS2k Issue: PDF Exporting Report With Hidden Columns, Stretches Visible Columns And Misplaces Columns On Spanned Page

Dec 13, 2007

Hello:

I am running into an issue with RS2k PDF export.

Case: Exporting Report to PDF/Printing/TIFF
Report: Contains 1 table with 19 Columns. 1 column is static, the other 18 are visible at the users descretion. Report when printed/exported to pdf spans 2 pages naturally, 16 on the first page, 3 on the second, and the column widths have been adjusted to provide a perfect page span .

User A elects to hide two of the columns, and show the rest. The report complies and the viewable version is perfect, the excel export is perfect.. the PDF export on the first page causes every fith column, starting with the last column that was hidden to be expanded to take up additional width. On the spanned page, it renders the first column on that page correctly, then there is a white space gap equal to the width of the hidden columns and then the rest of the cells show with the last column expanded to take up the same width that the original 2 columns were going to take up, plus its width.

We have tried several different settings to see if it helps this issue or makes it worse. So far cangrow/canshrink/keep together have made no impact. It is not possible to increase the page size due to limited page size selection availablility for the client. There are far too many combinations of what the user can elect to show or hide to put together different tables to show and hide on the same report to remove this effect.

Any help or suggestion on this issue would be appreciated

View 1 Replies View Related

Timeout Expired -- URGENT, URGENT, URGENT!!!

Sep 27, 2000

This morning I can not connect to our SQL Server 7.0 whatever from client or server. The error message which I list below:

++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++
A connection could not be estabished to server--Timeout expired
Please verfy SQL Server is running and check your SQL Server registration properties and try again.
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++

We use windows NT authentication. We did not do any change on NT. The SQL Server daily schedule job usally stoped at 10:00AM, but today from the Window NT Task Manager, we can see that the SQL Server is still running untill now.

Please help!!!

View 3 Replies View Related

URGENT.Sql Server Does Not Recognise MAPI , Or Profile Name URGENT

Oct 26, 2000

hi, I have settup up sql mail and did the following:
1. created an E-mail account and configured Out look by creating a pop3 mail profile. tested it by sending and receiving mail, that is ook
2. I Created one domain account for MSsqlserver and Sql Agent service. both services use same account and start automatically in the control panel-services
3. I used the profile that I created in outlook to test the sql mail but got an error:
Error 22030 : A MAPI error ( error number:273) occurred: MapiLogon Ex Failed due to MAPI
Error 273: MAPI Logon Failed

I really do not know what went wrong. I followed the steps from bol and still having a problem. Am I missing something.

I do have a valid email account
I do have a valid domain account
I tested outlook using the email account and it worked. so why sql server does not recognise MAPI.

My next question, How to configure MAPI in Sql server if what I did was wrong.

View 1 Replies View Related

Urgent, Urgent !! My Sql Server Refused To Start Due To Encrypton

Mar 23, 2001

Hi, I have 2 windows 2000 server in cluster with sql server 2000 enterprise edition installed.
I have activated the Server-Requested Encryption by using the sql server network utility (Force Protocol Encryption). After this, I have stoped sql server service. But I can't start it at this moment.
The error is:
19015: The encrypton is required but no available certificat has been found.

Please help me to start sql server.

Thanks.

Michel

View 4 Replies View Related

Urgent Urgent Please.(Access SQL Pass Through Queries)

Jul 6, 2000

Hello,
I am facing a huge problem in my sql server database using access as a front end.The main problem is trying to execute queries "views" ,since they reside on sql server now,and using variables or parameters in reports and forms to filter on this query.
Ex.
how can the following be implemented using the same query but in sql server?
Access
------
SELECT MAT_Charts.YYYYMM
FROM MAT_Charts
WHERE ((([Area_Code] & "-" & [GROUP_CODE])=[Reports]![MAT_Chart_C1].[MAT_Key]))
GROUP BY MAT_Charts.YYYYMM;

It is specifically this statement in which I am interested:
[GROUP_CODE])=[Reports]![MAT_Chart_C1].[MAT_Key]))

Thank you very much for your concern.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved