I have a table. It's a big table. It has lots and lots of columns (about 150).
I'm copying a row from this table to table B. Then I'm updating a column or two and copying it back into the ...
I have a table with columnA, it's my PK and I add one to it each time I add, so row1 is 1, row2 is 2, then 3,4,5 etc....how would I selecet the last row? something like:
select columnA fr...
This is my sql so far
declare @timestamp datetime
declare @dt varchar(20)
set @timestamp = '03-29-08 03:10:09'
select @dt = (datepart(@timestamp,yyyy))+'-'+(datepart(@timestamp,mm))+'-'+...
Hi experts
How to add totaltime, i have table t_userscoinfo ...
SQL> select totaltime
2 from t_userscoinfo where licenseid=3258 and
3 user_id='test.user1';
TOTALTIME
------...
I have a table that contains a number of fields, three of which I'd like to pass to a pre-written function. The table contains thousands of records but only 800 of those records fit the crite...
Hello
I hope someone can help me with this query. unfortunately this one's beyond my sql reporting skills!
Please see the attachment for an example of the table I want to report from. ...
Hi,
In a table i'm having a column in which some rows having carriage return (line break) in it. which causing problem which export output csv file
(Note: below column values is on row v...
I'm a little new to running queries via Excel and am getting the above error but can't figure out why. I'm trying to run an Access query via Excel VBA, the query runs ok in Access.
Thanks ...
My SQL query SUMs up sales transactions by day by revenue center by customer type (3 types).
It results a queryset with 3 rows - 1 for each of 3 member types -- date / revenue center ID / da...
I've exported a WordPress MySQL database using phpmyadmin, but the special characters in the database text, like é, ç and so on, have been changed into ASCII strings. This happens even with ce...
Hello
This could be a simple task for some of you but I am finding it difficult to write a query for following task.
I am building a query using one variable and then I want to assign th...
I have a need to "Transpose" (Excel Term with which I am familiar) the results of a summing query.
The query sums multiple columns, so it is essentially one row of numbers and a row of head...
I am trying to put together a query that summarises a month worth of items in a detail table and I'm struggling a bit. Basically what I want to have at the end is:
Item 1 - 15 - £10
Ite...
Hello all!
I have a Stored Procedure that I use to generate a dataset that is subsequently used in a Crystal Report.
In order to track the data that is being processed, I'd like to generat...
I am trying to familiarize myself with materialized views. I want to use them for a data warehousing scenario, so only really need them to refresh once a day. However, I have been experimenti...
Hello Experts,
I have the following stored procedure in a SQL DB and would like to write a VBScript that will execute this procedure. Basically what this procedure does is searches a DB for...
hey,
i have an Access sql query that join a few tables. However one particular table, i only want to return one row. See bellow
I only need the most recent Date field from the MatOut ta...
Hi Everyone-
I have a Microsoft Access data that has a table that contains Account History data, so an account can appear in the table multiple times because it could have a record for each d...
In MS Access 2003:
I need for the Make-Table-Query to every time it is run: change the destination database name to fill-in/change to the current month-name at the very end of the db-name....
I'm trying to filter a DataGridView using a filter based on the text entered into a Text Box. The SQL Server Query looks like
SELECT *
FROM <TableName>
WHERE (<Tabl...
I have the attached and SP code snippet which, when fed a VCHRNMBR variable, will return up to 4 rows. I need to design a WHILE Loop to combine the DistRef field from all the returned records...
I have a sql 2000 server running as default on port 1433, however I need to change it to a named instance - how do I do this? Help I'm in trouble!!
Cheers
Dear experts,
I am using the following statement to update the table QIASA.TARGETS_TBL:
UPDATE QIASA.TARGETS_TBL
SET TARGETS_VALUE = '0.01'
WHERE TARGETSDATE = '20071231'
AND KPI = 'A...
Does anyone know how I can create a T-SQL script that takes a a file, say C:\folder1\me.txt, and move it to C:\folder2\? I know I can do this with a batch script, but I need to do it using T-SQL.
Hi,
I have a script which is intented to load an image from an Images table in a database. In the table there is a datetime column 'LastImpression' which holds the date and time of the last...