Need Query without Field names retriving in MDB? - excel

I am using the MDB as backend, frontend using vb. When i am retriving the output in excel the result provide the output the result with field names. I only need the result, how can i avoid the field name display for that. I am new in this MDB and vb. Please help me for a query providing the result without field names.

Change connection string to exclude headers, as in HDR=No.
Connection strings for Excel at http://www.connectionstrings.com/excel

To retrieve only the data - no headers - simply use the GetString method of your ADODB.Recordset.... I assume you are using ADO....

Related

excel 2003 database fields - is it possible to change the name

I am using excel 2003 query to pull information from databases and fields, I would like to rename the field headers but every time I refresh the data it defaults back to the original example
the field name is stit_ref which I want to change to req reference; if I do a refresh it just goes back to stit_ref after editing the cell/refreshing.
Is there a way to keep the edited field names. I attempted to do it via Microsoft Query by editing the Column heading but I get a syntax error.
In MS Query you can write custom query and use aliases for selected fields:
SELECT stit_ref AS [req reference] FROM table
In the query definition it should say something like:
SELECT -other fields go here-,stit_ref FROM TableName
change that to:
SELECT -other fields go here-,stit_ref As [req referenc] FROM TableName

Search exact text in a string

I am querying a SQL Server DB. I have a field "Remarks" that contains values pipe delimited as such
59P|W26|W511|862|W51
I'm trying to search in this field for an exact match, for example in the above I just want to return W51 not W511. I thought contains would help but unfortunately the table is not full text indexed and I dont have the ability to change that. Any suggestions?
It looks like you can do this using sql server because it has a useful built in function. Check out https://www.sqlservertutorial.net/sql-server-string-functions/sql-server-string_split-function/

Data Parameter in Excel not working with Access Query Connection

I have a connection to an Access DB query within Excel. The field in the Access query is an expression turning a field into a proper date. The problem that I'm having in Excel lies within passing the parameter from a cell containing the date that I want the query to run for. The results are either completely wrong or result in nothing. I have tried modifying the parameter cell to just about everything to no avail. I have tried the edit query option under view connection and when prompted to put in the value for the parameter, it actually returns the data I want. I would thing that this would be exactly the same parameter it would be grabbing from the formatted cell?
I have attached my connection's SQL command text below. And also an image with more detail and screenshots.
This is the command text from Excel containing my Where clause:
SELECT Query1.SETYPE, Query1.`SEORD#`, Query1.ORBILL, Query1.ORCUST, Query1.ORLDAT,
Query1.ORCONS, Query1.SESEV, Query1.CMTYPE, Query1.CMTEXT, Query1.ORDDATfix
FROM `C:\USERS\DRED\DESKTOP\ServiceFailures.accdb`.Query1 Query1
WHERE Query1.ORDDATfix =?
SELECT Query1.SETYPE, Query1.`SEORD#`, Query1.ORBILL, Query1.ORCUST, Query1.ORLDAT, Query1.ORCONS, Query1.SESEV, Query1.CMTYPE, Query1.CMTEXT, Query1.ORDDATfix
FROM `C:\USERS\DRED\DESKTOP\ServiceFailures.accdb`.Query1 Query1
WHERE (Query1.ORDDATfix>=?)
Apparently putting the clause in parenthesis fixed the problem.

How to use view parameter "Keys" for date fields at Domino Data Service REST API

Domino REST API doesn't return any view data if I use date at query parameter "Keys". In case of Extension Library REST Control we can use NotesDateTime() or #Date() to make it work.
But I don't know how to use the same at Domino REST API call. Anybody knows how to use date as key?
This is the the sample url,
https://demodomain.com/demo.nsf/api/data/collections/name/viewName?sortcolumn=DateField&keys=1999-03-24T22:16:17Z
I looked at the source code for the Domino data service. The view entries resource (/{db}/api/data/collections/name/{view}) always assumes the keys parameter is a string. So apparently it's unable to match any value in a date column.
This behavior could be improved. Meanwhile, you could work around the limitation by creating a separate sort column with the TEXT representation of the same date. Use the new column name in the sortcolumn parameter and the view entries resource should be able find rows that match the keys parameter.

SSRS 2012 - Sending multiple values in parameter to main dataset

I have a report that is up and running but I need to restrict the data on a parameter that takes multiple string-valued staff codes.
I created a parameter called Practioner which is a text type, ticked on Allow Multiple values and also on Visible.
In the available values, I made this code come from the field called mbillaty from the dataset3 under the Get values from a query option. I've checked data3 is fine in SQL server.
3.Now, I've gone to my dataset1 where all the reporting data sits then put the parameter, with the name ? and =Join(Parameters!Practitioner.Value,", ") for the parameter value. Then in the query, in the where clause, I've put: ......mbility in (?)
What should this SSRS be interpreting as is : .......mbility in ('AAB','KKR','RDR'), if the user picked these three staffs.
When I run the report, it definitley works when I check one of the practioners, but as soon as I more than one, the report wouldn't run. It does not return any error, but just the header shows, which I think means that no data is found.
Experts, do you see where I've gone wrong with this?
Thanks
If you're able to create UDFs, this link might be helpful. How do I split a string so I can access item x?
The parameter would be parsed in the SQL/function, and SSRS would simple pass the concatenated string.

Resources